#include <ExCInterface.h>
Graphe d'héritage de la classe ExCInterface
Membres publics | |
ExCInterface (void) | |
ExCInterface (std::string FileName) | |
~ExCInterface (void) | |
bool | LoadFile (std::string FileName) |
void | SetManagerWindow (ExManagerWindow *Window) |
void | SetManagerTexture (ExManagerTexture *Texture) |
void | SetNumInterface (int num) |
int | GetNumInterface (void) |
void | ShowRegion (void) |
void | HideRegion (void) |
void | DisableInterface (void) |
void | EnableInterface (void) |
bool | GetInterfaceState (void) |
void | Draw (void) |
ExCAction | InputCommand (int command, int mousex, int mousey) |
void | SetPosition (ExCVec2D Position) |
ExCVec2D | GetPosition (void) |
void | SetFlux (std::ostrstream *consol, ExCFluxAction *action) |
void | SetIdName (ExNihilo::IdName idname) |
ExNihilo::ExId | GetId (void) |
std::string | GetName (void) |
std::string | GetFileName (void) |
std::string | GetType (void) |
void | SetId (ExNihilo::ExId Id) |
void | SetName (std::string Name) |
void | SetFileName (std::string FileName) |
void | SetType (std::string Type) |
Attributs Publics | |
std::ostrstream * | Consol |
ExCFluxAction * | FluxAction |
Attributs Protégés | |
ExCVec2D | m_Position |
ExNihilo::ExId | m_ObjectId |
std::string | m_ObjectName |
std::string | m_ObjectFileName |
std::string | m_ObjectType |
Attributs Privés | |
ExManagerWindow * | ManagerWindow |
ExManagerTexture * | ManagerTexture |
std::string | m_Texture |
std::string | m_TextureMask |
int | m_NumInterface |
int | m_DefaultResolutionX |
int | m_DefaultResolutionY |
bool | m_ShowRegion |
bool | m_State |
std::vector< ActionCommand > | m_VecActionCommand |
std::vector< ActionCommand >::iterator | m_ItVecActionCommand |
|
Définition à la ligne 26 du fichier ExCInterface.cpp. Références ExCInterface(), Guard, m_ShowRegion, m_State, ExCObject::SetName(), ExCObject::SetType(), et UnGuard. Référencé par ExCInterface(), et ~ExCInterface().
|
|
Définition à la ligne 36 du fichier ExCInterface.cpp. Références ExCInterface(), Guard, LoadFile(), m_ShowRegion, m_State, et UnGuard.
00037 { 00038 Guard(ExCInterface::ExCInterface(std::string FileName)) 00039 m_ShowRegion=true; 00040 m_State=true; 00041 LoadFile(FileName); 00042 UnGuard 00043 } |
|
Définition à la ligne 45 du fichier ExCInterface.cpp. Références ExCInterface(), Guard, et UnGuard.
00046 { 00047 Guard(ExCInterface::~ExCInterface(void)) 00048 UnGuard 00049 } |
|
Définition à la ligne 114 du fichier ExCInterface.h. Références m_State.
00114 {m_State=false;} |
|
Redéfinie à partir de ExCObject. Définition à la ligne 110 du fichier ExCInterface.cpp. Références Draw(), ExNihilo::EnterOrthoMode(), Guard, ExNihilo::LeaveOrthoMode(), m_Texture, m_TextureMask, ManagerTexture, ExManagerTexture::SetCurrentObject(), et UnGuard. Référencé par Draw().
00111 { 00112 Guard(void ExCInterface::Draw(void)) 00113 glPushMatrix(); 00114 ExNihilo::EnterOrthoMode(); 00115 00116 glEnable(GL_TEXTURE_2D); 00117 glDisable(GL_LIGHTING); 00118 glColor4f(1, 1, 1, 1); 00119 glDisable(GL_DEPTH_TEST); 00120 glBlendFunc(GL_DST_COLOR,GL_ZERO); 00121 glEnable(GL_BLEND); 00122 00123 ManagerTexture->SetCurrentObject(m_TextureMask); 00124 00125 glBegin(GL_QUADS); 00126 glTexCoord2f(0.0f, 1.0f); glVertex2f(0, 0); 00127 glTexCoord2f(0.0f, 0.0f); glVertex2f(0,glutGet(GLUT_WINDOW_HEIGHT)); 00128 glTexCoord2f(1.0f, 0.0f); glVertex2f(glutGet(GLUT_WINDOW_WIDTH),glutGet(GLUT_WINDOW_HEIGHT)); 00129 glTexCoord2f(1.0f, 1.0f); glVertex2f(glutGet(GLUT_WINDOW_WIDTH), 0); 00130 glEnd(); 00131 00132 glBlendFunc(GL_ONE,GL_ONE); 00133 ManagerTexture->SetCurrentObject(m_Texture); 00134 00135 glBegin(GL_QUADS); 00136 glTexCoord2f(0.0f, 1.0f); glVertex2f(0, 0); 00137 glTexCoord2f(0.0f, 0.0f); glVertex2f(0,glutGet(GLUT_WINDOW_HEIGHT)); 00138 glTexCoord2f(1.0f, 0.0f); glVertex2f(glutGet(GLUT_WINDOW_WIDTH),glutGet(GLUT_WINDOW_HEIGHT)); 00139 glTexCoord2f(1.0f, 1.0f); glVertex2f(glutGet(GLUT_WINDOW_WIDTH), 0); 00140 glEnd(); 00141 00142 glDisable(GL_BLEND); 00143 glDisable(GL_TEXTURE_2D); 00144 glEnable(GL_DEPTH_TEST); 00145 00146 /* 00147 if(m_ShowRegion) 00148 { 00149 int i=0; 00150 for(m_ItVecActionCommand=m_VecActionCommand.begin();m_ItVecActionCommand!=m_VecActionCommand.end();m_ItVecActionCommand++,i++) 00151 { 00152 00153 double Xup,Yup,Xdo,Ydo,cofx=1,cofy=1; 00154 //Xup=((double)m_ItVecActionCommand->m_MouseXup/m_DefaultResolutionX)*ManagerWindow->GetResolutionX(); 00155 //Yup=((double)m_ItVecActionCommand->m_MouseYup/m_DefaultResolutionY)*ManagerWindow->GetResolutionY(); 00156 //Xdo=((double)m_ItVecActionCommand->m_MouseXdown/m_DefaultResolutionX)*ManagerWindow->GetResolutionX(); 00157 //Ydo=((double)m_ItVecActionCommand->m_MouseYdown/m_DefaultResolutionY)*ManagerWindow->GetResolutionY(); 00158 00159 00160 00161 //cout<<"Current resolution X:"<<ManagerWindow->GetResolutionX()<<endl; 00162 //cout<<"Current resolution Y:"<<ManagerWindow->GetResolutionY()<<endl; 00163 //cout<<"Default X:"<<m_DefaultResolutionX<<endl; 00164 //cout<<"Default Y:"<<m_DefaultResolutionY<<endl; 00165 if(cofx==0)cofx=1; 00166 if(cofy==0)cofy=1; 00167 cofx=(ManagerWindow->GetResolutionX()/m_DefaultResolutionX); 00168 cofy=(ManagerWindow->GetResolutionY()/m_DefaultResolutionY); 00169 //cout<<"cofx :"<<cofx<<endl; 00170 //cout<<"cofy :"<<cofy<<endl; 00171 00172 00173 00174 00175 Xup=(m_ItVecActionCommand->m_MouseXup)*cofx; 00176 Yup=(m_ItVecActionCommand->m_MouseYup)*cofy; 00177 Xdo=(m_ItVecActionCommand->m_MouseXdown)*cofx; 00178 Ydo=(m_ItVecActionCommand->m_MouseYdown)*cofy; 00179 00180 if(i%1==0){glColor3f((float)i/10,1.0f-((float)i/10),1.0f);} 00181 if(i%2==0){glColor3f(1.0f,1.0f-((float)i/10),(float)1/10);} 00182 if(i%3==0){glColor3f(1.0f-((float)i/10),1.0f,(float)1/10);} 00183 glBegin(GL_LINE_LOOP); 00184 glVertex2f(Xdo,Ydo); 00185 glVertex2f(Xdo,Yup); 00186 glVertex2f(Xup,Yup); 00187 glVertex2f(Xup,Ydo); 00188 glEnd(); 00189 } 00190 } 00191 glEnable(GL_LIGHTING);*/ 00192 ExNihilo::LeaveOrthoMode(); 00193 glPopMatrix(); 00194 UnGuard 00195 } |
|
Définition à la ligne 115 du fichier ExCInterface.h. Références m_State. Référencé par ExManagerInterface::DisableInterface(), et ExManagerInterface::EnableInterface().
00115 {m_State=true;} |
|
Définition à la ligne 94 du fichier ExCObject.h. Références ExCObject::m_ObjectFileName. Référencé par ExManagerMap::InputAction().
00094 {return m_ObjectFileName;} |
|
Définition à la ligne 92 du fichier ExCObject.h. Références ExNihilo::ExId, et ExCObject::m_ObjectId. Référencé par ExCSystemeParticule::CreateNewParticle(), ExManagerModel::Load(), ExManagerMesh::Load(), ExManagerId::RecordObject(), ExCObject3D::ShowInfo(), et ExCModelMD2::ShowInfo().
00092 {return m_ObjectId;} |
|
Définition à la ligne 116 du fichier ExCInterface.h. Références m_State.
00116 {return m_State;} |
|
Définition à la ligne 93 du fichier ExCObject.h. Références ExCObject::m_ObjectName. Référencé par ExManagerTexture::Add(), ExManagerInterface::Load(), ExManagerEntity::LoadGroupe(), ExManagerId::RecordObject(), ExManagerCollision::ResolveCollision(), ExCObject3D::ShowInfo(), et ExCModelMD2::ShowInfo().
00093 {return m_ObjectName;} |
|
Définition à la ligne 110 du fichier ExCInterface.h. Références m_NumInterface.
00110 {return m_NumInterface;} |
|
Définition à la ligne 80 du fichier ExCObject2D.h. Références ExCObject2D::m_Position. Référencé par ExCWindowObject::AddObjectControl(), ExManagerObjectWindow::InputAction(), ExCWindowContent::InputCommand(), ExCWindow::RefreshPosotion(), et ExCWindow::SetWindowPosition().
00080 {return m_Position;} |
|
Définition à la ligne 95 du fichier ExCObject.h. Références ExCObject::m_ObjectType. Référencé par ExManagerId::RecordObject(), et ExManagerCollision::ResolveCollision().
00095 {return m_ObjectType;} |
|
Définition à la ligne 113 du fichier ExCInterface.h. Références m_ShowRegion. Référencé par ExManagerInterface::HideRegion().
00113 {m_ShowRegion=false;} |
|
Définition à la ligne 197 du fichier ExCInterface.cpp. Références ExManagerWindow::GetResolutionX(), ExManagerWindow::GetResolutionY(), Guard, InputCommand(), ExCAction::m_Action, m_ItVecActionCommand, ExCAction::m_NextAction, m_VecActionCommand, ManagerWindow, NOTHING, ExCAction::SetParam(), et UnGuard. Référencé par InputCommand().
00198 { 00199 Guard(ExCAction ExCInterface::InputCommand(int command,int mousex,int mousey)) 00200 int CntAct=0; 00201 ExCAction RetAct; 00202 00203 for(m_ItVecActionCommand=m_VecActionCommand.begin();m_ItVecActionCommand!=m_VecActionCommand.end();m_ItVecActionCommand++) 00204 { 00205 if(m_ItVecActionCommand->m_Command==command) 00206 { 00207 if(m_ItVecActionCommand->m_MouseXup<0) 00208 { 00209 if(CntAct>0) 00210 { 00211 ExCAction *RecursifActA; 00212 ExCAction *RecursifActB; 00213 RecursifActA=&RetAct; 00214 for(int i=0;i<CntAct;i++) 00215 { 00216 if(RecursifActA->m_NextAction==NULL) 00217 { 00218 RecursifActA->m_NextAction=new ExCAction; 00219 RecursifActB=RecursifActA->m_NextAction; 00220 RecursifActB->m_Action=m_ItVecActionCommand->m_Action; 00221 RecursifActB->SetParam(m_ItVecActionCommand->m_Param); 00222 } 00223 RecursifActA=RecursifActA->m_NextAction; 00224 } 00225 CntAct++; 00226 }else 00227 { 00228 RetAct.m_Action=m_ItVecActionCommand->m_Action; 00229 RetAct.SetParam(m_ItVecActionCommand->m_Param); 00230 CntAct++; 00231 } 00232 }else 00233 { 00234 double Xup,Yup,Xdo,Ydo,Mx,My; 00235 Xup=((double)m_ItVecActionCommand->m_MouseXup/ManagerWindow->GetResolutionX()); 00236 Yup=((double)m_ItVecActionCommand->m_MouseYup/ManagerWindow->GetResolutionY()); 00237 Xdo=((double)m_ItVecActionCommand->m_MouseXdown/ManagerWindow->GetResolutionX()); 00238 Ydo=((double)m_ItVecActionCommand->m_MouseYdown/ManagerWindow->GetResolutionY()); 00239 Mx=((double)mousex/ManagerWindow->GetResolutionX()); 00240 My=((double)mousey/ManagerWindow->GetResolutionY()); 00241 00242 /*cout<<"Resolution "<<ManagerWindow->GetResolutionX()<<" "<<ManagerWindow->GetResolutionY()<<endl; 00243 cout<<"Xup :"<<Xup<<endl; 00244 cout<<"Yup :"<<Yup<<endl; 00245 cout<<"Xdo :"<<Xdo<<endl; 00246 cout<<"Ydo :"<<Ydo<<endl; 00247 cout<<"Mx :"<<Mx<<endl; 00248 cout<<"My :"<<My<<endl; 00249 */ 00250 00251 if((Xup>Mx)&&(Xdo<Mx)&&(Ydo<My)&&(Yup>My)) 00252 { 00253 std::cout<<"clik dedans"<<std::endl; 00254 if(CntAct>0) 00255 { 00256 ExCAction *RecursifActA; 00257 ExCAction *RecursifActB; 00258 RecursifActA=&RetAct; 00259 for(int i=0;i<CntAct;i++) 00260 { 00261 if(RecursifActA->m_NextAction==NULL) 00262 { 00263 RecursifActA->m_NextAction=new ExCAction; 00264 RecursifActB=RecursifActA->m_NextAction; 00265 RecursifActB->m_Action=m_ItVecActionCommand->m_Action; 00266 RecursifActB->SetParam(m_ItVecActionCommand->m_Param); 00267 } 00268 RecursifActA=RecursifActA->m_NextAction; 00269 } 00270 CntAct++; 00271 }else 00272 { 00273 RetAct.m_Action=m_ItVecActionCommand->m_Action; 00274 RetAct.SetParam(m_ItVecActionCommand->m_Param); 00275 CntAct++; 00276 } 00277 }else 00278 { 00279 std::cout<<"click hors coordonée"<<std::endl; 00280 } 00281 } 00282 } 00283 } 00284 if(CntAct==0) 00285 { 00286 RetAct.m_Action=NOTHING; 00287 RetAct.SetParam("NULL"); 00288 } 00289 00290 return RetAct; 00291 UnGuard 00292 } |
|
Redéfinie à partir de ExCObject. Définition à la ligne 51 du fichier ExCInterface.cpp. Références ExManagerTexture::Add(), ExNihilo::ExtractIntValueFromSring(), ExNihilo::ExtracValueFromSring(), Guard, LoadFile(), ExCInterface::ActionCommand::m_Action, ExCInterface::ActionCommand::m_Command, m_DefaultResolutionX, m_DefaultResolutionY, ExCInterface::ActionCommand::m_MouseXdown, ExCInterface::ActionCommand::m_MouseXup, ExCInterface::ActionCommand::m_MouseYdown, ExCInterface::ActionCommand::m_MouseYup, ExCInterface::ActionCommand::m_Param, m_Texture, m_TextureMask, m_VecActionCommand, ManagerTexture, PREFIX, et UnGuard. Référencé par ExCInterface(), ExManagerInterface::Load(), et LoadFile().
00052 { 00053 Guard(bool ExCInterface::LoadFile(std::string FileName)) 00054 char buffer[255]; 00055 #ifdef UNIX_SRC 00056 sprintf(buffer, PREFIX "/ExNihilo/Data/Interface/%s", FileName.data()); 00057 #else 00058 sprintf(buffer, "../Data/Interface/%s", FileName.data()); 00059 #endif 00060 std::ifstream fin; 00061 std::string buffstring; 00062 char b[256]; 00063 fin.open(buffer,std::ios::in); 00064 if(fin.is_open()) 00065 { 00066 try 00067 { 00068 //----Read image 00069 memset(b,0,255); 00070 fin.getline(b,256,'\n'); 00071 m_Texture=ExNihilo::ExtracValueFromSring(b,"<Image>","<#Image>"); 00072 //----Read mask 00073 memset(b,0,255); 00074 fin.getline(b,256,'\n'); 00075 m_TextureMask=ExNihilo::ExtracValueFromSring(b,"<Mask>","<#Mask>"); 00076 //----Read resolution 00077 memset(b,0,255); 00078 fin.getline(b,256,'\n'); 00079 buffstring=ExNihilo::ExtracValueFromSring(b,"<Mask>","<#Mask>"); 00080 m_DefaultResolutionX=ExNihilo::ExtractIntValueFromSring(buffstring,"<X>","<#X>"); 00081 m_DefaultResolutionY=ExNihilo::ExtractIntValueFromSring(buffstring,"<Y>","<#Y>"); 00082 //----Read all command 00083 do 00084 { 00085 memset(b,0,255); 00086 fin.getline(b,256,'\n'); 00087 try 00088 { 00089 ActionCommand actcmd; 00090 buffstring=ExNihilo::ExtracValueFromSring(b,"<Interface_Action>","<#Interface_Action>"); 00091 actcmd.m_Action=ExNihilo::ExtractIntValueFromSring(buffstring,"<Action>","<#Action>"); 00092 actcmd.m_Command=ExNihilo::ExtractIntValueFromSring(buffstring,"<Command>","<#Command>"); 00093 actcmd.m_Param=ExNihilo::ExtracValueFromSring(buffstring,"<Param>","<#Param>"); 00094 actcmd.m_MouseXup=ExNihilo::ExtractIntValueFromSring(buffstring,"<TopX>","<#TopX>"); 00095 actcmd.m_MouseYup=ExNihilo::ExtractIntValueFromSring(buffstring,"<TopY>","<#TopY>"); 00096 actcmd.m_MouseXdown=ExNihilo::ExtractIntValueFromSring(buffstring,"<BottomX>","<#BottomX>"); 00097 actcmd.m_MouseYdown=ExNihilo::ExtractIntValueFromSring(buffstring,"<BottomY>","<#BottomY>"); 00098 m_VecActionCommand.push_back(actcmd); 00099 }catch(ExCExpStringNotFound){} 00100 }while(!fin.eof()); 00101 fin.close(); 00102 }catch(...){throw ExCExpFileReadError();} 00103 }else throw ExCExpFileNotFound(); 00104 ManagerTexture->Add(m_Texture); 00105 ManagerTexture->Add(m_TextureMask); 00106 return true; 00107 UnGuard 00108 } |
|
Définition à la ligne 98 du fichier ExCObject.h. Références ExCObject::m_ObjectFileName. Référencé par ExManagerModel::Load(), ExManagerMap::Load(), ExManagerEntity::Load(), ExCGizmoLineBezier::LoadFile(), ExCAnimation::LoadFile(), et ExManagerEntity::LoadGroupe().
00098 {m_ObjectFileName = FileName;} |
|
Définition à la ligne 66 du fichier ExCObject.cpp. Références ExCObject::Consol, et ExCObject::FluxAction. Référencé par ExManagerId::RecordObject().
00067 { 00068 Consol=consol; 00069 FluxAction=action; 00070 } |
|
Définition à la ligne 96 du fichier ExCObject.h. Références ExNihilo::ExId, et ExCObject::m_ObjectId. Référencé par ExCSystemeParticule::CreateNewParticle(), ExCObject::ExCObject(), ExManagerId::RecordObject(), et ExCObject::SetIdName().
00096 {m_ObjectId=Id;} |
|
Définition à la ligne 47 du fichier ExCObject.cpp. Références ExNihilo::IdName, ExCObject::SetId(), et ExCObject::SetName().
|
|
Définition à la ligne 107 du fichier ExCInterface.h. Références ManagerTexture. Référencé par ExManagerInterface::Load().
00107 {ManagerTexture = Texture;} |
|
Définition à la ligne 106 du fichier ExCInterface.h. Références ManagerWindow.
00106 {ManagerWindow = Window;} |
|
|
Définition à la ligne 109 du fichier ExCInterface.h. Références m_NumInterface.
00109 {m_NumInterface=num;} |
|
Redéfinie dans ExCWindowObject, et ExCWindowObject. Définition à la ligne 79 du fichier ExCObject2D.h. Références ExCObject2D::m_Position.
00079 {m_Position=Position;} |
|
|
Définition à la ligne 112 du fichier ExCInterface.h. Références m_ShowRegion. Référencé par ExManagerInterface::ShowRegion().
00112 {m_ShowRegion=true;} |
|
Redéfinie à partir de ExCObject. Définition à la ligne 97 du fichier ExCInterface.h. Référencé par ExManagerInterface::Load(). |
|
Définition à la ligne 76 du fichier ExCObject.h. Référencé par ExCAnimation::Draw(), et ExCObject::SetFlux(). |
|
Définition à la ligne 78 du fichier ExCInterface.h. Référencé par LoadFile(). |
|
Définition à la ligne 79 du fichier ExCInterface.h. Référencé par LoadFile(). |
|
Définition à la ligne 94 du fichier ExCInterface.h. Référencé par InputCommand(). |
|
Définition à la ligne 77 du fichier ExCInterface.h. Référencé par GetNumInterface(), et SetNumInterface(). |
|
Définition à la ligne 72 du fichier ExCObject.h. Référencé par ExCObject::GetFileName(), ExCTexture::LoadFile(), et ExCObject::SetFileName(). |
|
Définition à la ligne 70 du fichier ExCObject.h. Référencé par ExCObject::GetId(), et ExCObject::SetId(). |
|
Définition à la ligne 71 du fichier ExCObject.h. Référencé par ExCObject::GetName(), ExCGroupEntity::LoadFile(), ExCEntity::LoadFile(), ExCTexture::SetName(), et ExCObject::SetName(). |
|
Définition à la ligne 73 du fichier ExCObject.h. Référencé par ExCObject::GetType(), et ExCObject::SetType(). |
|
|
Définition à la ligne 80 du fichier ExCInterface.h. Référencé par ExCInterface(), HideRegion(), et ShowRegion(). |
|
Définition à la ligne 81 du fichier ExCInterface.h. Référencé par DisableInterface(), EnableInterface(), ExCInterface(), et GetInterfaceState(). |
|
Définition à la ligne 75 du fichier ExCInterface.h. Référencé par Draw(), et LoadFile(). |
|
Définition à la ligne 76 du fichier ExCInterface.h. Référencé par Draw(), et LoadFile(). |
|
Définition à la ligne 93 du fichier ExCInterface.h. Référencé par InputCommand(), et LoadFile(). |
|
Définition à la ligne 74 du fichier ExCInterface.h. Référencé par Draw(), LoadFile(), et SetManagerTexture(). |
|
Définition à la ligne 73 du fichier ExCInterface.h. Référencé par InputCommand(), et SetManagerWindow(). |