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 ExManagerTexture

#include <ExManagerTexture.h>

Graphe d'héritage de la classe ExManagerTexture

ExManagerObject< ExCTexture > ExManager

Membres publics

void Reset (void)
void Init (void)
void Reload (void)
bool Init (std::string FileName)
bool Load (std::string FileName)
bool Add (std::string FileName)
bool Add (ExCTexture object)
bool CheckExist (std::string name)
bool SetCurrentObject (std::string Name)
bool SetCurrentObject (ExNihilo::ExId id)
GLint GetTextureId (std::string Name)
GLint GetTextureId (ExNihilo::ExId id)
bool SetTexture (int Number, std::string Name)
void SetTextureCoord (int Number, float CoordU, float CoordV)
bool ResetMultitexture (void)
ExCAction InputAction (ExCAction Action)
bool LoadCubeMap (std::string FileName)
int GetMaxMultitexturingLevel (void)
int GetMaxAnisotropyLevel (void)
void SetManagerId (ExManagerId *Id)
void List (void)
virtual void Draw (void)
bool Remove (ExNihilo::ExId id)
bool Remove (std::string Name)
bool RemoveCurrentObject (void)
ExCTextureGetObject (ExNihilo::ExId id)
ExCTextureGetObject (std::string Name)
ExCTextureGetCurrentObject (void)
ExCTextureGetFirstObject (void)
ExCTextureGetLastObject (void)
ExNihilo::ExId GetFirstObjectId (void)
ExNihilo::ExId GetLasstObjectId (void)
ExNihilo::ExId NextObject (void)
ExNihilo::ExId PreviousObject (void)
unsigned int GetNumberObject (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)

Membres publics statiques

ExManagerTextureCreateSingleton (void)

Attributs Publics

std::ostrstream * Consol
ExCFluxActionFluxAction

Attributs Protégés

std::map< ExNihilo::ExId,
ExCTexture, std::less< ExNihilo::ExId > > * 
m_Map
std::map< ExNihilo::ExId,
ExCTexture, std::less< ExNihilo::ExId
> >::iterator 
m_ItMap
ExManagerIdManagerId
ExNihilo::ExId m_CurrentObjectId
bool m_Status
bool m_AskForCommand
bool m_Exclusif

Membres privés

 ExManagerTexture (void)
 ~ExManagerTexture (void)

Attributs Privés

PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB
PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB
int m_Anisotropy_level
int m_Multitexturing_level
int m_Anisotropy_max_level
int m_Multitexturing_max_level
bool m_Anisotropy
bool m_SGIS_Mimap
bool m_ARB_Multitexture
bool m_ARB_Texture_Compression
bool m_ARB_texture_env_dot3
bool m_ARB_texture_env_combine
bool m_ARB_texture_cube_map

Attributs Privés Statiques

bool m_flag = false
ExManagerTexturem_instance = NULL

Documentation des contructeurs et destructeurs

ExManagerTexture::ExManagerTexture void   )  [private]
 

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

Références ExManagerTexture(), glActiveTextureARB, glClientActiveTextureARB, glMultiTexCoord2fARB, Guard, m_Anisotropy_level, m_Anisotropy_max_level, m_Multitexturing_level, m_Multitexturing_max_level, et UnGuard.

Référencé par ExManagerTexture(), et ~ExManagerTexture().

00044 {
00045 Guard(ExManagerTexture::ExManagerTexture(void))
00046         m_Multitexturing_level=-1;      
00047         m_Anisotropy_level=-1;
00048         m_Anisotropy_max_level=-1;
00049         m_Multitexturing_max_level=-1;
00050         glMultiTexCoord2fARB = NULL;
00051         glActiveTextureARB = NULL;
00052         glClientActiveTextureARB = NULL;
00053 
00054 UnGuard
00055 }

ExManagerTexture::~ExManagerTexture void   )  [private]
 

Définition à la ligne 58 du fichier ExManagerTexture.cpp.

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

00059 {
00060 Guard(ExManagerTexture::~ExManagerTexture(void))
00061 UnGuard
00062 }


Documentation des méthodes

bool ExManagerTexture::Add ExCTexture  object  ) 
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 262 du fichier ExManagerTexture.cpp.

Références ExManagerObject< TypeA >::Add(), Add(), CheckExist(), ExCObject::GetName(), Guard, m_Anisotropy, m_Anisotropy_max_level, m_ARB_Texture_Compression, m_SGIS_Mimap, ExCTexture::SetAnisotropyLevel(), ExCTexture::SetSGISMipMap(), ExCTexture::SetTextureCompression(), et UnGuard.

