Page principale   Liste des namespaces   Hiérarchie des classes   Liste par ordre alphabétique   Liste des composants   Liste des fichiers   Composants   Déclarations  

ExCObject.h

Aller à la documentation de ce fichier.
00001 /*
00002  * ExNihilo 3D Engine
00003  * 
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  *
00018  * Please read AUTHORS file !!!
00019  * 
00020  * $Id: ExCObject.h,v 1.10 2002/07/26 18:43:55 data Exp $
00021  *
00022  */
00023 
00024 #ifndef __EXOBJECT_H__
00025 #define __EXOBJECT_H__
00026 //--------------------------------
00027 // File to include
00028 //--------------------------------
00029 #include "ExDefine.h"
00030 #include "ExMath.h"
00031 #include "ExCTime.h"
00032 #include "ExManagerTexture.h"
00033 #include "ExPredefinedObject.h"
00034 //--------------------------------
00035 class ExCObject  
00036 {
00037 protected:
00038 //--------------------------------
00039 // Variable
00040 //--------------------------------
00041         ExManagerTexture        *ManagerTexture;
00042         ExId                            m_ObjectId;
00043         char *                          m_ObjectName;
00044 
00045         ExCVec3D                        m_Position;
00046         ExCVec3D                        m_Target;
00047         ExCVec3D                        m_Velocity;
00048         ExCVec3D                        m_Gravity;
00049 
00050         double                          m_Acceleration;
00051 
00052         double                          m_RefreshTime;
00053 
00054         double                          m_Life;
00055         double                          m_StartingLife;
00056     float                               m_Size;
00057         float                           m_Mass;
00058         bool                            m_ShowInfo;
00059         bool                            m_CurrentObject;
00060 
00061 public:
00062         float           m_AngleX;
00063         float           m_AngleY;
00064         float           m_AngleZ;
00065 
00066 //--------------------------------
00067 // Constructor // Destructor
00068 //--------------------------------
00069         ExCObject();
00070         virtual ~ExCObject();
00071 //--------------------------------
00072 // Methode
00073 //--------------------------------
00074         virtual void Draw(void);
00075         virtual void SetManagerTexture(ExManagerTexture * Texture);
00076 
00077         void SetCurrentState(bool state){m_CurrentObject=state;}
00078     
00079         //--------------------------------------------------------
00080         void ShowInfo(void);
00081         inline void SetShowInfoState(bool state){m_ShowInfo=state;}
00082         inline bool GetShowInfoState(void){return m_ShowInfo;}
00083         //--------------------------------------------------------
00084         void SetIdName(IdName idname);
00085         inline void SetId(ExId Id){m_ObjectId=Id;}
00086         inline ExId GetId(void){return m_ObjectId;}
00087         inline char * GetName(void){return m_ObjectName;}
00088         void SetName(const char * Name);
00089         //--------------------------------------------------------
00090         void SetAngleX(float Angle);
00091         void SetAngleY(float Angle);
00092         void SetAngleZ(float Angle);
00093         inline float GetAngleX(void){return m_AngleX;}
00094         inline float GetAngleY(void){return m_AngleY;}
00095         inline float GetAngleZ(void){return m_AngleZ;}
00096         //--------------------------------------------------------
00097         inline void             SetAcceleration(double Acceleration) {m_Acceleration=Acceleration;}
00098         inline double   GetAcceleration(void)   {return m_Acceleration;}
00099         //--------------------------------------------------------
00100         inline void             SetVelocity(ExCVec3D Velocity) {m_Velocity=Velocity;}
00101         inline void             SetVelocity(float x,float y,float z){m_Velocity=ExCVec3D(x,y,z);}
00102         inline ExCVec3D GetVelocity(void)       {return m_Velocity;}
00103         //--------------------------------------------------------
00104         inline void             SetGravity(ExCVec3D Gravity){m_Gravity=Gravity;}
00105         inline void             SetGravity(float x,float y,float z){m_Gravity=ExCVec3D(x,y,z);}
00106         inline ExCVec3D GetGravity(void)        {return m_Gravity;}
00107         //--------------------------------------------------------
00108         inline void             SetPosition(ExCVec3D Position){m_Position=Position;}
00109         inline void             SetPosition(float x,float y,float z){m_Position=ExCVec3D(x,y,z);}
00110         inline ExCVec3D GetPosition(void)       {return m_Position;}
00111         //--------------------------------------------------------
00112         inline void             SetTarget(ExCVec3D Target){m_Target=Target;}
00113         inline void             SetTarget(float x,float y,float z){m_Target=ExCVec3D(x,y,z);}
00114         inline ExCVec3D GetTarget(void) {return m_Target;}
00115         //--------------------------------------------------------
00116         void Rotate(float angleX,float angleY,float angleZ);
00117         void Rotate(void);
00118 };
00119 
00120 #endif // __EXOBJECT_H__

Généré le Tue Aug 6 20:25:25 2002 pour ExNihilo par doxygen1.2.17