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 ExManagerCollision

#include <ExManagerCollision.h>

Graphe d'héritage de la classe ExManagerCollision

ExManager

Membres publics

void SetManagerModel (ExManagerModel *Model)
void Reset (void)
void Init (void)
void Reload (void)
void SetManagerId (ExManagerId *Id)
ExCVec3D ObjectCollision (ExCObject3D *Object3d)
ExCVec3D OneTestCollision (ExCObject3D *Object3d)
void RemoveObject (ExCObject3D *Object3d)
void ResolveCollision (void)
void Clear (void)
void SetFlux (std::ostrstream *consol, ExCFluxAction *action)
bool GetStatus (void)
void SetStatus (bool status)
void SetAskForCommand (bool status)
void SetAskForExclusifCommand (bool status)
bool AskForCommand (void)
bool AskForExclusifCommand (void)
virtual ExCAction InputCommand (ExCCommand Command)
virtual ExCAction InputAction (ExCAction Action)

Membres publics statiques

ExManagerCollisionCreateSingleton (void)

Attributs Publics

std::ostrstream * Consol
ExCFluxActionFluxAction

Attributs Protégés

bool m_Status
bool m_AskForCommand
bool m_Exclusif

Membres privés

 ExManagerCollision (void)
 ~ExManagerCollision (void)

Attributs Privés

ExManagerIdManagerId
ExManagerModelManagerModel

Attributs Privés Statiques

bool m_flag = false
ExManagerCollisionm_instance = NULL

Documentation des contructeurs et destructeurs

ExManagerCollision::ExManagerCollision void   )  [private]
 

Définition à la ligne 43 du fichier ExManagerCollision.cpp.

00044 {
00045 }

ExManagerCollision::~ExManagerCollision void   )  [private]
 

Définition à la ligne 47 du fichier ExManagerCollision.cpp.

00048 {
00049 }


Documentation des méthodes

bool ExManager::AskForCommand void   )  [inline, inherited]
 

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

Références ExManager::m_AskForCommand.

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

00089 {return m_AskForCommand;}

bool ExManager::AskForExclusifCommand void   )  [inline, inherited]
 

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

Références ExManager::m_Exclusif.

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

00090 {return m_Exclusif;}

void ExManagerCollision::Clear void   ) 
 

Définition à la ligne 145 du fichier ExManagerCollision.cpp.

Référencé par ExManagerOutput::DrawScene().

00146 {
00147 
00148 }

ExManagerCollision * ExManagerCollision::CreateSingleton void   )  [static]
 

Définition à la ligne 29 du fichier ExManagerCollision.cpp.

Références CreateSingleton(), Guard, m_flag, m_instance, et UnGuard.

Référencé par CreateManager(), et CreateSingleton().

00029                                                            {
00030 Guard(ExManagerCollision* ExManagerCollision::CreateSingleton(void))
00031         if(!m_flag)
00032         {
00033                 m_flag = true; // We are creating the error log now, so set flag to true
00034                 m_instance = new ExManagerCollision; // Create the error log
00035         }else
00036         {
00037                 std::cout<<"Error singleton already created"<<std::endl;
00038         }
00039         return m_instance; 
00040 UnGuard
00041 }

bool ExManager::GetStatus void   )  [inline, inherited]
 

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

Références ExManager::m_Status.

Référencé par ExManagerInterface::Draw(), ExManagerConsole::Draw(), et ExManagerOutput::DrawScene().

00085 {return m_Status;}

void ExManagerCollision::Init void   )  [inline, virtual]
 

Redéfinie à partir de ExManager.

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

00095 {}

ExCAction ExManager::InputAction ExCAction  Action  )  [virtual, inherited]
 

Redéfinie dans ExManagerCommand, ExManagerConsole, ExManagerFog, ExManagerId, ExManagerMap, ExManagerNetwork, ExManagerPVS, ExManagerSpecialEffect, ExManagerWindow, ExManagerLoad, ExManagerAnimation, ExManagerCamera, ExManagerEntity, ExManagerInterface, ExManagerLoad, ExManagerMesh, ExManagerModel, ExManagerObjectWindow, ExManagerParticuleSystem, ExManagerSound, et ExManagerTexture.

Définition à la ligne 42 du fichier ExManager.cpp.

Références NOTHING.

00043 {return NOTHING;}

ExCAction ExManager::InputCommand ExCCommand  Command  )  [virtual, inherited]
 