00263 {
00264 Guard(ExManagerTexture::Add(ExCTexture object))
00265         if(!CheckExist(object.GetName())){return true;}
00266         object.SetAnisotropyLevel(m_Anisotropy,m_Anisotropy_max_level);
00267         object.SetSGISMipMap(m_SGIS_Mimap);
00268         object.SetTextureCompression(m_ARB_Texture_Compression);
00269         return ExManagerObject<ExCTexture>::Add(object);
00270 UnGuard
00271 }

bool ExManagerTexture::Add std::string  FileName  ) 
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 255 du fichier ExManagerTexture.cpp.

Références Add(), Guard, Load(), et UnGuard.

Référencé par Add(), Load(), ExCMeshWaterDisqueEffect::Load(), ExCMeshSummonCylenderEffect::Load(), ExCMeshSmogEffect::Load(), ExCMeshSauronEffect::Load(), LoadCubeMap(), ExCInterface::LoadFile(), ExCModelASC::ProcessLine(), et ExManagerConsole::SetConsoleBackGroudTexture().

00256 {
00257 Guard(ExManagerTexture::Add(std::string FileName))
00258         return Load(FileName);
00259 UnGuard
00260 }

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;}

bool ExManagerTexture::CheckExist std::string  name  ) 
 

Définition à la ligne 190 du fichier ExManagerTexture.cpp.

Références CheckExist(), ExManagerId::GetObjectId(), Guard, ExManagerObject< ExCTexture >::ManagerId, et UnGuard.

Référencé par Add(), CheckExist(), Load(), et LoadCubeMap().

00191 {
00192 Guard(ExManagerTexture::CheckExist(std::string  name))
00193         if(name.find(".")<name.length())//if extension remove them
00194         {
00195                 name.erase(name.find("."),name.length()-name.find("."));
00196         }
00197         if(ManagerId->GetObjectId(name,typeid(ExCTexture).name())==-1)return true;
00198         return false;
00199 UnGuard
00200 }

ExManagerTexture * ExManagerTexture::CreateSingleton void   )  [static]
 

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

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

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

00029                                                        {
00030 Guard(ExManagerTexture* ExManagerTexture::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 ExManagerTexture; // Create the error log
00035         }else
00036         {
00037                 std::cout<<"Error singleton already created"<<std::endl;
00038         }
00039         return m_instance; 
00040 UnGuard
00041 }

virtual void ExManagerObject< ExCTexture >::Draw void   )  [inline, virtual, inherited]
 

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

00101 {};

ExCTexture * ExManagerObject< ExCTexture >::GetCurrentObject void   )  [inherited]
 

ExCTexture * ExManagerObject< ExCTexture >::GetFirstObject void   )  [inherited]
 

ExNihilo::ExId ExManagerObject< ExCTexture >::GetFirstObjectId void   )  [inherited]
 

ExNihilo::ExId ExManagerObject< ExCTexture >::GetLasstObjectId void   )  [inherited]
 

ExCTexture * ExManagerObject< ExCTexture >::GetLastObject void   )  [inherited]
 

int ExManagerTexture::GetMaxAnisotropyLevel void   )  [inline]
 

Définition à la ligne 121 du fichier ExManagerTexture.h.

Références m_Anisotropy_max_level.

00121 {return m_Anisotropy_max_level;}

int ExManagerTexture::GetMaxMultitexturingLevel void   )  [inline]
 

Définition à la ligne 120 du fichier ExManagerTexture.h.

Références m_Multitexturing_max_level.

Référencé par ExCHeightMap::Load().

unsigned int ExManagerObject< ExCTexture >::GetNumberObject void   )  [inline, inherited]
 

Définition à la ligne 124 du fichier ExManagerObject.h.

00124 {return m_Map->size();}

ExCTexture * ExManagerObject< ExCTexture >::GetObject std::string  Name  )  [inherited]
 

ExCTexture * ExManagerObject< ExCTexture >::GetObject ExNihilo::ExId  id  )  [inherited]
 

Référencé par GetTextureId(), et SetCurrentObject().

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;}

GLint ExManagerTexture::GetTextureId ExNihilo::ExId  id  ) 
 

Définition à la ligne 471 du fichier ExManagerTexture.cpp.

Références ExNihilo::ExId, ExManagerObject< ExCTexture >::GetObject(), GetTextureId(), Guard, ExManagerObject< ExCTexture >::m_CurrentObjectId, ExCTexture::m_Texture, et UnGuard.

