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  

Référence de la classe ExCObject3D

#include <ExCObject3D.h>

Graphe d'héritage de la classe ExCObject3D

ExCObject ExCCamera ExCEntite ExCGizmo ExCLight ExCMap ExCModel ExCParticule ExCSystemeParticule

Membres publics

 ExCObject3D ()
virtual ~ExCObject3D ()
void SetCurrentState (bool state)
void ShowInfo (void)
void SetShowInfoState (bool state)
bool GetShowInfoState (void)
void SetAngleX (float Angle)
void SetAngleY (float Angle)
void SetAngleZ (float Angle)
float GetAngleX (void)
float GetAngleY (void)
float GetAngleZ (void)
void SetAcceleration (double Acceleration)
double GetAcceleration (void)
void SetVelocity (ExCVec3D Velocity)
void SetVelocity (float x, float y, float z)
ExCVec3D GetVelocity (void)
void SetGravity (ExCVec3D Gravity)
void SetGravity (float x, float y, float z)
ExCVec3D GetGravity (void)
void SetPosition (ExCVec3D Position)
void SetPosition (float x, float y, float z)
ExCVec3D GetPosition (void)
void SetTarget (ExCVec3D Target)
void SetTarget (float x, float y, float z)
ExCVec3D GetTarget (void)
void Rotate (float angleX, float angleY, float angleZ)
void Rotate (void)

Attributs Publics

ExCVec3D m_Position
ExCVec3D m_Target
float m_AngleX
float m_AngleY
float m_AngleZ
int m_speed

Attributs Protégés

ExCVec3D m_Up
ExCVec3D m_Velocity
ExCVec3D m_Gravity
double m_Acceleration
double m_RefreshTime
double m_Life
double m_StartingLife
float m_Size
float m_Mass
bool m_ShowInfo
bool m_CurrentObject

Documentation des contructeurs et destructeurs

ExCObject3D  
 

Définition à la ligne 28 du fichier ExCObject3D.cpp.

Références ExCObject::ExCObject(), m_Acceleration, m_AngleX, m_AngleY, m_AngleZ, m_CurrentObject, m_Gravity, m_Life, m_Mass, m_Position, m_RefreshTime, m_ShowInfo, m_Size, m_StartingLife, m_Velocity, ExCObject::SetName(), ExCObject::SetType(), et ExCVec3D::SetValue().

00029 {
00030         ExCObject::ExCObject();
00031         m_Size=1.0;
00032         m_RefreshTime=0.01f;
00033         m_Life=0;
00034         m_StartingLife=glutGet(GLUT_ELAPSED_TIME)/1000;
00035         m_Mass=100;
00036         m_ShowInfo=false;
00037         m_CurrentObject=false;
00038         m_Velocity.SetValue(0.01f,0.0f,0.0f);
00039         m_Position.SetValue(0.0f,0.0f,0.0f);
00040         m_Gravity.SetValue(0.0f,0.0f,0.0f);
00041         m_Acceleration=0.0f;
00042         m_AngleX=0.0f;
00043         m_AngleY=0.0f;
00044         m_AngleZ=0.0f;
00045         
00046         SetName("ExCObject3D");
00047         SetType(typeid(this).name());
00048 }

~ExCObject3D   [virtual]
 

Définition à la ligne 50 du fichier ExCObject3D.cpp.

00051 {
00052 
00053 }


Documentation des méthodes

double GetAcceleration void    [inline]
 

Définition à la ligne 79 du fichier ExCObject3D.h.

Références m_Acceleration.

00079 {m_Acceleration=Acceleration;}

float GetAngleX void    [inline]
 

Définition à la ligne 74 du fichier ExCObject3D.h.

00075 {return m_AngleX;}

float GetAngleY void    [inline]
 

Définition à la ligne 75 du fichier ExCObject3D.h.

Références m_AngleX.

00075 {return m_AngleX;}

float GetAngleZ void    [inline]
 

Définition à la ligne 76 du fichier ExCObject3D.h.

Références m_AngleY.

00076 {return m_AngleY;}

