00001 /************************************************************************/ 00002 /* Ex Nihlo Engine by Hermanns Christophe */ 00003 /************************************************************************/ 00004 /* This program is free software; you can redistribute it and/or */ 00005 /* modify it under the terms of the GNU General Public License */ 00006 /* as published by the Free Software Foundation; either version 2 */ 00007 /* of the License, or (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. */ 00012 /* */ 00013 /* See the GNU General Public License for more details. */ 00014 /* */ 00015 /* You should have received a copy of the GNU General Public License */ 00016 /* along with this program; if not, write to the Free Software */ 00017 /* Foundation, Inc., 59 Temple Place - Suite 330, */ 00018 /* Boston, MA 02111-1307, USA. */ 00019 /* */ 00020 /* If you use a important part of this code please send me a mail */ 00021 /* I just want to see where my code go thks :) */ 00022 /************************************************************************/ 00023 00024 /************************************************************************/ 00025 /* Contact */ 00026 /************************************************************************/ 00027 /* ExNihilo Website :www.ploksoftware.org */ 00028 /* */ 00029 /* Hermanns Christophe ExNihilo creator and main programmer */ 00030 /* */ 00031 /* Mail : Data@ploksoftware.org */ 00032 /* ICQ : 8030901 */ 00033 /* MSN Messenger : Data_7@hotmail.com */ 00034 /* */ 00035 /* */ 00036 /************************************************************************/ 00037 00038 /************************************************************************/ 00039 /* File Description */ 00040 /************************************************************************/ 00041 /* File Name :ExCObject3D.h */ 00042 /* */ 00043 /* Start Date :06/20/2003 */ 00044 /* */ 00045 /* Last Update :06/20/2003 */ 00046 /* */ 00047 /* File Description : */ 00048 /* */ 00049 /* For update of this file check : www.ploksoftware.org */ 00050 /************************************************************************/ 00051 00052 #ifndef __EXOBJECT3D_H__ 00053 #define __EXOBJECT3D_H__ 00054 //------------------------------------------------------------------------ 00055 //Includes 00056 //------------------------------------------------------------------------ 00057 #include "ExDefine.h" 00058 //------------------------------------------------------------------------ 00059 #include "Object/ExCObject.h" 00060 //------------------------------------------------------------------------ 00061 class ExCObject3D : public ExCObject 00062 { 00063 protected: 00064 //------------------------------------------------------------------------ 00065 // Variable 00066 //------------------------------------------------------------------------ 00067 ExCVec3D m_Up; 00068 ExCVec3D m_Velocity; 00069 ExCVec3D m_Gravity; 00070 00071 ExCVec3D m_Acceleration; 00072 double m_RefreshTime; 00073 00074 double m_Life; 00075 double m_StartingLife; 00076 float m_Size; 00077 float m_Mass; 00078 bool m_ShowInfo; 00079 bool m_CurrentObject; 00080 00081 public: 00082 ExCVec3D m_Position; 00083 ExCVec3D m_OldPosition; 00084 ExCVec3D m_Target; 00085 ExCVec3D m_OldTarget; 00086 ExCVec3D m_Angle; 00087 //float m_AngleX; 00088 //float m_AngleY; 00089 //float m_AngleZ; 00090 int m_speed; 00091 float m_SphereRadius; 00092 bool m_Visible; 00093 //------------------------------------------------------------------------ 00094 // Constructor // Destructor 00095 //------------------------------------------------------------------------ 00096 ExCObject3D(); 00097 virtual ~ExCObject3D(); 00098 //------------------------------------------------------------------------ 00099 // Methode 00100 //------------------------------------------------------------------------ 00101 void SetCurrentState(bool state){m_CurrentObject=state;} 00102 //------------------------------------------------------------------------ 00103 void ShowInfo(void); 00104 inline void SetShowInfoState(bool state){m_ShowInfo=state;} 00105 inline bool GetShowInfoState(void){return m_ShowInfo;} 00106 //------------------------------------------------------------------------ 00107 void SetAngleX(float Angle); 00108 void SetAngleY(float Angle); 00109 void SetAngleZ(float Angle); 00110 inline float GetAngleX(void){return m_Angle.GetX();} 00111 inline float GetAngleY(void){return m_Angle.GetY();} 00112 inline float GetAngleZ(void){return m_Angle.GetZ();} 00113 //------------------------------------------------------------------------ 00114 inline void SetAcceleration(ExCVec3D Acceleration) {m_Acceleration=Acceleration;} 00115 inline void SetAcceleration(float x,float y,float z){m_Acceleration=ExCVec3D(x,y,z);} 00116 inline ExCVec3D GetAcceleration(void) {return m_Acceleration;} 00117 //------------------------------------------------------------------------ 00118 inline void SetVelocity(ExCVec3D Velocity) {m_Velocity=Velocity;} 00119 inline void SetVelocity(float x,float y,float z){m_Velocity=ExCVec3D(x,y,z);} 00120 inline ExCVec3D GetVelocity(void) {return m_Velocity;} 00121 //------------------------------------------------------------------------ 00122 inline void SetGravity(ExCVec3D Gravity){m_Gravity=Gravity;} 00123 inline void SetGravity(float x,float y,float z){m_Gravity=ExCVec3D(x,y,z);} 00124 inline ExCVec3D GetGravity(void) {return m_Gravity;} 00125 //------------------------------------------------------------------------ 00126 inline void SetPosition(ExCVec3D Position){m_Position=Position;} 00127 inline void SetPosition(float x,float y,float z){m_Position=ExCVec3D(x,y,z);} 00128 inline ExCVec3D GetPosition(void) {return m_Position;} 00129 //------------------------------------------------------------------------ 00130 inline void SetTarget(ExCVec3D Target){m_Target=Target;} 00131 inline void SetTarget(float x,float y,float z){m_Target=ExCVec3D(x,y,z);} 00132 inline ExCVec3D GetTarget(void) {return m_Target;} 00133 //------------------------------------------------------------------------ 00134 inline void SetOldPosition(ExCVec3D OldPosition){m_OldPosition=OldPosition;} 00135 inline void SetOldPosition(float x,float y,float z){m_OldPosition=ExCVec3D(x,y,z);} 00136 inline ExCVec3D GetOldPosition(void) {return m_OldPosition;} 00137 //------------------------------------------------------------------------ 00138 inline void SetOldTarget(ExCVec3D OldTarget){m_OldTarget=OldTarget;} 00139 inline void SetOldTarget(float x,float y,float z){m_OldTarget=ExCVec3D(x,y,z);} 00140 inline ExCVec3D GetOldTarget(void) {return m_OldTarget;} 00141 //------------------------------------------------------------------------ 00142 void Rotate(float angleX,float angleY,float angleZ); 00143 void Rotate(void); 00144 //------------------------------------------------------------------------ 00145 inline void SetVisibleState(bool state){m_Visible=state;} 00146 inline bool GetVisibleState(void){return m_Visible;} 00147 }; 00148 //------------------------------------------------------------------------ 00149 #endif // __EXOBJECT3D_H__