00472 {
00473 Guard(ExManagerTexture::GetTextureId(ExNihilo::ExId id))
00474         if(GetObject(id)!=NULL)
00475         {
00476                 m_CurrentObjectId=id;
00477                 try
00478                 {       
00479                         return GetObject(m_CurrentObjectId)->m_Texture;
00480                         //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00481                         }catch(...)
00482                         {
00483                                 std::cout<<"ExManagerTexture ::Exception can make :"<<m_CurrentObjectId<<" Current object"<<std::endl;
00484                                 return -1;
00485                         }
00486         }
00487         return -1;
00488 UnGuard
00489 }

GLint ExManagerTexture::GetTextureId std::string  Name  ) 
 

Définition à la ligne 446 du fichier ExManagerTexture.cpp.

Références ExManagerObject< ExCTexture >::GetObject(), ExManagerId::GetObjectId(), GetTextureId(), Guard, Load(), ExManagerObject< ExCTexture >::m_CurrentObjectId, ExCTexture::m_Texture, ExManagerObject< ExCTexture >::ManagerId, et UnGuard.

Référencé par GetTextureId(), et ExCSystemeParticule::SetParticuleTexture().

00447 {
00448 Guard(ExManagerTexture::GetTextureId(std::string Name))
00449         
00450         if(Name.find(".")<Name.length())//if extension remove them
00451         {
00452                 Name.erase(Name.find("."),Name.length()-Name.find("."));
00453         }
00454         try
00455         {       
00456                 m_CurrentObjectId=ManagerId->GetObjectId(Name,typeid(ExCTexture).name());
00457                 return GetObject(m_CurrentObjectId)->m_Texture;
00458                 //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00459         }catch(...)
00460         {
00461                 if(!Load(Name))
00462                 {
00463                         std::cout<<"ExManagerTexture ::Exception can make :"<<Name<<" Current object"<<std::endl;
00464                         return -1;
00465                 }
00466                 return -1;
00467         }
00468 UnGuard
00469 }

bool ExManagerTexture::Init std::string  FileName  ) 
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 181 du fichier ExManagerTexture.cpp.

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

00182 {
00183 Guard(bool  ExManagerTexture::Init(std::string FileName))
00184         //openf file and load object
00185 
00186         return true;
00187 UnGuard
00188 }

void ExManagerTexture::Init void   )  [virtual]
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 64 du fichier ExManagerTexture.cpp.

Références ExManager::Consol, glActiveTextureARB, glClientActiveTextureARB, glMultiTexCoord2fARB, Guard, ExManagerObject< TypeA >::Init(), Init(), m_Anisotropy, m_Anisotropy_level, m_Anisotropy_max_level, m_ARB_Multitexture, m_ARB_Texture_Compression, m_ARB_texture_cube_map, m_ARB_texture_env_dot3, m_Multitexturing_level, m_Multitexturing_max_level, m_SGIS_Mimap, et UnGuard.

Référencé par Init(), et PreInitManager().