ExCVec3D GetGravity void    [inline]
 

Définition à la ligne 87 du fichier ExCObject3D.h.

00087 {m_Gravity=ExCVec3D(x,y,z);}

ExCVec3D GetPosition void    [inline]
 

Définition à la ligne 91 du fichier ExCObject3D.h.

Référencé par ExCCameraChase::Draw().

00091 {m_Position=ExCVec3D(x,y,z);}

bool GetShowInfoState void    [inline]
 

Définition à la ligne 69 du fichier ExCObject3D.h.

Références m_ShowInfo.

00069 {m_ShowInfo=state;}

ExCVec3D GetTarget void    [inline]
 

Définition à la ligne 95 du fichier ExCObject3D.h.

00095 {m_Target=ExCVec3D(x,y,z);}

ExCVec3D GetVelocity void    [inline]
 

Définition à la ligne 83 du fichier ExCObject3D.h.

00083 {m_Velocity=ExCVec3D(x,y,z);}

void Rotate void   
 

Définition à la ligne 138 du fichier ExCObject3D.cpp.

Références GetQuaternionFromEuler(), m_AngleX, m_AngleY, et m_AngleZ.

Référencé par Rotate().

00139 {
00140         if(m_AngleX<0)m_AngleX=359;
00141         if(m_AngleX>359)m_AngleX=0;
00142         if(m_AngleY<0)m_AngleY=359;
00143         if(m_AngleY>359)m_AngleY=0;
00144         if(m_AngleZ<0)m_AngleZ=359;
00145         if(m_AngleZ>359)m_AngleZ=0;
00146         
00147         ExQuaternion quat;
00148         ExCMatrix4x4 Matr;
00149         ExCVec3D VecX,VecY,VecZ,VecDir;
00150         
00151         quat=GetQuaternionFromEuler(m_AngleX,m_AngleY,m_AngleZ);
00152         //Matr=GetMatrixFromQuaternion(quat);
00153         //Matr=GetMatrixFromEuler(m_AngleX,m_AngleY,m_AngleZ);
00154         
00155         /*VecX.m_Vector[0]=(float)Matr.m_Matrix[0];
00156         VecX.m_Vector[1]=(float)Matr.m_Matrix[1];
00157         VecX.m_Vector[2]=(float)Matr.m_Matrix[2];
00158         VecY.m_Vector[0]=(float)Matr.m_Matrix[4];
00159         VecY.m_Vector[1]=(float)Matr.m_Matrix[5];
00160         VecY.m_Vector[2]=(float)Matr.m_Matrix[6];
00161         VecZ.m_Vector[0]=(float)Matr.m_Matrix[8];
00162         VecZ.m_Vector[1]=(float)Matr.m_Matrix[9];
00163         VecZ.m_Vector[2]=(float)Matr.m_Matrix[10];
00164 
00165         VecDir.m_Vector[0]=VecX.GetVectorLenght();
00166         VecDir.m_Vector[1]=VecY.GetVectorLenght();
00167         VecDir.m_Vector[2]=VecZ.GetVectorLenght();
00168         VecDir=VecX+VecY+VecZ;
00169         std::cout<<"Angle X:"<<m_AngleX<<" Y:"<<m_AngleY<<" Z:"<<m_AngleZ<<std::endl;
00170         std::cout<<"Quater :"<<quat<<std::endl;
00171         std::cout<<"Matrice:"<<Matr<<std::endl;
00172         std::cout<<"vec   X:"<<VecX<<std::endl;
00173         std::cout<<"vec   Y:"<<VecY<<std::endl;
00174         std::cout<<"vec   Z:"<<VecZ<<std::endl;
00175         std::cout<<"vec dir:"<<VecDir<<std::endl;
00176         std::cout<<"vel bef:"<<m_Velocity<<std::endl;
00177         //std::cout<<"vec aft:"<<m_Velocity<<std::endl;
00178         
00179 
00180         m_Target.SetX((Cos[(int)m_AngleY]));
00181         m_Target.SetZ((Sin[(int)m_AngleY]));
00182         m_Target.SetY((Sin[(int)m_AngleX]));
00183         std::cout<<"vec target:"<<m_Target<<std::endl;*/
00184         //VecDir=GetAxisFromQuaternion(quat);
00185         //m_Velocity=m_Velocity*VecDir;
00186         //std::cout<<"vec dir:"<<VecDir<<std::endl;
00187         //std::cout<<"vec vel:"<<m_Velocity<<std::endl;
00188         
00189 }