Redéfinie dans ExManagerCommand, ExManagerConsole, ExManagerFog, ExManagerMap, ExManagerNetwork, ExManagerPVS, ExManagerSpecialEffect, ExManagerWindow, ExManagerLoad, ExManagerAnimation, ExManagerCamera, ExManagerEntity, ExManagerInterface, ExManagerLoad, ExManagerMesh, ExManagerModel, ExManagerObjectWindow, ExManagerParticuleSystem, et ExManagerSound.

Définition à la ligne 40 du fichier ExManager.cpp.

Références NOTHING.

00041 {return NOTHING;}

ExCVec3D ExManagerCollision::ObjectCollision ExCObject3D Object3d  ) 
 

ExCVec3D ExManagerCollision::OneTestCollision ExCObject3D Object3d  ) 
 

void ExManagerCollision::Reload void   )  [virtual]
 

Redéfinie à partir de ExManager.

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

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

00056 {
00057 }

void ExManagerCollision::RemoveObject ExCObject3D Object3d  ) 
 

void ExManagerCollision::Reset void   )  [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 51 du fichier ExManagerCollision.cpp.

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

00052 {
00053 }

void ExManagerCollision::ResolveCollision void   ) 
 

Définition à la ligne 59 du fichier ExManagerCollision.cpp.

Références ExCModel::GetCollisionGizmo(), ExManagerModel::GetCurrentObject(), ExCObject::GetName(), ExManagerObject< ExCModel * >::GetNumberObject(), ExCObject3D::GetPosition(), ExCObject3D::GetTarget(), ExCObject::GetType(), ExCObject3D::GetVelocity(), ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, ExCModel::IncreaseCollisionCouter(), ExCObject3D::m_SphereRadius, ManagerModel, ExManagerObject< ExCModel * >::NextObject(), ExCModel::ResetCollisionCouter(), ResolveCollision(), ExCGizmo::SetColor(), ExCObject3D::SetTarget(), ExCObject3D::SetVelocity(), et UnGuard.

Référencé par ResolveCollision().