00065 {
00066 Guard(void  ExManagerTexture::Init(void))
00067         ExManagerObject<ExCTexture>::Init();
00068         *Consol<<"****************************************"<<std::endl;
00069         *Consol<<"*ExManagerTexture Init                 *"<<std::endl;
00070         *Consol<<"****************************************"<<std::endl;
00071         char *blah = (char *) glGetString(GL_EXTENSIONS);
00072         //--------------------------------
00073         //ANISOTROPIC EXTENSION
00074         //--------------------------------
00075         if (strstr( (const char *)blah, "GL_EXT_texture_filter_anisotropic" )) 
00076         { 
00077                 glGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,&m_Anisotropy_max_level);
00078                 *Consol<<"ExManagerTexture::GL_EXT_texture_filter_anisotropic enable. Maximum level:"<<m_Anisotropy_max_level<<std::endl;
00079                 m_Anisotropy=true;
00080                 m_Anisotropy_level=m_Anisotropy_max_level;
00081         }else
00082         {
00083                 m_Anisotropy=false;
00084         }
00085 
00086         //--------------------------------
00087         //MIMAP SGIS EXTENSION
00088         //--------------------------------
00089         if (strstr( (const char *)blah, "GL_SGIS_generate_mipmap" )) 
00090         { 
00091                 *Consol<<"ExManagerTexture::GL_SGIS_generate_mipmap enable."<<std::endl;
00092                 m_SGIS_Mimap=true;
00093         }else
00094         {
00095                 *Consol<<"ExManagerTexture::GL_SGIS_generate_mipmap not supported."<<std::endl;
00096                 m_SGIS_Mimap=false;
00097         }
00098 
00099         //--------------------------------
00100         //TEXTURING COMPRESSION EXTENSION
00101         //--------------------------------
00102         if(strstr( (const char *)blah, "GL_ARB_texture_compression" ))
00103         { 
00104                 *Consol<<"ExManagerTexture::GL_ARB_texture_compression found and enable. "<<std::endl;
00105                 m_ARB_Texture_Compression=true;
00106         }else
00107         {
00108                 *Consol<<"ExManagerTexture::GL_ARB_texture_compression extension missing. "<<std::endl; 
00109                 m_ARB_Texture_Compression=false;
00110         }
00111 
00112         //--------------------------------
00113         //MULTITEXTURING EXTENSION
00114         //--------------------------------
00115         if (strstr( (const char *)blah, "GL_ARB_multitexture" )) 
00116         {
00117                 glActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)wglGetProcAddress("glActiveTextureARB");
00118                 glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC)wglGetProcAddress("glMultiTexCoord2fARB");
00119                 glClientActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress("glClientActiveTextureARB");
00120                 glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB,&m_Multitexturing_max_level);
00121                 *Consol<<"ExManagerTexture::GL_ARB_multitexture found and enable. Maximum textures:"<<m_Multitexturing_max_level<<std::endl;
00122                 m_ARB_Multitexture=true;
00123                 m_Multitexturing_level=m_Multitexturing_max_level;
00124         }else
00125         {
00126                 *Consol<<"ExManagerTexture::GL_ARB_multitexture extension missing"<<std::endl; 
00127                 m_ARB_Multitexture=false;
00128                 throw ExCExpMultitexturing();
00129         }
00130 
00131         //--------------------------------
00132         //TEXTURE ENV DOT 3
00133         //--------------------------------
00134         if (strstr( (const char *)blah, "GL_ARB_texture_env_dot3" )) 
00135         { 
00136                 *Consol<<"ExManagerTexture::GL_ARB_texture_env_dot3 enable."<<std::endl;
00137                 m_ARB_texture_env_dot3=true;
00138         }else
00139         {
00140                 *Consol<<"ExManagerTexture::GL_ARB_texture_env_dot3 not supported."<<std::endl;
00141                 m_ARB_texture_env_dot3=false;
00142         }
00143 
00144         //--------------------------------
00145         //TEXTURE ENV COMBINE
00146         //--------------------------------
00147         if (strstr( (const char *)blah, "GL_ARB_texture_env_combine" )) 
00148         { 
00149                 *Consol<<"ExManagerTexture::GL_ARB_texture_env_combine enable."<<std::endl;
00150                 m_ARB_texture_env_dot3=true;
00151         }else
00152         {
00153                 *Consol<<"ExManagerTexture::GL_ARB_texture_env_combine not supported."<<std::endl;
00154                 m_ARB_texture_env_dot3=false;
00155         }
00156 
00157         //--------------------------------
00158         //TEXTURE CUBE MAP
00159         //--------------------------------
00160         if (strstr( (const char *)blah, "GL_ARB_texture_cube_map" )) 
00161         { 
00162                 *Consol<<"ExManagerTexture::GL_ARB_texture_cube_map enable."<<std::endl;
00163                 m_ARB_texture_cube_map=true;
00164         }else
00165         {
00166                 *Consol<<"ExManagerTexture::GL_ARB_texture_cube_map not supported."<<std::endl;
00167                 m_ARB_texture_cube_map=false;
00168         }
00169 UnGuard
00170 }

ExCAction ExManagerTexture::InputAction ExCAction  Action  )  [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 492 du fichier ExManagerTexture.cpp.

Références Guard, InputAction(), ExManagerObject< ExCTexture >::List(), LIST_TEXTURE, LOAD_TEXTURE, ExCAction::m_Action, ExCAction::m_NextAction, ExCAction::m_Param, MANAGER_TEXTURE_RELOAD, NOTHING, Reload(), SAVE_TEXTURE, ExCTexture::SaveFile(), UnGuard, et UNLOAD_TEXTURE.

Référencé par InputAction(), et ExManagerCommand::ProcesExCAction().

00493 {
00494 Guard(ExCAction ExManagerTexture::InputAction(ExCAction Action))
00495         switch(Action.m_Action)
00496         {
00497         case LIST_TEXTURE:
00498                 List();
00499                 break;
00500         case LOAD_TEXTURE:
00501                 break;
00502         case UNLOAD_TEXTURE:
00503                 break;
00504         case MANAGER_TEXTURE_RELOAD: Reload();break;
00505         case SAVE_TEXTURE:
00506                 ExCTexture SaveTexture;
00507                 SaveTexture.SaveFile(Action.m_Param,ExNihilo::GetResolutionX(),ExNihilo::GetResolutionY());
00508                 break;
00509         }
00510         if(Action.m_NextAction){return *Action.m_NextAction;}
00511         else{return NOTHING;}
00512 UnGuard
00513 }

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;}

