00001 /*************************************************************************** 00002 * Copyright (C) 2004 - 2006 by Raphael Langerhorst * 00003 * raphael-langerhorst@gmx.at * 00004 * * 00005 * Permission is hereby granted, free of charge, to any person obtaining * 00006 * a copy of this software and associated documentation files (the * 00007 * "Software"), to deal in the Software without restriction, including * 00008 * without limitation the rights to use, copy, modify, merge, publish, * 00009 * distribute, sublicense, and/or sell copies of the Software, and to * 00010 * permit persons to whom the Software is furnished to do so, subject to * 00011 * the following conditions: * 00012 * * 00013 * The above copyright notice and this permission notice shall be * 00014 * included in all copies or substantial portions of the Software. * 00015 * * 00016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * 00017 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 00018 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 00019 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * 00020 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 00021 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 00022 * OTHER DEALINGS IN THE SOFTWARE. * 00023 ***************************************************************************/ 00024 00025 #ifndef GFORMH 00026 #define GFORMH 00027 00028 #include "GVector3.h" 00029 00030 #include <qmutex.h> 00031 #include <qstringlist.h> 00032 00033 namespace GCS 00034 { 00035 00068 class GForm : public QMutex 00069 { 00070 public: //public to make access easier and faster, GForm is basically just a data container anyway 00071 00075 GVector3 Position; 00076 00080 GVector3 Ellipsoid; 00081 00085 GVector3 RotationVector; 00086 00090 double RotationAngle; 00091 00092 public: 00093 00097 GForm(const GVector3& position = GVector3(0,0,0), 00098 const GVector3& ellipsoid = GVector3(1,1,1), 00099 const GVector3& rotation_vector = GVector3(0,0,0), 00100 double rotation_angle = 0); 00101 00105 GForm(const GForm& original); 00106 00111 virtual ~GForm(); 00112 00117 GVector3 getPosition() const; 00118 00122 void setPosition(const GVector3& position); 00123 00128 GVector3 getEllipsoid() const; 00129 00133 void setEllipsoid(const GVector3& size); 00134 00139 GVector3 getRotationVector() const; 00140 00144 void setRotationVector(const GVector3& rotation); 00145 00149 double getRotationAngle() const; 00150 00154 void setRotationAngle(double angle); 00155 00162 virtual double getRadiusMax() const; 00163 00171 virtual double getRadiusMin() const; 00172 00176 GForm& operator = (const GCS::GForm& form); 00177 }; 00178 00179 } 00180 00181 #endif
1.4.7