void Rotate float    angleX,
float    angleY,
float    angleZ
 

Définition à la ligne 130 du fichier ExCObject3D.cpp.

Références Rotate(), SetAngleX(), SetAngleY(), et SetAngleZ().

00131 {
00132         SetAngleX(angleX);
00133         SetAngleY(angleY);
00134         SetAngleZ(angleZ);
00135         Rotate();       
00136 }

void SetAcceleration double    Acceleration [inline]
 

Définition à la ligne 78 du fichier ExCObject3D.h.

00079 {m_Acceleration=Acceleration;}

void SetAngleX float    Angle
 

Définition à la ligne 110 du fichier ExCObject3D.cpp.

Références m_AngleX.

Référencé par Rotate().

00111 {
00112         if(m_AngleX<0)m_AngleX=359;
00113         if(m_AngleX>359)m_AngleX=0;
00114 }

void SetAngleY float    Angle
 

Définition à la ligne 116 du fichier ExCObject3D.cpp.

Références m_AngleY.

Référencé par Rotate().

00117 {
00118         if(m_AngleY<0)m_AngleY=359;
00119         if(m_AngleY>359)m_AngleY=0;
00120 }

void SetAngleZ float    Angle
 

Définition à la ligne 122 du fichier ExCObject3D.cpp.

Références m_AngleZ.

Référencé par Rotate().

00123 {
00124         /*if(m_AngleZ<0)m_AngleZ=359;
00125         if(m_AngleZ>359)m_AngleZ=0;*/
00126         m_AngleZ=Angle;
00127 }

void SetCurrentState bool    state [inline]
 

Définition à la ligne 65 du fichier ExCObject3D.h.

Références m_CurrentObject.

Référencé par ExManagerEntite::Add(), et ExManagerEntite::NewObject().

00066 {m_CurrentObject=state;}

void SetGravity float    x,
float    y,
float    z
[inline]
 

Définition à la ligne 86 du fichier ExCObject3D.h.

00086 {m_Gravity=Gravity;}

void SetGravity ExCVec3D    Gravity [inline]
 

Définition à la ligne 85 du fichier ExCObject3D.h.

00086 {m_Gravity=Gravity;}

void SetPosition float    x,
float    y,
float    z
[inline]
 

Définition à la ligne 90 du fichier ExCObject3D.h.

00090 {m_Position=Position;}

void SetPosition ExCVec3D    Position [inline]
 

Définition à la ligne 89 du fichier ExCObject3D.h.

Référencé par ExManagerCam::NewObject().

00090 {m_Position=Position;}

void SetShowInfoState bool    state [inline]
 

Définition à la ligne 68 du fichier ExCObject3D.h.

00069 {m_ShowInfo=state;}

void SetTarget float    x,
float    y,
float    z
[inline]
 

Définition à la ligne 94 du fichier ExCObject3D.h.

00094 {m_Target=Target;}

void SetTarget ExCVec3D    Target [inline]
 

Définition à la ligne 93 du fichier ExCObject3D.h.

00094 {m_Target=Target;}

void SetVelocity float    x,
float    y,
float    z
[inline]
 

Définition à la ligne 82 du fichier ExCObject3D.h.

00082 {m_Velocity=Velocity;}

void SetVelocity ExCVec3D    Velocity [inline]
 

Définition à la ligne 81 du fichier ExCObject3D.h.

00082 {m_Velocity=Velocity;}

void ShowInfo void   
 

Définition à la ligne 55 du fichier ExCObject3D.cpp.

