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

Référence de la classe ExCObject

#include <ExCObject.h>

Graphe d'héritage de la classe ExCObject

ExCCamera ExCEntite ExCGizmo ExCLight ExCModel ExCModelMD2 ExCSystemeParticule ExCCameraTarget ExCComposed ExSkeleton ExCGizmoFace ExCGizmoLine ExCGizmoPoint ExCGizmoRectangle ExCModel3DS ExCModelASC ExCModelASE ExCModelMD3 ExCModelOBJ

Membres publics

 ExCObject ()
virtual ~ExCObject ()
virtual void Draw (void)
virtual void SetManagerTexture (ExManagerTexture *Texture)
void SetCurrentState (bool state)
void ShowInfo (void)
void SetShowInfoState (bool state)
bool GetShowInfoState (void)
void SetIdName (IdName idname)
void SetId (ExId Id)
ExId GetId (void)
char * GetName (void)
void SetName (const char *Name)
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)
void SetGravity (ExCVec3D Gravity)
void SetGravity (float x, float y, float z)
void SetPosition (ExCVec3D Position)
void SetPosition (float x, float y, float z)
void SetTarget (ExCVec3D Target)
void SetTarget (float x, float y, float z)
void Rotate (float angleX, float angleY, float angleZ)
void Rotate (void)

Attributs Publics

float m_AngleX
float m_AngleY
float m_AngleZ
ExCVec3D GetVelocity (void)
ExCVec3D GetGravity (void)
ExCVec3D GetPosition (void)
ExCVec3D GetTarget (void)

Attributs Protégés

ExManagerTextureManagerTexture
ExId m_ObjectId
char * m_ObjectName
ExCVec3D m_Position
ExCVec3D m_Target
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

ExCObject  
 

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

Références 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, SetId(), SetName(), et ExCVec3D::SetValue().

Référencé par ExCEntite::ExCEntite().

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

~ExCObject   [virtual]
 

Définition à la ligne 48 du fichier ExCObject.cpp.

00049 {
00050 
00051 }


Documentation des méthodes

void Draw void    [virtual]
 

Redéfinie dans ExCCamera, ExCCameraTarget, ExCComposed, ExCEntite, ExCGizmo, ExCGizmoRectangle, et ExCSystemeParticule.

Définition à la ligne 61 du fichier ExCObject.cpp.

Références Draw(), Guard, et UnGuard.

Référencé par Draw().

00062 {
00063 Guard(void ExCObject::Draw(void))
00064 UnGuard
00065 }  

double GetAcceleration void    [inline]
 

Définition à la ligne 98 du fichier ExCObject.h.

Références m_Acceleration.

00098 {return m_Acceleration;}

float GetAngleX void    [inline]
 

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

Références m_AngleX.

00093 {return m_AngleX;}

float GetAngleY void    [inline]
 

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

Références m_AngleY.

00094 {return m_AngleY;}

float GetAngleZ void    [inline]
 

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

Références m_AngleZ.

00095 {return m_AngleZ;}

ExId GetId void    [inline]
 

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

Références ExId, et m_ObjectId.

Référencé par ExManagerLight::Add(), ExManagerGizmo::Add(), ExManagerEntite::Add(), ExManagerLight::NewObject(), ExManagerGizmo::NewObject(), ExManagerEntite::NewObject(), ExManagerCam::NewObject(), ExManagerEntite::SetCurrentEntiteName(), et ShowInfo().

00086 {return m_ObjectId;}

char* GetName void    [inline]
 

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

Références m_ObjectName.

Référencé par ExManagerEntite::Add(), ExCComposed::LoadAsc(), ExManagerEntite::SetCurrentEntiteName(), et ShowInfo().

00087 {return m_ObjectName;}

bool GetShowInfoState void    [inline]
 

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

Références m_ShowInfo.

00082 {return m_ShowInfo;}

void Rotate void   
 

Définition à la ligne 146 du fichier ExCObject.cpp.

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

Référencé par Rotate().

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

