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 ExManagerFog

#include <ExManagerFog.h>

Graphe d'héritage de la classe ExManagerFog

ExManager

Membres publics

void Reset (void)
void Init (void)
ExCAction InputCommand (ExCCommand Command)
ExCAction InputAction (ExCAction Action)
void EnableFog (void)
void DisableFog (void)
bool GetState (void)
void SetFogColor (float R, float G, float B, float A)
void SetFogColorR (float R)
float GetFogColorR (void)
void IncFogColorR (float inc)
void SetFogColorG (float G)
float GetFogColorG (void)
void IncFogColorG (float inc)
void SetFogColorB (float B)
float GetFogColorB (void)
void IncFogColorB (float inc)
void SetFogColorA (float A)
float GetFogColorA (void)
void IncFogColorA (float inc)
void SetStartPoint (float P)
float GetStarPoint (void)
void IncStartPoint (float inc)
void SetEndPoint (float P)
float GetEndPoint (void)
void IncEndPoint (float inc)
void SetDensity (float P)
float GetDensity (void)
void IncDensity (float inc)
GLenum GetAlgo (void)
void SetAlgo (GLenum algo)

Membres publics statiques

ExManagerFog * CreateSingleton (void)

Membres privés

 ExManagerFog (void)
 ~ExManagerFog (void)

Attributs Privés

GLfloat m_FogColor [4]
GLfloat m_StartPoint
GLfloat m_EndPoint
GLfloat m_Density
GLenum m_FogAlgo
bool m_State

Attributs Privés Statiques

bool m_flag = false
ExManagerFog * m_instance = NULL

Documentation des contructeurs et destructeurs

ExManagerFog void    [private]
 

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

Références ExManagerFog(), Guard, et Reset().

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

00044 {
00045 Guard(ExManagerFog::ExManagerFog(void))
00046         Reset();
00047 UnGuard
00048 }

~ExManagerFog void    [private]
 

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

Références ExManagerFog(), et Guard.

00051 {
00052 Guard(ExManagerFog::~ExManagerFog(void))
00053 UnGuard
00054 }


Documentation des méthodes

ExManagerFog * CreateSingleton void    [static]
 

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

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

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

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

void DisableFog void   
 

Définition à la ligne 83 du fichier ExManagerFog.cpp.

Références DisableFog(), Guard, et m_State.

Référencé par DisableFog(), InputAction(), et Reset().

00084 {
00085 Guard(ExManagerFog::DisableFog(void))
00086         glDisable(GL_FOG);
00087         m_State=false;
00088 UnGuard
00089 }

void EnableFog void   
 

Définition à la ligne 69 du fichier ExManagerFog.cpp.

Références EnableFog(), Guard, m_Density, m_EndPoint, m_FogAlgo, m_FogColor, m_StartPoint, et m_State.

Référencé par EnableFog(), et InputAction().

00070 {
00071 Guard(ExManagerFog::EnableFog(void))
00072         glEnable(GL_FOG);
00073         glFogi(GL_FOG_MODE,m_FogAlgo);//GL_EXP,GL_EXP2,GL_LINEAR
00074         glFogfv(GL_FOG_COLOR,m_FogColor);
00075         glFogf(GL_FOG_DENSITY,m_Density);
00076         glHint(GL_FOG_HINT,GL_DONT_CARE);
00077         glFogf(GL_FOG_START,m_StartPoint);
00078         glFogf(GL_FOG_END,m_EndPoint);
00079         m_State=true;
00080 UnGuard
00081 }

GLenum GetAlgo void    [inline]
 

Définition à la ligne 122 du fichier ExManagerFog.h.

Références m_FogAlgo.

00123 {return m_FogAlgo;}

float GetDensity void    [inline]
 

Définition à la ligne 119 du fichier ExManagerFog.h.

Références m_Density.

Référencé par IncDensity().

00120 {return m_Density;}

float GetEndPoint void    [inline]
 

Définition à la ligne 115 du fichier ExManagerFog.h.

Références m_EndPoint.

Référencé par IncEndPoint().

00116 {return m_EndPoint;}

float GetFogColorA void    [inline]
 

Définition à la ligne 107 du fichier ExManagerFog.h.

Références A, et m_FogColor.

Référencé par IncFogColorA().

00108 {return m_FogColor[3];}

float GetFogColorB void    [inline]
 

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

Références B, et m_FogColor.

Référencé par IncFogColorB().

00105 {return m_FogColor[2];}

float GetFogColorG void    [inline]
 

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

Références m_FogColor.

Référencé par IncFogColorG().

00102 {return m_FogColor[1];}

float GetFogColorR void    [inline]
 

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