Références data, ExCObject::GetId(), ExCObject::GetName(), ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_Acceleration, m_Gravity, m_Life, m_Position, m_Velocity, et ShowInfo().

Référencé par ExCComposed::Draw(), et ShowInfo().

00056 {
00057 Guard(void ExCObject3D::ShowInfo(void))
00058         
00059         char *CIdName;
00060         char *CPosition;
00061         char *CVelocity;
00062         char *CAcceleration;
00063         char *CGravity;
00064         char *CLife;
00065 
00066         CIdName= new char[strlen("Name : Id:")+strlen(GetName().data())+7];
00067         sprintf(CIdName,"Name :%s Id:%ld",GetName(),GetId());
00068 
00069         CPosition= new char[strlen("Position X: Y: Z:")+30];
00070         sprintf(CPosition,"Position X:%f Y:%f Z:%f",m_Position.GetX(),m_Position.GetY(),m_Position.GetZ());
00071 
00072         CVelocity= new char[strlen("Velocity X: Y: Z:")+30];
00073         sprintf(CVelocity,"Velocity X:%f Y:%f Z:%f",m_Velocity.GetX(),m_Velocity.GetY(),m_Velocity.GetZ());
00074 
00075         CGravity= new char[strlen("Gravity X: Y: Z:")+30];
00076         sprintf(CGravity,"Gravity X:%f Y:%f Z:%f",m_Gravity.GetX(),m_Gravity.GetY(),m_Gravity.GetZ());
00077 
00078         CAcceleration= new char[strlen("Acceleration :")+30];
00079         sprintf(CAcceleration,"Acceleration :%f",m_Acceleration);
00080 
00081         CLife= new char[strlen("Life :")+10];
00082         sprintf(CLife,"Life :%f",m_Life);
00083 
00084         /*ExNihilo::EnterOrthoMode();
00085                 glDisable(GL_LIGHTING);
00086                 ExNihilo::RenderBitmapString(500,500,(void *)GLUT_BITMAP_HELVETICA_12,CIdName); 
00087                 ExNihilo::RenderBitmapString(500,515,(void *)GLUT_BITMAP_HELVETICA_12,CPosition);
00088                 ExNihilo::RenderBitmapString(500,530,(void *)GLUT_BITMAP_HELVETICA_12,CVelocity);       
00089                 ExNihilo::RenderBitmapString(500,545,(void *)GLUT_BITMAP_HELVETICA_12,CAcceleration);   
00090                 ExNihilo::RenderBitmapString(500,560,(void *)GLUT_BITMAP_HELVETICA_12,CGravity);        
00091                 ExNihilo::RenderBitmapString(500,575,(void *)GLUT_BITMAP_HELVETICA_12,CLife);   
00092                 glEnable(GL_LIGHTING);
00093         ExNihilo::LeaveOrthoMode();*/
00094                 std::cout<<CIdName<<std::endl;  
00095                 std::cout<<CPosition<<std::endl;        
00096                 std::cout<<CVelocity<<std::endl;                
00097                 std::cout<<CAcceleration<<std::endl;            
00098                 std::cout<<CGravity<<std::endl;         
00099                 std::cout<<CLife<<std::endl;            
00100 
00101         delete CIdName;
00102         delete CPosition;
00103         delete CVelocity;
00104         delete CAcceleration;
00105         delete CGravity;
00106         delete CLife;   
00107 UnGuard
00108 }  


Documentation des données imbriquées

double m_Acceleration [protected]
 

Redéfinie dans ExCParticule.

Définition à la ligne 40 du fichier ExCObject3D.h.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), ExCObject3D(), GetAcceleration(), et ShowInfo().

float m_AngleX
 

Définition à la ligne 53 du fichier ExCObject3D.h.

Référencé par ExCSystemeParticule::Draw(), ExCModel::Draw(), ExCComposed::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCCamera::ExCCamera(), ExCObject3D(), GetAngleY(), ExManagerModel::InputAction(), ExManagerCamera::InputAction(), ExCCamera::Process(), ExCLight::Reset(), Rotate(), et SetAngleX().

float m_AngleY
 