void Rotate float    angleX,
float    angleY,
float    angleZ
 

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

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

Référencé par ExManagerCommand::ProcessAction().

00139 {
00140         SetAngleX(angleX);
00141         SetAngleY(angleY);
00142         SetAngleZ(angleZ);
00143         Rotate();       
00144 }

void SetAcceleration double    Acceleration [inline]
 

Définition à la ligne 97 du fichier ExCObject.h.

Références m_Acceleration.

00097 {m_Acceleration=Acceleration;}

void SetAngleX float    Angle
 

Définition à la ligne 115 du fichier ExCObject.cpp.

Références m_AngleX.

Référencé par Rotate().

00116 {
00117         if(m_AngleX<0)m_AngleX=359;
00118         if(m_AngleX>359)m_AngleX=0;
00119 }

void SetAngleY float    Angle
 

Définition à la ligne 121 du fichier ExCObject.cpp.

Références m_AngleY.

Référencé par Rotate().

00122 {
00123         if(m_AngleY<0)m_AngleY=359;
00124         if(m_AngleY>359)m_AngleY=0;
00125 }

void SetAngleZ float    Angle
 

Définition à la ligne 127 du fichier ExCObject.cpp.

Références m_AngleZ.

Référencé par Rotate().

00128 {
00129         if(m_AngleZ<0)m_AngleZ=359;
00130         if(m_AngleZ>359)m_AngleZ=0;
00131 }

void SetCurrentState bool    state [inline]
 

Définition à la ligne 77 du fichier ExCObject.h.

Références m_CurrentObject.

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

00077 {m_CurrentObject=state;}

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

Définition à la ligne 105 du fichier ExCObject.h.

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

void SetGravity ExCVec3D    Gravity [inline]
 

Définition à la ligne 104 du fichier ExCObject.h.

00104 {m_Gravity=Gravity;}

void SetId ExId    Id [inline]
 

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

Références ExId, et m_ObjectId.

Référencé par ExCObject(), et SetIdName().

00085 {m_ObjectId=Id;}

void SetIdName IdName    idname
 

Définition à la ligne 109 du fichier ExCObject.cpp.

Références IdName, SetId(), et SetName().

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

00110 {
00111         SetName(idname.second);
00112         SetId(idname.first);
00113 }

void SetManagerTexture ExManagerTexture   Texture [virtual]
 

Redéfinie dans ExCComposed, et ExCSystemeParticule.

Définition à la ligne 133 du fichier ExCObject.cpp.

Références ManagerTexture.

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

00134 {
00135         ManagerTexture = Texture;
00136 }

void SetName const char *    Name
 

Définition à la ligne 53 du fichier ExCObject.cpp.

Références Guard, m_ObjectName, SetName(), et UnGuard.

Référencé par ExCObject(), ExCEntite::LoadAsc(), ExCComposed::LoadAsc(), ExManagerEntite::SetCurrentEntiteName(), SetIdName(), et SetName().

00054 {
00055 Guard(void ExCObject::SetName(char * Name))
00056         m_ObjectName = new char[strlen(Name)];
00057         sprintf(m_ObjectName,Name);
00058 UnGuard
00059 }

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

Définition à la ligne 109 du fichier ExCObject.h.

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

void SetPosition ExCVec3D    Position [inline]
 

Définition à la ligne 108 du fichier ExCObject.h.

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

00108 {m_Position=Position;}

void SetShowInfoState bool    state [inline]
 

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

Références m_ShowInfo.

00081 {m_ShowInfo=state;}

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

Définition à la ligne 113 du fichier ExCObject.h.

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

void SetTarget ExCVec3D    Target [inline]
 

Définition à la ligne 112 du fichier ExCObject.h.

00112 {m_Target=Target;}

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

Définition à la ligne 101 du fichier ExCObject.h.

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

void SetVelocity ExCVec3D    Velocity [inline]
 

Définition à la ligne 100 du fichier ExCObject.h.

00100 {m_Velocity=Velocity;}

void ShowInfo void   
 