void ExManagerObject< ExCTexture >::List void   )  [inherited]
 

Référencé par InputAction().

bool ExManagerTexture::Load std::string  FileName  ) 
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 203 du fichier ExManagerTexture.cpp.

Références Add(), CheckExist(), ExManager::Consol, Guard, Load(), et UnGuard.

Référencé par Add(), GetTextureId(), ExManagerLoad::InputAction(), Load(), ExCModelMD2::Load(), ExCModel3DS::ReadFace(), SetCurrentObject(), et ExCSystemeParticule::SetParticuleTexture().

00204 {
00205 Guard(ExManagerTexture::Load(std::string FileName))
00206         if(FileName.find(".")<FileName.length())//if extension remove them
00207         {
00208                 FileName.erase(FileName.find("."),FileName.length()-FileName.find("."));
00209         }
00210         if(!CheckExist(FileName)){return true;}
00211         
00212         try
00213         {
00214                 return  Add(ExCTexture(FileName));
00215         }catch(ExCExpFileNotFound)
00216         {
00217                 *Consol<<"Exception file not found texture not added"<<std::endl;
00218                 return false;
00219         }
00220         catch(ExCExpNullPointer)
00221         {
00222                 *Consol<<"Exception null pointer texture not added"<<std::endl;
00223                 return false;
00224         }
00225         
00226 UnGuard
00227 }

bool ExManagerTexture::LoadCubeMap std::string  FileName  ) 
 

Définition à la ligne 229 du fichier ExManagerTexture.cpp.

Références Add(), CheckExist(), ExManager::Consol, Guard, LoadCubeMap(), et UnGuard.

Référencé par LoadCubeMap().

00230 {
00231 Guard(ExManagerTexture::LoadCubeMap(std::string FileName))
00232         if(FileName.find(".")<FileName.length())//if extension remove them
00233         {
00234                 FileName.erase(FileName.find("."),FileName.length()-FileName.find("."));
00235         }
00236         if(!CheckExist(FileName)){return true;}
00237         
00238         try
00239         {
00240                 return  Add(ExCTexture(FileName));
00241         }catch(ExCExpFileNotFound)
00242         {
00243                 *Consol<<"Exception file not found texture not added"<<std::endl;
00244                 return false;
00245         }
00246         catch(ExCExpNullPointer)
00247         {
00248                 *Consol<<"Exception null pointer texture not added"<<std::endl;
00249                 return false;
00250         }
00251         
00252 UnGuard
00253 }

ExNihilo::ExId ExManagerObject< ExCTexture >::NextObject void   )  [inherited]
 

ExNihilo::ExId ExManagerObject< ExCTexture >::PreviousObject void   )  [inherited]
 

void ExManagerTexture::Reload void   )  [virtual]
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 515 du fichier ExManagerTexture.cpp.

Références Guard, ExManagerObject< ExCTexture >::m_ItMap, ExManagerObject< ExCTexture >::m_Map, Reload(), et UnGuard.

Référencé par InputAction(), ExManagerCommand::ProcesExCAction(), et Reload().

00516 {
00517 Guard(void  ExManagerTexture::Reload(void))
00518         for(m_ItMap=m_Map->begin();m_ItMap!=m_Map->end();m_ItMap++)
00519         {
00520                 m_ItMap->second.LoadFile(m_ItMap->second.GetFileName());
00521         }       
00522 UnGuard
00523 }

bool ExManagerObject< ExCTexture >::Remove std::string  Name  )  [inherited]
 

bool ExManagerObject< ExCTexture >::Remove ExNihilo::ExId  id  )  [inherited]
 

bool ExManagerObject< ExCTexture >::RemoveCurrentObject void   )  [inherited]
 

void ExManagerTexture::Reset void   )  [virtual]
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 174 du fichier ExManagerTexture.cpp.

Références Guard, ExManagerObject< TypeA >::Reset(), Reset(), et UnGuard.

Référencé par ExManagerCommand::ProcesExCAction(), et Reset().