Définition à la ligne 54 du fichier ExCObject3D.h.

Référencé par ExCSystemeParticule::Draw(), ExCModel::Draw(), ExCComposed::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCCamera::ExCCamera(), ExCObject3D(), GetAngleZ(), ExManagerModel::InputAction(), ExManagerCamera::InputAction(), ExCModelMD2::Process(), ExCCamera::Process(), ExCLight::Reset(), Rotate(), et SetAngleY().

float m_AngleZ
 

Définition à la ligne 55 du fichier ExCObject3D.h.

Référencé par ExCSystemeParticule::Draw(), ExCModel::Draw(), ExCComposed::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCCamera::ExCCamera(), ExCObject3D(), ExManagerModel::InputAction(), ExManagerCamera::InputAction(), ExCModelMD2::Process(), ExCCamera::Process(), ExCLight::Reset(), Rotate(), et SetAngleZ().

bool m_CurrentObject [protected]
 

Définition à la ligne 48 du fichier ExCObject3D.h.

Référencé par ExCComposed::Draw(), ExCObject3D(), et SetCurrentState().

ExCVec3D m_Gravity [protected]
 

Redéfinie dans ExCParticule.

Définition à la ligne 38 du fichier ExCObject3D.h.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), ExCObject3D(), et ShowInfo().

double m_Life [protected]
 

Définition à la ligne 43 du fichier ExCObject3D.h.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), ExCObject3D(), et ShowInfo().

float m_Mass [protected]
 

Redéfinie dans ExCParticule.

Définition à la ligne 46 du fichier ExCObject3D.h.

Référencé par ExCObject3D().

ExCVec3D m_Position
 

Redéfinie dans ExCParticule.

Définition à la ligne 51 du fichier ExCObject3D.h.

Référencé par ExCSystemeParticule::CalculateEmitPosition(), ExCModel::Draw(), ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCObject3D(), ExCModel::Forward(), ExCLight::GetPositionY(), ExCLight::GetPositionZ(), ExCLight::IncPositionX(), ExManagerModel::InputAction(), ExManagerCamera::InputAction(), ExCModelMD2::Process(), ExCLight::Reset(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), et ShowInfo().

double m_RefreshTime [protected]
 

Définition à la ligne 41 du fichier ExCObject3D.h.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), et ExCObject3D().

bool m_ShowInfo [protected]
 

Définition à la ligne 47 du fichier ExCObject3D.h.

Référencé par ExCComposed::Draw(), ExCObject3D(), et GetShowInfoState().

float m_Size [protected]
 

Redéfinie dans ExCParticule.

Définition à la ligne 45 du fichier ExCObject3D.h.

Référencé par ExCObject3D().

int m_speed
 

Définition à la ligne 56 du fichier ExCObject3D.h.

Référencé par ExCCamera::Draw(), ExCCamera::ExCCamera(), ExCModelMD2::ExCModelMD2(), ExManagerCamera::InputAction(), et ExCModelMD2::Process().

double m_StartingLife [protected]
 

Définition à la ligne 44 du fichier ExCObject3D.h.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), et ExCObject3D().

ExCVec3D m_Target
 

Définition à la ligne 52 du fichier ExCObject3D.h.

Référencé par ExCModel::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCModelMD2::ExCModelMD2(), ExCModel::Forward(), ExCLight::GetTargetY(), ExCLight::GetTargetZ(), ExCLight::IncTargetX(), ExManagerCamera::InputAction(), ExCModelMD2::Process(), ExCLight::Reset(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), et ExCLight::SetTargetZ().

ExCVec3D m_Up [protected]
 

Définition à la ligne 36 du fichier ExCObject3D.h.

Référencé par ExCModel::Draw(), ExCCameraChase::Draw(), et ExCCamera::Draw().

ExCVec3D m_Velocity [protected]
 

Redéfinie dans ExCParticule.

Définition à la ligne 37 du fichier ExCObject3D.h.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), ExCObject3D(), et ShowInfo().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Dec 10 18:18:29 2002 pour ExNihilo par doxygen1.3-rc1