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

# ExCObject3D.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
    00021  *
    00022  */
    00023
    00024 #ifndef __EXOBJECT3D_H__
    00025 #define __EXOBJECT3D_H__
    00026 //--------------------------------
    00027 // File to include
    00028 //--------------------------------
    00029 #include "ExDefine.h"
    00030 #include "ExCObject.h"
    00031 //--------------------------------
    00032 class ExCObject3D : public ExCObject
    00033 {
    00034 protected:
    00035         //ExCVec3D                      m_Position;
    00036         //ExCVec3D                      m_Target;
    00037         ExCVec3D                        m_Up;
    00038         ExCVec3D                        m_Velocity;
    00039         ExCVec3D                        m_Gravity;
    00040
    00041         double                          m_Acceleration;
    00042         double                          m_RefreshTime;
    00043
    00044         double                          m_Life;
    00045         double                          m_StartingLife;
    00046     float                               m_Size;
    00047         float                           m_Mass;
    00048         bool                            m_ShowInfo;
    00049         bool                            m_CurrentObject;
    00050
    00051 public:
    00052         ExCVec3D                        m_Position;
    00053         ExCVec3D                        m_Target;
    00054         float           m_AngleX;
    00055         float           m_AngleY;
    00056         float           m_AngleZ;
    00057         int                     m_speed;
    00058 //--------------------------------
    00059 // Constructor // Destructor
    00060 //--------------------------------
    00061         ExCObject3D();
    00062         virtual ~ExCObject3D();
    00063 //--------------------------------
    00064 // Methode
    00065 //--------------------------------
    00066         void SetCurrentState(bool state){m_CurrentObject=state;}
    00067 //--------------------------------------------------------
    00068         void ShowInfo(void);
    00069         inline void SetShowInfoState(bool state){m_ShowInfo=state;}
    00070         inline bool GetShowInfoState(void){return m_ShowInfo;}
    00071 //--------------------------------------------------------
    00072         void SetAngleX(float Angle);
    00073         void SetAngleY(float Angle);
    00074         void SetAngleZ(float Angle);
    00075         inline float GetAngleX(void){return m_AngleX;}
    00076         inline float GetAngleY(void){return m_AngleY;}
    00077         inline float GetAngleZ(void){return m_AngleZ;}
    00078 //--------------------------------------------------------
    00079         inline void             SetAcceleration(double Acceleration) {m_Acceleration=Acceleration;}
    00080         inline double   GetAcceleration(void)   {return m_Acceleration;}
    00081 //--------------------------------------------------------
    00082         inline void             SetVelocity(ExCVec3D Velocity) {m_Velocity=Velocity;}
    00083         inline void             SetVelocity(float x,float y,float z){m_Velocity=ExCVec3D(x,y,z);}
    00084         inline ExCVec3D GetVelocity(void)       {return m_Velocity;}
    00085 //--------------------------------------------------------
    00086         inline void             SetGravity(ExCVec3D Gravity){m_Gravity=Gravity;}
    00087         inline void             SetGravity(float x,float y,float z){m_Gravity=ExCVec3D(x,y,z);}
    00088         inline ExCVec3D GetGravity(void)        {return m_Gravity;}
    00089 //--------------------------------------------------------
    00090         inline void             SetPosition(ExCVec3D Position){m_Position=Position;}
    00091         inline void             SetPosition(float x,float y,float z){m_Position=ExCVec3D(x,y,z);}
    00092         inline ExCVec3D GetPosition(void)       {return m_Position;}
    00093 //--------------------------------------------------------
    00094         inline void             SetTarget(ExCVec3D Target){m_Target=Target;}
    00095         inline void             SetTarget(float x,float y,float z){m_Target=ExCVec3D(x,y,z);}
    00096         inline ExCVec3D GetTarget(void) {return m_Target;}
    00097 //--------------------------------------------------------
    00098         void Rotate(float angleX,float angleY,float angleZ);
    00099         void Rotate(void);
    00100 };
    00101
    00102 #endif // __EXOBJECT3D_H__