00175 {
00176 Guard(void  ExManagerTexture::Reset(void))
00177         ExManagerObject<ExCTexture>::Reset();
00178 UnGuard
00179 }

bool ExManagerTexture::ResetMultitexture void   ) 
 

Définition à la ligne 342 du fichier ExManagerTexture.cpp.

Références glActiveTextureARB, Guard, m_Multitexturing_max_level, ResetMultitexture(), et UnGuard.

Référencé par ExCModel3DS::CallAllArray(), ExManagerConsole::Draw(), ExCWindowObject::Draw(), ExCSkyBox::Draw(), ExCModelMD2::Draw(), ExCModelEXM::Draw(), ExCModel3DS::Draw(), ExCMeshSauronEffect::Draw(), ExCHeightMap::RenderArray(), ExCHeightMap::RenderHeightMap(), et ResetMultitexture().

00343 {
00344 Guard(ExManagerTexture::ResetMultitexture(void))
00345         if(m_Multitexturing_max_level>6)
00346         {
00347                 glActiveTextureARB(GL_TEXTURE7_ARB);
00348                 glDisable(GL_TEXTURE_2D);
00349         }
00350         if(m_Multitexturing_max_level>5)
00351         {
00352                 glActiveTextureARB(GL_TEXTURE6_ARB);
00353                 glDisable(GL_TEXTURE_2D);
00354         }
00355         if(m_Multitexturing_max_level>4)
00356         {
00357                 glActiveTextureARB(GL_TEXTURE5_ARB);
00358                 glDisable(GL_TEXTURE_2D);
00359         }
00360         if(m_Multitexturing_max_level>3)
00361         {
00362                 glActiveTextureARB(GL_TEXTURE4_ARB);
00363                 glDisable(GL_TEXTURE_2D);
00364         }
00365         if(m_Multitexturing_max_level>2)
00366         {
00367                 glActiveTextureARB(GL_TEXTURE3_ARB);
00368                 glDisable(GL_TEXTURE_2D);
00369         }
00370         if(m_Multitexturing_max_level>1)
00371         {
00372                 glActiveTextureARB(GL_TEXTURE2_ARB);
00373                 glDisable(GL_TEXTURE_2D);
00374         }
00375         if(m_Multitexturing_max_level>0)
00376         {
00377                 glActiveTextureARB(GL_TEXTURE1_ARB);
00378                 glDisable(GL_TEXTURE_2D);
00379         }
00380         glActiveTextureARB(GL_TEXTURE0_ARB);            
00381     glDisable(GL_TEXTURE_2D);
00382         return true;
00383 UnGuard
00384 }

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;}

bool ExManagerTexture::SetCurrentObject ExNihilo::ExId  id  ) 
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 418 du fichier ExManagerTexture.cpp.

Références ExNihilo::ExId, ExManagerObject< ExCTexture >::GetObject(), Guard, ExManagerObject< ExCTexture >::m_CurrentObjectId, m_SGIS_Mimap, SetCurrentObject(), et UnGuard.

00419 {
00420 Guard(ExManagerTexture::SetCurrentObject(ExNihilo::ExId id))
00421         if(GetObject(id)!=NULL)
00422         {
00423                 m_CurrentObjectId=id;
00424                 try
00425                 {       
00426                         glBindTexture(GL_TEXTURE_2D,GetObject(m_CurrentObjectId)->m_Texture);
00427                         if(m_SGIS_Mimap)
00428                         {
00429                                 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
00430                                 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
00431                                 glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, true);
00432                                 
00433                         }
00434                         return true;
00435                         //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00436                         }catch(...)
00437                         {
00438                                 std::cout<<"ExManagerTexture ::Exception can make :"<<m_CurrentObjectId<<" Current object"<<std::endl;
00439                                 return false;
00440                         }
00441         }
00442         return false;
00443 UnGuard
00444 }

bool ExManagerTexture::SetCurrentObject std::string  Name  ) 
 

Redéfinie à partir de ExManagerObject< ExCTexture >.

Définition à la ligne 386 du fichier ExManagerTexture.cpp.

Références ExManagerObject< ExCTexture >::GetObject(), ExManagerId::GetObjectId(), Guard, Load(), ExManagerObject< ExCTexture >::m_CurrentObjectId, m_SGIS_Mimap, ExManagerObject< ExCTexture >::ManagerId, SetCurrentObject(), et UnGuard.