Références m_FogColor.

Référencé par IncFogColorR().

00099 {return m_FogColor[0];}

float GetStarPoint void    [inline]
 

Définition à la ligne 111 du fichier ExManagerFog.h.

Références m_StartPoint.

Référencé par IncStartPoint().

00112 {return m_StartPoint;}

bool GetState void    [inline]
 

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

Références m_State.

00095 {return m_State;}

void IncDensity float    inc
 

Définition à la ligne 208 du fichier ExManagerFog.cpp.

Références GetDensity(), Guard, IncDensity(), et SetDensity().

Référencé par IncDensity().

00209 {
00210 Guard(ExManagerFog::IncDensity(float inc))
00211         SetDensity(GetDensity()+inc);
00212 UnGuard
00213 }

void IncEndPoint float    inc
 

Définition à la ligne 193 du fichier ExManagerFog.cpp.

Références GetEndPoint(), Guard, IncEndPoint(), et SetEndPoint().

Référencé par IncEndPoint().

00194 {
00195 Guard(ExManagerFog::IncEndPoint(float inc))
00196         SetEndPoint(GetEndPoint()+inc);
00197 UnGuard
00198 }

void IncFogColorA float    inc
 

Définition à la ligne 163 du fichier ExManagerFog.cpp.

Références GetFogColorA(), Guard, IncFogColorA(), et SetFogColorA().

Référencé par IncFogColorA().

00164 {
00165 Guard(ExManagerFog::IncFogColorA(float inc))
00166         SetFogColorA(GetFogColorA()+inc);
00167 UnGuard
00168 }

void IncFogColorB float    inc
 

Définition à la ligne 156 du fichier ExManagerFog.cpp.

Références GetFogColorB(), Guard, IncFogColorB(), et SetFogColorB().

Référencé par IncFogColorB().

00157 {
00158 Guard(ExManagerFog::IncFogColorB(float inc))
00159         SetFogColorB(GetFogColorB()+inc);
00160 UnGuard
00161 }

void IncFogColorG float    inc
 

Définition à la ligne 149 du fichier ExManagerFog.cpp.

Références GetFogColorG(), Guard, IncFogColorG(), et SetFogColorG().

Référencé par IncFogColorG().

00150 {
00151 Guard(ExManagerFog::IncFogColorG(float inc))
00152         SetFogColorG(GetFogColorG()+inc);
00153 UnGuard
00154 }

void IncFogColorR float    inc
 

Définition à la ligne 142 du fichier ExManagerFog.cpp.

Références GetFogColorR(), Guard, IncFogColorR(), et SetFogColorR().

Référencé par IncFogColorR().

00143 {
00144 Guard(ExManagerFog::IncFogColorR(float inc))
00145         SetFogColorR(GetFogColorR()+inc);
00146 UnGuard
00147 }

void IncStartPoint float    inc
 

Définition à la ligne 178 du fichier ExManagerFog.cpp.

Références GetStarPoint(), Guard, IncStartPoint(), et SetStartPoint().

Référencé par IncStartPoint().

00179 {
00180 Guard(ExManagerFog::IncStartPoint(float inc))
00181         SetStartPoint(GetStarPoint()+inc);
00182 UnGuard
00183 }

void Init void    [inline, virtual]
 

Redéfinie à partir de ExManager.

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

00089 {return;}

