Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GForm.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 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 
00032 namespace GCS
00033 {
00034 
00065 class GForm : public QMutex
00066 {
00067   public:
00068   
00076     class GFormDynamics
00077     {
00078       public:
00082         GVector3 Speed;
00083         
00087         GVector3 RotationSpeed;
00088         
00092         GFormDynamics(const GVector3& speed = GVector3(0,0,0), const GVector3& rotation_speed = GVector3(0,0,0))
00093         : Speed(speed),
00094           RotationSpeed(rotation_speed)
00095         {}
00096     };
00097 
00101     GVector3 Position;
00102     
00106     GVector3 Rotation;
00107     
00111     GFormDynamics Dynamics;
00112   
00116     GForm(const GVector3& position = GVector3(0,0,0),
00117           const GVector3& rotation = GVector3(0,0,0))
00118     : Position(position),
00119       Rotation(rotation)
00120     {
00121     }
00122     
00126     GForm(const GForm& original)
00127     : QMutex(),
00128       Position(original.Position),
00129       Rotation(original.Rotation)
00130     {
00131     }
00132   
00137     virtual ~GForm()
00138     {
00139     }
00140   
00147     virtual double getRadiusMax() const = 0;
00148     
00156     virtual double getRadiusMin() const = 0;
00157 };
00158 
00159 }
00160 
00161 #endif

Generated on Thu Oct 21 21:18:03 2004 for G System by doxygen 1.3.6