Référencé par ExCModelASC::BuildList(), ExCModel3DS::BuildList(), ExManagerConsole::Draw(), ExCMeshWaterDisqueEffect::Draw(), ExCMeshSummonCylenderEffect::Draw(), ExCMeshSmogEffect::Draw(), ExCMeshFireEffect::Draw(), ExCMeshBilboarded::Draw(), ExCLoadingAnimation::Draw(), ExCInterface::Draw(), ExCSkyBox::Load(), SetCurrentObject(), ExCSystemeParticule::SetParticuleTexture(), et SetTexture().

00387 {
00388 Guard(ExManagerTexture::SetCurrentObject(std::string Name))
00389         if(Name.size()<=0)return false;
00390         if(Name.find(".")<Name.length())//if extension remove them
00391         {
00392                 Name.erase(Name.find("."),Name.length()-Name.find("."));
00393         }
00394         try
00395         {       
00396                 m_CurrentObjectId=ManagerId->GetObjectId(Name,typeid(ExCTexture).name());
00397                 glBindTexture(GL_TEXTURE_2D,GetObject(m_CurrentObjectId)->m_Texture);
00398                 if(m_SGIS_Mimap)
00399                 {
00400                         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
00401                         glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
00402                         glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, true);
00403                 }
00404                 return true;
00405                 //std::cout<<"ExManagerTexture ::"<<Name<<" Current object"<<std::endl;
00406         }catch(...)
00407         {
00408                 if(!Load(Name))
00409                 {
00410                         std::cout<<"ExManagerTexture ::Exception can make :"<<Name<<" Current object"<<std::endl;
00411                         return true;
00412                 }
00413                 return false;
00414         }
00415 UnGuard
00416 }

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 ExManagerObject< ExCTexture >::SetManagerId ExManagerId Id  )  [inline, inherited]
 

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

Référencé par SetManagerLink().

00094 {ManagerId      = Id;}

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;}

bool ExManagerTexture::SetTexture int  Number,
std::string  Name
 

Définition à la ligne 273 du fichier ExManagerTexture.cpp.

Références glActiveTextureARB, glClientActiveTextureARB, Guard, SetCurrentObject(), SetTexture(), et UnGuard.

Référencé par ExCModel3DS::CallAllArray(), ExManagerConsole::Draw(), ExCWindowObject::Draw(), ExCSkyBox::Draw(), ExCModelMD2::Draw(), ExCModelEXM::Draw(), ExCModel3DS::Draw(), ExCMeshSauronEffect::Draw(), ExCHeightMap::RenderArray(), ExCHeightMap::RenderHeightMap(), et SetTexture().

00274 {
00275 Guard(ExManagerTexture::SetTexture(int Number,std::string Name))
00276         //glActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)wglGetProcAddress("glActiveTextureARB");
00277         if(Name.size()<1)return false;
00278         switch(Number)
00279         {
00280         case 0:
00281                 glClientActiveTextureARB ( GL_TEXTURE0_ARB        ); 
00282                 glActiveTextureARB(GL_TEXTURE0_ARB);
00283                 break;
00284         case 1:
00285                 glClientActiveTextureARB ( GL_TEXTURE1_ARB        ); 
00286                 glActiveTextureARB(GL_TEXTURE1_ARB);
00287                 break;
00288         case 2:
00289                 glClientActiveTextureARB ( GL_TEXTURE2_ARB        ); 
00290                 glActiveTextureARB(GL_TEXTURE2_ARB);
00291                 break;
00292         case 3:
00293                 glClientActiveTextureARB ( GL_TEXTURE3_ARB        ); 
00294                 glActiveTextureARB(GL_TEXTURE3_ARB);
00295                 break;
00296         case 4:
00297                 glClientActiveTextureARB ( GL_TEXTURE4_ARB        ); 
00298                 glActiveTextureARB(GL_TEXTURE4_ARB);
00299                 break;
00300         case 5:
00301                 glClientActiveTextureARB ( GL_TEXTURE5_ARB        ); 
00302                 glActiveTextureARB(GL_TEXTURE5_ARB);
00303                 break;
00304         case 6:
00305                 glClientActiveTextureARB ( GL_TEXTURE6_ARB        ); 
00306                 glActiveTextureARB(GL_TEXTURE6_ARB);
00307                 break;
00308         case 7:
00309                 glClientActiveTextureARB ( GL_TEXTURE7_ARB        ); 
00310                 glActiveTextureARB(GL_TEXTURE7_ARB);
00311 
00312                 break;
00313         }
00314         glEnable(GL_TEXTURE_2D);
00315         SetCurrentObject(Name);
00316         glEnableClientState(GL_TEXTURE_COORD_ARRAY);
00317         return true;
00318 UnGuard
00319 }