ExCAction InputAction ExCAction    Action [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 247 du fichier ExManagerFog.cpp.

Références ExManager::Consol, DisableFog(), EnableFog(), Guard, InputAction(), ExCAction::m_Action, ExCAction::m_NextAction, ExCAction::m_Param, SetAlgo(), SetDensity(), SetEndPoint(), SetFogColorB(), SetFogColorG(), SetFogColorR(), et SetStartPoint().

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

00248 {
00249 Guard(ExCAction ExManagerFog::InputAction(ExCAction Action))
00250         switch(Action.m_Action)
00251         {
00252         case ENABLE_FOG:EnableFog();break;
00253         case DISABEL_FOG:DisableFog();break;
00254         case SET_FOG_ALGO_LINEAR:SetAlgo(GL_LINEAR);break;
00255         case SET_FOG_ALGO_EXP:SetAlgo(GL_EXP);break;
00256         case SET_FOG_ALGO_EXP2:SetAlgo(GL_LINEAR);break;
00257 
00258         case SET_FOG_COLOR_R:
00259                 try
00260                 {
00261                         SetFogColorR(atof(Action.m_Param.data()));
00262                 }catch(...)
00263                 {
00264                         *Consol<<"Enter a float value"<<std::endl;
00265                 }
00266                 break;
00267 
00268         case SET_FOG_COLOR_G:
00269                 try
00270                 {
00271                         SetFogColorG(atof(Action.m_Param.data()));
00272                 }catch(...)
00273                 {
00274                         *Consol<<"Enter a float value"<<std::endl;
00275                 }
00276                 break;
00277                 
00278         case SET_FOG_COLOR_B:
00279                 try
00280                 {
00281                         SetFogColorB(atof(Action.m_Param.data()));
00282                 }catch(...)
00283                 {
00284                         *Consol<<"Enter a float value"<<std::endl;
00285                 }
00286                 break;
00287                                 
00288         case SET_FOG_START_POINT:
00289                 try
00290                 {
00291                         SetStartPoint(atof(Action.m_Param.data()));
00292                 }catch(...)
00293                 {
00294                         *Consol<<"Enter a float value"<<std::endl;
00295                 }
00296                 break;
00297                 
00298         case SET_FOG_END_POINT:
00299                 try
00300                 {
00301                         SetEndPoint(atof(Action.m_Param.data()));
00302                 }catch(...)
00303                 {
00304                         *Consol<<"Enter a float value"<<std::endl;
00305                 }
00306                 break;
00307 
00308         case SET_FOG_DENSITY:
00309                 try
00310                 {
00311                         SetDensity(atof(Action.m_Param.data()));
00312                 }catch(...)
00313                 {
00314                         *Consol<<"Enter a float value"<<std::endl;
00315                 }
00316                 break;
00317     
00318         default:
00319                 *Consol<<"Can not file action in FOG_ACTION_MAP"<<std::endl;
00320                 break;
00321         }       
00322 
00323         if(Action.m_NextAction){return *Action.m_NextAction;}
00324         else{return NOTHING;}
00325 UnGuard
00326 }

ExCAction InputCommand ExCCommand    Command [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 240 du fichier ExManagerFog.cpp.

Références Guard, et InputCommand().

Référencé par InputCommand().

00241 {
00242 Guard(ExCAction ExManagerFog::InputCommand(ExCCommand Command))
00243         return NOTHING;
00244 UnGuard
00245 }

void Reset void    [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 56 du fichier ExManagerFog.cpp.

Références DisableFog(), Guard, m_State, Reset(), SetAlgo(), SetDensity(), SetEndPoint(), SetFogColor(), et SetStartPoint().

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

00057 {
00058 Guard(ExManagerFog::Reset(void))
00059         SetAlgo(GL_LINEAR);
00060         SetFogColor(0.3f,0.3f,0.3f,0.5f);
00061         SetStartPoint(300.0f);
00062         SetEndPoint(800.0f);
00063         SetDensity(0.50);
00064         m_State=false;
00065         DisableFog();
00066 UnGuard
00067 }

void SetAlgo GLenum    algo
 

Définition à la ligne 215 du fichier ExManagerFog.cpp.

Références Guard, m_FogAlgo, et SetAlgo().

Référencé par InputAction(), Reset(), et SetAlgo().

00216 {
00217 Guard(ExManagerFog::SetAlgo(GLenum algo))
00218         switch(algo)
00219         {
00220                 case GL_LINEAR:
00221                         m_FogAlgo=GL_LINEAR;
00222                         glFogi(GL_FOG_MODE,GL_LINEAR);
00223                         break;
00224                 case GL_EXP:
00225                         m_FogAlgo=GL_EXP;
00226                         glFogi(GL_FOG_MODE,GL_EXP);
00227                         break;
00228                 case GL_EXP2:
00229                         m_FogAlgo=GL_EXP2;
00230                         glFogi(GL_FOG_MODE,GL_EXP2);
00231                         break;
00232                 default :
00233                         m_FogAlgo=GL_LINEAR;
00234                         glFogi(GL_FOG_MODE,GL_LINEAR);
00235                         break;
00236         }
00237 UnGuard
00238 }

void SetDensity float    P
 

Définition à la ligne 200 du fichier ExManagerFog.cpp.

Références Guard, m_Density, et SetDensity().

Référencé par IncDensity(), InputAction(), Reset(), et SetDensity().

00201 {
00202 Guard(ExManagerFog::SetDensity(float P))
00203         m_Density=P;
00204         glFogf(GL_FOG_DENSITY,m_Density);
00205 UnGuard
00206 }

void SetEndPoint float    P
 

Définition à la ligne 185 du fichier ExManagerFog.cpp.

Références Guard, m_EndPoint, et SetEndPoint().

Référencé par IncEndPoint(), InputAction(), Reset(), et SetEndPoint().

00186 {
00187 Guard(ExManagerFog::SetEndPoint(float P))
00188         m_EndPoint=P;
00189         glFogf(GL_FOG_END,m_EndPoint);
00190 UnGuard
00191 }

void SetFogColor float    R,
float    G,
float    B,
float    A
 

Définition à la ligne 92 du fichier ExManagerFog.cpp.

Références A, B, Guard, SetFogColor(), SetFogColorA(), SetFogColorB(), SetFogColorG(), et SetFogColorR().

Référencé par Reset(), et SetFogColor().

00093 {
00094 Guard(ExManagerFog::SetFogColor(float R,float G,float B,float A))
00095         SetFogColorR(R);
00096         SetFogColorG(G);
00097         SetFogColorB(B);
00098         SetFogColorA(A);
00099 UnGuard
00100 }

void SetFogColorA float    A
 

Définition à la ligne 132 du fichier ExManagerFog.cpp.

Références A, Guard, m_FogColor, et SetFogColorA().

Référencé par IncFogColorA(), SetFogColor(), et SetFogColorA().

00133 {
00134 Guard(ExManagerFog::SetFogColorA(float A))
00135         if(A>1.0f)A=1.0f;
00136         if(A<0.0f)A=0.0f;
00137         m_FogColor[3]=A;
00138         glFogfv(GL_FOG_COLOR,m_FogColor);
00139 UnGuard
00140 }

void SetFogColorB float    B
 

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

Références B, Guard, m_FogColor, et SetFogColorB().

Référencé par IncFogColorB(), InputAction(), SetFogColor(), et SetFogColorB().

00123 {
00124 Guard(ExManagerFog::SetFogColorB(float B))
00125         if(B>1.0f)B=1.0f;
00126         if(B<0.0f)B=0.0f;
00127         m_FogColor[2]=B;
00128         glFogfv(GL_FOG_COLOR,m_FogColor);
00129 UnGuard
00130 }

void SetFogColorG float    G
 

Définition à la ligne 112 du fichier ExManagerFog.cpp.

Références Guard, m_FogColor, et SetFogColorG().

Référencé par IncFogColorG(), InputAction(), SetFogColor(), et SetFogColorG().

00113 {
00114 Guard(ExManagerFog::SetFogColorG(float G))
00115         if(G>1.0f)G=1.0f;
00116         if(G<0.0f)G=0.0f;
00117         m_FogColor[1]=G;
00118         glFogfv(GL_FOG_COLOR,m_FogColor);
00119 UnGuard
00120 }

void SetFogColorR float    R [inline]
 

Définition à la ligne 102 du fichier ExManagerFog.cpp.

Références Guard, m_FogColor, et SetFogColorR().

Référencé par IncFogColorR(), InputAction(), SetFogColor(), et SetFogColorR().

00103 {
00104 Guard(ExManagerFog::SetFogColorR(float R))
00105         if(R>1.0f)R=1.0f;
00106         if(R<0.0f)R=0.0f;
00107         m_FogColor[0]=R;
00108         glFogfv(GL_FOG_COLOR,m_FogColor);
00109 UnGuard
00110 }

void SetStartPoint float    P
 

Définition à la ligne 170 du fichier ExManagerFog.cpp.

Références Guard, m_StartPoint, et SetStartPoint().

Référencé par IncStartPoint(), InputAction(), Reset(), et SetStartPoint().

00171 {
00172 Guard(ExManagerFog::SetStartPoint(float P))
00173         m_StartPoint=P;
00174         glFogf(GL_FOG_START,m_StartPoint);
00175 UnGuard
00176 }


Documentation des données imbriquées

GLfloat m_Density [private]
 

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

Référencé par EnableFog(), GetDensity(), et SetDensity().

GLfloat m_EndPoint [private]
 

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

Référencé par EnableFog(), GetEndPoint(), et SetEndPoint().

bool m_flag = false [static, private]
 

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

Référencé par CreateSingleton().

GLenum m_FogAlgo [private]
 

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

Référencé par EnableFog(), GetAlgo(), et SetAlgo().

GLfloat m_FogColor[4] [private]
 

Définition à la ligne 67 du fichier ExManagerFog.h.

Référencé par EnableFog(), GetFogColorA(), GetFogColorB(), GetFogColorG(), GetFogColorR(), SetFogColorA(), SetFogColorB(), SetFogColorG(), et SetFogColorR().

ExManagerFog * m_instance = NULL [static, private]
 

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

Référencé par CreateSingleton().

GLfloat m_StartPoint [private]
 

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

Référencé par EnableFog(), GetStarPoint(), et SetStartPoint().

bool m_State [private]
 

Définition à la ligne 72 du fichier ExManagerFog.h.

Référencé par DisableFog(), EnableFog(), GetState(), et Reset().


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