00060 {
00061 Guard(void ExManagerCollision::ResolveCollision(void))
00062         //i=0 comparer i avec i+1....i+nombre elem
00063         //i=1 ...
00064         //i=nombre elem quit
00065         ExCVec3D Nev,CurrentVec;
00066         ExCModel *CurrentModel,*ModelToCompare;
00067         float lowlestradius;
00068         bool Collision;
00069         for(unsigned int i=0;i<ManagerModel->GetNumberObject();i++)
00070         {
00071                 CurrentModel=ManagerModel->GetCurrentObject();
00072                 Collision=false;
00073                 for(unsigned int j=i+1;j<ManagerModel->GetNumberObject();j++)
00074                 {
00075                         ManagerModel->NextObject();
00076                         ModelToCompare=ManagerModel->GetCurrentObject();
00077                         ModelToCompare->ResetCollisionCouter();
00078                         ModelToCompare->GetCollisionGizmo()->SetColor(ExCVec3D(1.0f,1.0f,1.0f));
00079                         //CHECK COLLISION TYPE BOX/BOX SPHERE/SPHERE SPHERE/BOX...
00080                         //SPHERE/SPHERE
00081                         if(strcmp(ModelToCompare->GetCollisionGizmo()->GetType().data(),"class ExCGizmoSphere *")==0
00082                                 &&strcmp(CurrentModel->GetCollisionGizmo()->GetType().data(),"class ExCGizmoSphere *")==0)//sphere with sphere
00083                         {
00084                         
00085                                 if(ModelToCompare->m_SphereRadius<CurrentModel->m_SphereRadius)
00086                                 {
00087                                         lowlestradius=ModelToCompare->m_SphereRadius;
00088                                 }else{
00089                                         lowlestradius=CurrentModel->m_SphereRadius;
00090                                 }
00091                                 Nev=ModelToCompare->GetPosition()-CurrentModel->GetPosition();
00092                                 if(Nev.GetX()<lowlestradius&&Nev.GetX()>-lowlestradius)
00093                                 {
00094                                         if(Nev.GetZ()<lowlestradius&&Nev.GetZ()>-lowlestradius)
00095                                         {
00096                                                 std::cout<<CurrentModel->GetName()<<" Collision SPHERE/SPHERE with "<<ModelToCompare->GetName()<<std::endl;
00097                                                 if(Nev.GetY()<lowlestradius&&Nev.GetY()>-lowlestradius)
00098                                                 {
00099                                                         ExCVec3D tmpvel,tmptrgt;
00100                                                         tmpvel=CurrentModel->GetVelocity()+ModelToCompare->GetVelocity();
00101                                                         tmptrgt=CurrentModel->GetTarget()+ModelToCompare->GetTarget();
00102                                                                                         
00103                                                         CurrentModel->SetVelocity(tmpvel/2);
00104                                                         CurrentModel->SetTarget(tmptrgt/2);
00105                                                         ModelToCompare->SetVelocity(tmpvel/2);
00106                                                         ModelToCompare->SetTarget(tmptrgt/2);
00107                                                         CurrentModel->GetCollisionGizmo()->SetColor(ExCVec3D(1.0f,0.0f,0.0f));
00108                                                         ModelToCompare->GetCollisionGizmo()->SetColor(ExCVec3D(0.0f,1.0f,0.0f));
00109                                                         Collision=true;
00110                                                         CurrentModel->IncreaseCollisionCouter();
00111                                                         ModelToCompare->IncreaseCollisionCouter();
00112 
00113                                                 }
00114                                         }
00115                                 }
00116                         }
00117                         //SPHERE/RECTANGLE
00118                         if(strcmp(ModelToCompare->GetCollisionGizmo()->GetType().data(),"class ExCGizmoSphere *")==0
00119                                 &&strcmp(CurrentModel->GetCollisionGizmo()->GetType().data(),"class ExCGizmoRectangle*")==0)//sphere with sphere
00120                         {
00121                         //      std::cout<<CurrentModel->GetName()<<" Collision SPHERE/RECTANGLE with "<<ModelToCompare->GetName()<<std::endl;
00122                         }
00123                         //RECTANGLE/SPHERE
00124                         if(strcmp(ModelToCompare->GetCollisionGizmo()->GetType().data(),"class ExCGizmoRectangle *")==0
00125                                 &&strcmp(CurrentModel->GetCollisionGizmo()->GetType().data(),"class ExCGizmoSphere *")==0)//sphere with sphere
00126                         {
00127                         //      std::cout<<CurrentModel->GetName()<<" Collision RECTANGLE/SPHERE with "<<ModelToCompare->GetName()<<std::endl;
00128                         }
00129                         //RECTANGLE/RECTANGLE
00130                         if(strcmp(ModelToCompare->GetCollisionGizmo()->GetType().data(),"class ExCGizmoRectangle *")==0
00131                                 &&strcmp(CurrentModel->GetCollisionGizmo()->GetType().data(),"class ExCGizmoRectangle *")==0)//sphere with sphere
00132                         {
00133                         //      std::cout<<CurrentModel->GetName()<<" Collision RECTANGLE/RECTANGLE with "<<ModelToCompare->GetName()<<std::endl;
00134                         }
00135                 }
00136                 if(!Collision)
00137                 {
00138                         //CurrentModel->GetCollisionGizmo()->SetColor(ExCVec3D(1.0f,1.0f,1.0f));
00139                 }
00140                 ManagerModel->NextObject();
00141         }
00142 UnGuard
00143 }

void ExManager::SetAskForCommand bool  status  )  [inline, inherited]
 

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

Références ExManager::m_AskForCommand.

Référencé par ExManagerConsole::ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), ExManagerConsole::InputAction(), ExManagerNetwork::InputCommand(), ExManagerLoad::LoadSetOfFile(), et ExManagerNetwork::Say().

00087 {m_AskForCommand=status;} 

void ExManager::SetAskForExclusifCommand bool  status  )  [inline, inherited]
 

Définition à la ligne 88 du fichier ExManager.h.

Références ExManager::m_Exclusif.

Référencé par ExManagerConsole::ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), ExManagerConsole::InputAction(), ExManagerNetwork::InputCommand(), et ExManagerNetwork::Say().

00088 {m_Exclusif=status;}

void ExManager::SetFlux std::ostrstream *  consol,
ExCFluxAction action
[inherited]
 

Définition à la ligne 35 du fichier ExManager.cpp.

Références ExManager::Consol, et ExManager::FluxAction.

Référencé par SetManagerLink().

00036 {
00037         Consol=consol;
00038         FluxAction=action;
00039 }

void ExManagerCollision::SetManagerId ExManagerId Id  )  [inline]
 

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

Références ManagerId.

