#include <ExManagerFog.h>
Public Methods | |
ExManagerFog (void) | |
~ExManagerFog (void) | |
void | SetManagerId (ExManagerId *Id) |
void | Reset (void) |
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) |
Data Fields | |
std::ostrstream * | Consol |
void(* | WriteToConsol )(const char *Label) |
Private Attributes | |
ExManagerId * | ManagerId |
GLfloat | m_FogColor [4] |
GLfloat | m_StartPoint |
GLfloat | m_EndPoint |
GLfloat | m_Density |
GLenum | m_FogAlgo |
bool | m_State |
|
Definition at line 26 of file ExManagerFog.cpp. References ExManagerFog(), Guard, Reset(), and UnGuard. Referenced by ExManagerFog(), and ~ExManagerFog().
00027 { 00028 Guard(ExManagerFog::ExManagerFog(void)) 00029 Reset(); 00030 UnGuard 00031 } |
|
Definition at line 33 of file ExManagerFog.cpp. References ExManagerFog(), Guard, and UnGuard.
00034 { 00035 Guard(ExManagerFog::~ExManagerFog(void)) 00036 UnGuard 00037 } |
|
Definition at line 65 of file ExManagerFog.cpp. References DisableFog(), Guard, m_State, and UnGuard. Referenced by DisableFog(), and ExManagerCommand::ProcessAction().
00066 { 00067 Guard(ExManagerFog::DisableFog(void)) 00068 glDisable(GL_FOG); 00069 m_State=false; 00070 UnGuard 00071 } |
|
Definition at line 51 of file ExManagerFog.cpp. References EnableFog(), Guard, m_Density, m_EndPoint, m_FogAlgo, m_FogColor, m_StartPoint, m_State, and UnGuard. Referenced by EnableFog(), and ExManagerCommand::ProcessAction().
00052 { 00053 Guard(ExManagerFog::EnableFog(void)) 00054 glEnable(GL_FOG); 00055 glFogi(GL_FOG_MODE,m_FogAlgo);//GL_EXP,GL_EXP2,GL_LINEAR 00056 glFogfv(GL_FOG_COLOR,m_FogColor); 00057 glFogf(GL_FOG_DENSITY,m_Density); 00058 glHint(GL_FOG_HINT,GL_DONT_CARE); 00059 glFogf(GL_FOG_START,m_StartPoint); 00060 glFogf(GL_FOG_END,m_EndPoint); 00061 m_State=true; 00062 UnGuard 00063 } |
|
Definition at line 92 of file ExManagerFog.h. References m_FogAlgo.
00092 {return m_FogAlgo;} |
|
Definition at line 89 of file ExManagerFog.h. References m_Density. Referenced by IncDensity().
00089 {return m_Density;} |
|
Definition at line 85 of file ExManagerFog.h. References m_EndPoint. Referenced by IncEndPoint().
00085 {return m_EndPoint;} |
|
Definition at line 77 of file ExManagerFog.h. References m_FogColor. Referenced by IncFogColorA().
00077 {return m_FogColor[3];} |
|
Definition at line 74 of file ExManagerFog.h. References m_FogColor. Referenced by IncFogColorB().
00074 {return m_FogColor[2];} |
|
Definition at line 71 of file ExManagerFog.h. References m_FogColor. Referenced by IncFogColorG().
00071 {return m_FogColor[1];} |
|
Definition at line 68 of file ExManagerFog.h. References m_FogColor. Referenced by IncFogColorR().
00068 {return m_FogColor[0];} |
|
Definition at line 81 of file ExManagerFog.h. References m_StartPoint. Referenced by IncStartPoint().
00081 {return m_StartPoint;} |
|
Definition at line 64 of file ExManagerFog.h. References m_State.
00064 {return m_State;} |
|
Definition at line 190 of file ExManagerFog.cpp. References GetDensity(), Guard, IncDensity(), SetDensity(), and UnGuard. Referenced by IncDensity().
00191 { 00192 Guard(ExManagerFog::IncDensity(float inc)) 00193 SetDensity(GetDensity()+inc); 00194 UnGuard 00195 } |
|
Definition at line 175 of file ExManagerFog.cpp. References GetEndPoint(), Guard, IncEndPoint(), SetEndPoint(), and UnGuard. Referenced by IncEndPoint().
00176 { 00177 Guard(ExManagerFog::IncEndPoint(float inc)) 00178 SetEndPoint(GetEndPoint()+inc); 00179 UnGuard 00180 } |
|
Definition at line 145 of file ExManagerFog.cpp. References GetFogColorA(), Guard, IncFogColorA(), SetFogColorA(), and UnGuard. Referenced by IncFogColorA().
00146 { 00147 Guard(ExManagerFog::IncFogColorA(float inc)) 00148 SetFogColorA(GetFogColorA()+inc); 00149 UnGuard 00150 } |
|
Definition at line 138 of file ExManagerFog.cpp. References GetFogColorB(), Guard, IncFogColorB(), SetFogColorB(), and UnGuard. Referenced by IncFogColorB().
00139 { 00140 Guard(ExManagerFog::IncFogColorB(float inc)) 00141 SetFogColorB(GetFogColorB()+inc); 00142 UnGuard 00143 } |
|
Definition at line 131 of file ExManagerFog.cpp. References GetFogColorG(), Guard, IncFogColorG(), SetFogColorG(), and UnGuard. Referenced by IncFogColorG().
00132 { 00133 Guard(ExManagerFog::IncFogColorG(float inc)) 00134 SetFogColorG(GetFogColorG()+inc); 00135 UnGuard 00136 } |
|
Definition at line 124 of file ExManagerFog.cpp. References GetFogColorR(), Guard, IncFogColorR(), SetFogColorR(), and UnGuard. Referenced by IncFogColorR().
00125 { 00126 Guard(ExManagerFog::IncFogColorR(float inc)) 00127 SetFogColorR(GetFogColorR()+inc); 00128 UnGuard 00129 } |
|
Definition at line 160 of file ExManagerFog.cpp. References GetStarPoint(), Guard, IncStartPoint(), SetStartPoint(), and UnGuard. Referenced by IncStartPoint().
00161 { 00162 Guard(ExManagerFog::IncStartPoint(float inc)) 00163 SetStartPoint(GetStarPoint()+inc); 00164 UnGuard 00165 } |
|
Definition at line 39 of file ExManagerFog.cpp. References Guard, m_State, Reset(), SetAlgo(), SetDensity(), SetEndPoint(), SetFogColor(), SetStartPoint(), and UnGuard. Referenced by ExManagerFog(), ExManagerCommand::ProcessAction(), and Reset().
00040 { 00041 Guard(ExManagerFog::Reset(void)) 00042 SetAlgo(GL_LINEAR); 00043 SetFogColor(0.2f,0.2f,0.2f,1.0f); 00044 SetStartPoint(50.0f); 00045 SetEndPoint(100.0f); 00046 SetDensity(0.30); 00047 m_State=false; 00048 UnGuard 00049 } |
|
Definition at line 197 of file ExManagerFog.cpp. References Guard, m_FogAlgo, SetAlgo(), and UnGuard. Referenced by ExManagerCommand::ProcessAction(), Reset(), and SetAlgo().
00198 { 00199 Guard(ExManagerFog::SetAlgo(GLenum algo)) 00200 switch(algo) 00201 { 00202 case GL_LINEAR: 00203 m_FogAlgo=GL_LINEAR; 00204 glFogi(GL_FOG_MODE,GL_LINEAR); 00205 break; 00206 case GL_EXP: 00207 m_FogAlgo=GL_EXP; 00208 glFogi(GL_FOG_MODE,GL_EXP); 00209 break; 00210 case GL_EXP2: 00211 m_FogAlgo=GL_EXP2; 00212 glFogi(GL_FOG_MODE,GL_EXP2); 00213 break; 00214 default : 00215 m_FogAlgo=GL_LINEAR; 00216 glFogi(GL_FOG_MODE,GL_LINEAR); 00217 break; 00218 } 00219 UnGuard 00220 } |
|
Definition at line 182 of file ExManagerFog.cpp. References Guard, m_Density, SetDensity(), and UnGuard. Referenced by IncDensity(), ExManagerCommand::ProcessAction(), Reset(), and SetDensity().
00183 { 00184 Guard(ExManagerFog::SetDensity(float P)) 00185 m_Density=P; 00186 glFogf(GL_FOG_DENSITY,m_Density); 00187 UnGuard 00188 } |
|
Definition at line 167 of file ExManagerFog.cpp. References Guard, m_EndPoint, SetEndPoint(), and UnGuard. Referenced by IncEndPoint(), ExManagerCommand::ProcessAction(), Reset(), and SetEndPoint().
00168 { 00169 Guard(ExManagerFog::SetEndPoint(float P)) 00170 m_EndPoint=P; 00171 glFogf(GL_FOG_END,m_EndPoint); 00172 UnGuard 00173 } |
|
Definition at line 74 of file ExManagerFog.cpp. References A, B, Guard, SetFogColor(), SetFogColorA(), SetFogColorB(), SetFogColorG(), SetFogColorR(), and UnGuard. Referenced by Reset(), and SetFogColor().
00075 { 00076 Guard(ExManagerFog::SetFogColor(float R,float G,float B,float A)) 00077 SetFogColorR(R); 00078 SetFogColorG(G); 00079 SetFogColorB(B); 00080 SetFogColorA(A); 00081 UnGuard 00082 } |
|
Definition at line 114 of file ExManagerFog.cpp. References A, Guard, m_FogColor, SetFogColorA(), and UnGuard. Referenced by IncFogColorA(), SetFogColor(), and SetFogColorA().
00115 { 00116 Guard(ExManagerFog::SetFogColorA(float A)) 00117 if(A>1.0f)A=1.0f; 00118 if(A<0.0f)A=0.0f; 00119 m_FogColor[3]=A; 00120 glFogfv(GL_FOG_COLOR,m_FogColor); 00121 UnGuard 00122 } |
|
Definition at line 104 of file ExManagerFog.cpp. References B, Guard, m_FogColor, SetFogColorB(), and UnGuard. Referenced by IncFogColorB(), ExManagerCommand::ProcessAction(), SetFogColor(), and SetFogColorB().
00105 { 00106 Guard(ExManagerFog::SetFogColorB(float B)) 00107 if(B>1.0f)B=1.0f; 00108 if(B<0.0f)B=0.0f; 00109 m_FogColor[2]=B; 00110 glFogfv(GL_FOG_COLOR,m_FogColor); 00111 UnGuard 00112 } |
|
Definition at line 94 of file ExManagerFog.cpp. References Guard, m_FogColor, SetFogColorG(), and UnGuard. Referenced by IncFogColorG(), ExManagerCommand::ProcessAction(), SetFogColor(), and SetFogColorG().
00095 { 00096 Guard(ExManagerFog::SetFogColorG(float G)) 00097 if(G>1.0f)G=1.0f; 00098 if(G<0.0f)G=0.0f; 00099 m_FogColor[1]=G; 00100 glFogfv(GL_FOG_COLOR,m_FogColor); 00101 UnGuard 00102 } |
|
Definition at line 84 of file ExManagerFog.cpp. References Guard, m_FogColor, SetFogColorR(), and UnGuard. Referenced by IncFogColorR(), ExManagerCommand::ProcessAction(), SetFogColor(), and SetFogColorR().
00085 { 00086 Guard(ExManagerFog::SetFogColorR(float R)) 00087 if(R>1.0f)R=1.0f; 00088 if(R<0.0f)R=0.0f; 00089 m_FogColor[0]=R; 00090 glFogfv(GL_FOG_COLOR,m_FogColor); 00091 UnGuard 00092 } |
|
Definition at line 58 of file ExManagerFog.h. Referenced by SetManagerLink().
00058 {ManagerId = Id;} |
|
Definition at line 152 of file ExManagerFog.cpp. References Guard, m_StartPoint, SetStartPoint(), and UnGuard. Referenced by IncStartPoint(), ExManagerCommand::ProcessAction(), Reset(), and SetStartPoint().
00153 { 00154 Guard(ExManagerFog::SetStartPoint(float P)) 00155 m_StartPoint=P; 00156 glFogf(GL_FOG_START,m_StartPoint); 00157 UnGuard 00158 } |
|
Definition at line 55 of file ExManagerFog.h. Referenced by SetManagerLink(). |
|
Definition at line 43 of file ExManagerFog.h. Referenced by EnableFog(), GetDensity(), and SetDensity(). |
|
Definition at line 42 of file ExManagerFog.h. Referenced by EnableFog(), GetEndPoint(), and SetEndPoint(). |
|
Definition at line 44 of file ExManagerFog.h. |
|
Definition at line 40 of file ExManagerFog.h. Referenced by EnableFog(), GetFogColorA(), GetFogColorB(), GetFogColorG(), GetFogColorR(), SetFogColorA(), SetFogColorB(), SetFogColorG(), and SetFogColorR(). |
|
Definition at line 41 of file ExManagerFog.h. Referenced by EnableFog(), GetStarPoint(), and SetStartPoint(). |
|
Definition at line 45 of file ExManagerFog.h. Referenced by DisableFog(), EnableFog(), GetState(), and Reset(). |
|
Definition at line 39 of file ExManagerFog.h. |
|
Referenced by SetManagerLink(). |