Définition à la ligne 67 du fichier ExCObject.cpp.

Références EnterOrthoMode(), GetId(), GetName(), ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, LeaveOrthoMode(), m_Acceleration, m_Gravity, m_Life, m_Position, m_Velocity, RenderBitmapString(), ShowInfo(), et UnGuard.

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

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


Documentation des données imbriquées

ExCVec3D GetGravity(void)
 

Définition à la ligne 106 du fichier ExCObject.h.

00106 {return m_Gravity;}

ExCVec3D GetPosition(void)
 

Définition à la ligne 110 du fichier ExCObject.h.

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

00110 {return m_Position;}

ExCVec3D GetTarget(void)
 

Définition à la ligne 114 du fichier ExCObject.h.

00114 {return m_Target;}

ExCVec3D GetVelocity(void)
 

Définition à la ligne 102 du fichier ExCObject.h.

00102 {return m_Velocity;}

double m_Acceleration [protected]
 

Définition à la ligne 50 du fichier ExCObject.h.

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

float m_AngleX
 

Définition à la ligne 62 du fichier ExCObject.h.

Référencé par ExCComposed::Draw(), ExCCamera::Draw(), ExCCamera::ExCCamera(), ExCObject(), GetAngleX(), ExCCamera::GoToView(), ExManagerCommand::ProcessAction(), ExCLight::Reset(), Rotate(), et SetAngleX().

float m_AngleY
 

Définition à la ligne 63 du fichier ExCObject.h.

Référencé par ExCComposed::Draw(), ExCCamera::Draw(), ExCCamera::ExCCamera(), ExCObject(), GetAngleY(), ExCCamera::GoToView(), ExManagerCommand::ProcessAction(), ExCLight::Reset(), Rotate(), et SetAngleY().

float m_AngleZ
 

Définition à la ligne 64 du fichier ExCObject.h.

Référencé par ExCComposed::Draw(), ExCCamera::Draw(), ExCCamera::ExCCamera(), ExCObject(), GetAngleZ(), ExManagerCommand::ProcessAction(), ExCLight::Reset(), Rotate(), et SetAngleZ().

bool m_CurrentObject [protected]
 

Définition à la ligne 59 du fichier ExCObject.h.

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

ExCVec3D m_Gravity [protected]
 

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

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

double m_Life [protected]
 

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

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

float m_Mass [protected]
 

Définition à la ligne 57 du fichier ExCObject.h.

Référencé par ExCObject().

ExId m_ObjectId [protected]
 

Définition à la ligne 42 du fichier ExCObject.h.

Référencé par GetId(), et SetId().

char* m_ObjectName [protected]
 

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

Référencé par GetName(), et SetName().

ExCVec3D m_Position [protected]
 

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

Référencé par ExCSystemeParticule::Draw(), ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCamera::Draw(), ExCObject(), ExCLight::GetPositionX(), ExCLight::GetPositionY(), ExCLight::GetPositionZ(), ExCCamera::GoToView(), ExCLight::Reset(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), et ShowInfo().

double m_RefreshTime [protected]
 

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

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

bool m_ShowInfo [protected]
 

Définition à la ligne 58 du fichier ExCObject.h.

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

float m_Size [protected]
 

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

Référencé par ExCObject().

double m_StartingLife [protected]
 

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

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

ExCVec3D m_Target [protected]
 

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

Référencé par ExCCamera::Draw(), ExCLight::GetTargetX(), ExCLight::GetTargetY(), ExCLight::GetTargetZ(), ExCCamera::GoToView(), ExCLight::Reset(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), et ExCLight::SetTargetZ().

ExCVec3D m_Velocity [protected]
 

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

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

ExManagerTexture* ManagerTexture [protected]
 

Redéfinie dans ExCSystemeParticule.

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

Référencé par ExCEntite::DrawWithoutList(), ExCComposed::LoadAsc(), SetManagerTexture(), et ExCComposed::SetManagerTexture().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Aug 6 20:25:38 2002 pour ExNihilo par doxygen1.2.17