void ExManagerTexture::SetTextureCoord int  Number,
float  CoordU,
float  CoordV
 

Définition à la ligne 321 du fichier ExManagerTexture.cpp.

Références glMultiTexCoord2fARB, Guard, SetTextureCoord(), et UnGuard.

Référencé par ExCMeshSauronEffect::Draw(), SetTextureCoord(), et ExCHeightMap::SetTextureCoord().

00322 {
00323 Guard(ExManagerTexture::SetTextureCoord(int Number,float CoordU,float CoordV))
00324         switch(Number)
00325         {
00326         case 0:
00327                 glMultiTexCoord2fARB ( GL_TEXTURE0_ARB,CoordU,CoordV); 
00328                 break;
00329         case 1:
00330                 glMultiTexCoord2fARB ( GL_TEXTURE1_ARB,CoordU,CoordV); 
00331                 break;
00332         case 2:
00333                 glMultiTexCoord2fARB ( GL_TEXTURE2_ARB,CoordU,CoordV); 
00334                 break;
00335         case 3:
00336                 glMultiTexCoord2fARB ( GL_TEXTURE3_ARB,CoordU,CoordV); 
00337                 break;
00338         }
00339 UnGuard
00340 }


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(), 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(), Load(), ExManagerParticuleSystem::Load(), ExManagerModel::Load(), ExManagerInterface::Load(), 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().

PFNGLACTIVETEXTUREARBPROC ExManagerTexture::glActiveTextureARB [private]
 

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

Référencé par ExManagerTexture(), Init(), ResetMultitexture(), et SetTexture().

PFNGLCLIENTACTIVETEXTUREARBPROC ExManagerTexture::glClientActiveTextureARB [private]
 

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

Référencé par ExManagerTexture(), Init(), et SetTexture().

PFNGLMULTITEXCOORD2FARBPROC ExManagerTexture::glMultiTexCoord2fARB [private]
 

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

Référencé par ExManagerTexture(), Init(), et SetTextureCoord().

bool ExManagerTexture::m_Anisotropy [private]
 

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

Référencé par Add(), et Init().

int ExManagerTexture::m_Anisotropy_level [private]
 

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

Référencé par ExManagerTexture(), et Init().

int ExManagerTexture::m_Anisotropy_max_level [private]
 

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

Référencé par Add(), ExManagerTexture(), GetMaxAnisotropyLevel(), et Init().

bool ExManagerTexture::m_ARB_Multitexture [private]
 

Définition à la ligne 80 du fichier ExManagerTexture.h.

Référencé par Init().

bool ExManagerTexture::m_ARB_Texture_Compression [private]
 

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

Référencé par Add(), et Init().

bool ExManagerTexture::m_ARB_texture_cube_map [private]
 

Définition à la ligne 84 du fichier ExManagerTexture.h.

Référencé par Init().

bool ExManagerTexture::m_ARB_texture_env_combine [private]
 

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

bool ExManagerTexture::m_ARB_texture_env_dot3 [private]
 

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

Référencé par Init().

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().

ExNihilo::ExId ExManagerObject< ExCTexture >::m_CurrentObjectId [protected, inherited]
 

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

Référencé par GetTextureId(), et SetCurrentObject().

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 ExManagerTexture::m_flag = false [static, private]
 

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

Référencé par CreateSingleton().

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

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

Référencé par CreateSingleton().

std::map< ExNihilo::ExId , ExCTexture , std::less <ExNihilo::ExId > >::iterator ExManagerObject< ExCTexture >::m_ItMap [protected, inherited]
 

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

Référencé par Reload().

std::map< ExNihilo::ExId , ExCTexture , std::less <ExNihilo::ExId > >* ExManagerObject< ExCTexture >::m_Map [protected, inherited]
 

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

Référencé par Reload().

int ExManagerTexture::m_Multitexturing_level [private]
 

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

Référencé par ExManagerTexture(), et Init().

int ExManagerTexture::m_Multitexturing_max_level [private]
 

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

Référencé par ExManagerTexture(), GetMaxMultitexturingLevel(), Init(), et ResetMultitexture().

bool ExManagerTexture::m_SGIS_Mimap [private]
 

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

Référencé par Add(), Init(), et SetCurrentObject().

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* ExManagerObject< ExCTexture >::ManagerId [protected, inherited]
 

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

Référencé par CheckExist(), GetTextureId(), et SetCurrentObject().


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:05 2003 pour ExNihilo par doxygen 1.3.4