Référencé par SetManagerLink().

00098 {ManagerId      = Id;}

void ExManagerCollision::SetManagerModel ExManagerModel Model  )  [inline]
 

Définition à la ligne 92 du fichier ExManagerCollision.h.

Références ManagerModel.

Référencé par SetManagerLink().

00092 {ManagerModel = Model;}

void ExManager::SetStatus bool  status  )  [inline, inherited]
 

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

Références ExManager::m_Status.

Référencé par ExManagerConsole::Draw(), ExManagerConsole::ExManagerConsole(), ExManagerObjectWindow::Init(), ExManagerInterface::Init(), ExManagerConsole::InputAction(), ExManagerLoad::LoadSetOfFile(), et ExManagerConsole::SetConsoleState().

00086 {m_Status=status;}


Documentation des données imbriquées

std::ostrstream* ExManager::Consol [inherited]
 

Définition à la ligne 73 du fichier ExManager.h.

Référencé par ExManagerObject< TypeA >::Add(), ExManagerConsole::AddStringAction(), ExManagerConsole::ApplyBuffCommand(), ExManagerInputGLUT::CheckInput(), ExManagerSound::DisplayAviableInput(), ExManagerInputGLUT::DisplayAviableInput(), ExManagerLoad::DisplayFileType(), ExManagerLoad::GetFileType(), ExManagerVertexArrays::Init(), ExManagerTexture::Init(), ExManagerSound::Init(), ExManagerFog::Init(), ExManagerSound::InputAction(), ExManagerPVS::InputAction(), ExManagerParticuleSystem::InputAction(), ExManagerModel::InputAction(), ExManagerMesh::InputAction(), ExManagerMap::InputAction(), ExManagerLoad::InputAction(), ExManagerInterface::InputAction(), ExManagerFog::InputAction(), ExManagerEntity::InputAction(), ExManagerConsole::InputAction(), ExManagerCommand::InputAction(), ExManagerCamera::InputAction(), ExManagerAnimation::InputAction(), ExManagerObject< TypeA >::List(), ExManagerModel::List(), ExManagerId::List(), ExManagerConsole::ListConsoleCommand(), ExManagerTexture::Load(), ExManagerParticuleSystem::Load(), ExManagerModel::Load(), ExManagerInterface::Load(), ExManagerTexture::LoadCubeMap(), ExManagerLoad::LoadSetOfFile(), ExManagerSound::LoadSound(), ExManagerSound::PauseSound(), ExManagerSound::PlaySound(), ExManagerCommand::ProcesExCAction(), ExManagerId::RecordObject(), ExManager::SetFlux(), ExManagerSound::SetRepeatSound(), ExManagerSound::StopSound(), ExManagerConsole::UpdateConsolBuffer(), et ExManagerConsole::Write().

ExCFluxAction* ExManager::FluxAction [inherited]
 

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

Référencé par ExManagerWindow::Apply(), ExManagerCommand::ApplyAction(), ExManagerCommand::LoadExecFile(), ExManagerId::RecordObject(), ExManager::SetFlux(), et ExManagerSpecialEffect::Specialeffect().

bool ExManager::m_AskForCommand [protected, inherited]
 

Définition à la ligne 70 du fichier ExManager.h.

Référencé par ExManager::AskForCommand(), ExManagerConsole::ExManagerConsole(), et ExManager::SetAskForCommand().

bool ExManager::m_Exclusif [protected, inherited]
 

Définition à la ligne 71 du fichier ExManager.h.

Référencé par ExManager::AskForExclusifCommand(), et ExManager::SetAskForExclusifCommand().

bool ExManagerCollision::m_flag = false [static, private]
 

Définition à la ligne 26 du fichier ExManagerCollision.cpp.

Référencé par CreateSingleton().

ExManagerCollision * ExManagerCollision::m_instance = NULL [static, private]
 

Définition à la ligne 27 du fichier ExManagerCollision.cpp.

Référencé par CreateSingleton().

bool ExManager::m_Status [protected, inherited]
 

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

Référencé par ExManager::GetStatus(), et ExManager::SetStatus().

ExManagerId* ExManagerCollision::ManagerId [private]
 

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

Référencé par SetManagerId().

ExManagerModel* ExManagerCollision::ManagerModel [private]
 

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

Référencé par ResolveCollision(), et SetManagerModel().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Oct 28 12:44:01 2003 pour ExNihilo par doxygen 1.3.4