Main Page Namespace List Class Hierarchy Alphabetical List Data Structures File List Namespace Members Data Fields Globals

# ExCLight Class Reference

`#include <ExCLight.h>`

Inheritance diagram for ExCLight:

## Public Methods
| ExCLight (void)
| ExCLight (GLenum Number)
| ~ExCLight (void)
void | Reset (void)
void | SetLightNumber (GLenum light)
void | TurnOn (void)
void | TurnOff (void)
bool | GetState (void)
void | SetAmbiant (float R, float G, float B, float A)
void | SetAmbiantR (float R)
void | SetAmbiantG (float G)
void | SetAmbiantB (float B)
void | SetAmbiantA (float A)
float | GetAmbiantR (void)
float | GetAmbiantG (void)
float | GetAmbiantB (void)
float | GetAmbiantA (void)
void | IncAmbiantR (float inc)
void | IncAmbiantG (float inc)
void | IncAmbiantB (float inc)
void | IncAmbiantA (float inc)
void | SetDiffuse (float R, float G, float B, float A)
void | SetDiffuseR (float R)
void | SetDiffuseG (float G)
void | SetDiffuseB (float B)
void | SetDiffuseA (float A)
float | GetDiffuseR (void)
float | GetDiffuseG (void)
float | GetDiffuseB (void)
float | GetDiffuseA (void)
void | IncDiffuseR (float inc)
void | IncDiffuseG (float inc)
void | IncDiffuseB (float inc)
void | IncDiffuseA (float inc)
void | SetSpecular (float R, float G, float B, float A)
void | SetSpecularR (float R)
void | SetSpecularG (float G)
void | SetSpecularB (float B)
void | SetSpecularA (float A)
float | GetSpecularR (void)
float | GetSpecularG (void)
float | GetSpecularB (void)
float | GetSpecularA (void)
void | IncSpecularR (float inc)
void | IncSpecularG (float inc)
void | IncSpecularB (float inc)
void | IncSpecularA (float inc)
void | SetPosition (double X, double Y, double Z)
void | SetPosition (double X, double Y, double Z, double W)
void | SetPositionX (double X)
void | SetPositionY (double Y)
void | SetPositionZ (double Z)
void | SetPositionW (double W)
float | GetPositionX (void)
float | GetPositionY (void)
float | GetPositionZ (void)
void | IncPositionX (float inc)
void | IncPositionY (float inc)
void | IncPositionZ (float inc)
void | SetTarget (double X, double Y, double Z)
void | SetTargetX (double X)
void | SetTargetY (double Y)
void | SetTargetZ (double Z)
float | GetTargetX (void)
float | GetTargetY (void)
float | GetTargetZ (void)
void | IncTargetX (float inc)
void | IncTargetY (float inc)
void | IncTargetnZ (float inc)
void | SetSpotExponent (float Exponent)
void | IncSpotExponent (float inc)
float | GetSpotExponent (void)
void | SetSpotCutOff (float cut)
void | IncSpotCutOff (float inc)
float | GetSpotCutOff (void)
void | SetConstantAttenuation (float att)
void | IncConstantAttenuation (float inc)
float | GetConstantAttenuation (void)
void | SetLinearAttenuation (float att)
void | IncLinearAttenuation (float inc)
float | GetLinearAttenuation (void)
void | SetQuadraticAttenuation (float att)
void | IncQuadraticAttenuation (float inc)
float | GetQuadraticAttenuation (void)
## Protected Attributes
GLenum | m_LightNumber
bool | m_State
float | m_ambiant [4]
float | m_diffuse [4]
float | m_specular [4]
float | m_spotExponent [1]
float | m_spotCutOff [1]
float | m_spotConstentAtt [1]
float | m_spotLinearAtt [1]
float | m_spotQuadraticAtt [1]

## Constructor & Destructor Documentation

ExCLight | ( | void |  | ) |

| Definition at line 26 of file ExCLight.cpp. References ExCLight(), Guard, m_LightNumber, Reset(), ExCObject::SetName(), and ExCObject::SetType(). Referenced by ExCLight(), and ~ExCLight().
    00027 {
    00028 Guard(ExCLight::ExCLight())
    00029         Reset();
    00030         m_LightNumber=0;
    00031         SetName("ExCLight");
    00032         SetType(typeid(this).name());
    00033 UnGuard
    00034 }

ExCLight | ( | GLenum | Number | ) |

| Definition at line 36 of file ExCLight.cpp. References ExCLight(), Guard, m_LightNumber, and Reset().
    00037 {
    00038 Guard(ExCLight::ExCLight(GLenum Number))
    00039         Reset();
    00040         m_LightNumber=Number;
    00041 UnGuard
    00042 }

~ExCLight | ( | void |  | ) |

| Definition at line 44 of file ExCLight.cpp. References ExCLight(), and Guard.
    00045 {
    00046 Guard(ExCLight::~ExCLight(void))
    00047 UnGuard
    00048 }

## Member Function Documentation

float GetAmbiantA | ( | void |  | ) |

| Definition at line 164 of file ExCLight.cpp. References GetAmbiantA(), Guard, and m_ambiant. Referenced by GetAmbiantA(), and IncAmbiantA().
    00165 {
    00166 Guard(float ExCLight::GetAmbiantA(void))
    00167         return m_ambiant[3];
    00168 UnGuard
    00169 }

float GetAmbiantB | ( | void |  | ) |

| Definition at line 157 of file ExCLight.cpp. References GetAmbiantB(), Guard, and m_ambiant. Referenced by GetAmbiantB(), and IncAmbiantB().
    00158 {
    00159 Guard(float ExCLight::GetAmbiantB(void))
    00160         return m_ambiant[2];
    00161 UnGuard
    00162 }

float GetAmbiantG | ( | void |  | ) |

| Definition at line 150 of file ExCLight.cpp. References GetAmbiantG(), Guard, and m_ambiant. Referenced by GetAmbiantG(), and IncAmbiantG().
    00151 {
    00152 Guard(float ExCLight::GetAmbiantG(void))
    00153         return m_ambiant[1];
    00154 UnGuard
    00155 }

float GetAmbiantR | ( | void |  | ) |

| Definition at line 143 of file ExCLight.cpp. References GetAmbiantR(), Guard, and m_ambiant. Referenced by GetAmbiantR(), and IncAmbiantR().
    00144 {
    00145 Guard(float ExCLight::GetAmbiantR(void))
    00146         return m_ambiant[0];
    00147 UnGuard
    00148 }

float GetConstantAttenuation | ( | void |  | ) |

| Definition at line 551 of file ExCLight.cpp. References GetConstantAttenuation(), Guard, and m_spotConstentAtt. Referenced by GetConstantAttenuation(), and IncConstantAttenuation().
    00552 {
    00553 Guard(float ExCLight::GetConstantAttenuation(void))
    00554         return m_spotConstentAtt[0];
    00555 UnGuard
    00556 }

float GetDiffuseA | ( | void |  | ) |

| Definition at line 266 of file ExCLight.cpp. References GetDiffuseA(), Guard, and m_diffuse. Referenced by GetDiffuseA(), and IncDiffuseA().
    00267 {
    00268 Guard(float ExCLight::GetDiffuseA(void))
    00269         return m_diffuse[3];
    00270 UnGuard
    00271 }

float GetDiffuseB | ( | void |  | ) |

| Definition at line 259 of file ExCLight.cpp. References GetDiffuseB(), Guard, and m_diffuse. Referenced by GetDiffuseB(), and IncDiffuseB().
    00260 {
    00261 Guard(float ExCLight::GetDiffuseB(void))
    00262         return m_diffuse[2];
    00263 UnGuard
    00264 }

float GetDiffuseG | ( | void |  | ) |

| Definition at line 252 of file ExCLight.cpp. References GetDiffuseG(), Guard, and m_diffuse. Referenced by GetDiffuseG(), and IncDiffuseG().
    00253 {
    00254 Guard(float ExCLight::GetDiffuseG(void))
    00255         return m_diffuse[1];
    00256 UnGuard
    00257 }

float GetDiffuseR | ( | void |  | ) |

| Definition at line 245 of file ExCLight.cpp. References GetDiffuseR(), Guard, and m_diffuse. Referenced by GetDiffuseR(), and IncDiffuseR().
    00246 {
    00247 Guard(float ExCLight::GetDiffuseR(void))
    00248         return m_diffuse[0];
    00249 UnGuard
    00250 }

float GetLinearAttenuation | ( | void |  | ) |

| Definition at line 574 of file ExCLight.cpp. References GetLinearAttenuation(), Guard, and m_spotLinearAtt. Referenced by GetLinearAttenuation(), and IncLinearAttenuation().
    00575 {
    00576 Guard(float ExCLight::GetLinearAttenuation(void))
    00577         return m_spotLinearAtt[0];
    00578 UnGuard
    00579 }

float GetPositionX | ( | void |  | ) | `[inline]`

| Definition at line 115 of file ExCLight.h. Referenced by IncPositionY().
    00116 {return m_Position.GetX();}

float GetPositionY | ( | void |  | ) | `[inline]`

| Definition at line 116 of file ExCLight.h. References ExCVec3D::GetX(), and ExCObject3D::m_Position. Referenced by IncPositionZ().
    00116 {return m_Position.GetX();}

float GetPositionZ | ( | void |  | ) | `[inline]`

| Definition at line 117 of file ExCLight.h. References ExCVec3D::GetY(), and ExCObject3D::m_Position.
    00117 {return m_Position.GetY();}

float GetQuadraticAttenuation | ( | void |  | ) |

| Definition at line 597 of file ExCLight.cpp. References GetQuadraticAttenuation(), Guard, and m_spotQuadraticAtt. Referenced by GetQuadraticAttenuation(), and IncQuadraticAttenuation().
    00598 {
    00599 Guard(float ExCLight::GetQuadraticAttenuation(void))
    00600         return m_spotQuadraticAtt[1];
    00601 UnGuard
    00602 }

float GetSpecularA | ( | void |  | ) |

| Definition at line 368 of file ExCLight.cpp. References GetSpecularA(), Guard, and m_specular. Referenced by GetSpecularA(), and IncSpecularA().
    00369 {
    00370 Guard(float ExCLight::GetSpecularA(void))
    00371         return m_specular[3];
    00372 UnGuard
    00373 }

float GetSpecularB | ( | void |  | ) |

| Definition at line 361 of file ExCLight.cpp. References GetSpecularB(), Guard, and m_specular. Referenced by GetSpecularB(), and IncSpecularB().
    00362 {
    00363 Guard(float ExCLight::GetSpecularB(void))
    00364         return m_specular[2];
    00365 UnGuard
    00366 }

float GetSpecularG | ( | void |  | ) |

| Definition at line 354 of file ExCLight.cpp. References GetSpecularG(), Guard, and m_specular. Referenced by GetSpecularG(), and IncSpecularG().
    00355 {
    00356 Guard(float ExCLight::GetSpecularG(void))
    00357         return m_specular[1];
    00358 UnGuard
    00359 }

float GetSpecularR | ( | void |  | ) |

| Definition at line 347 of file ExCLight.cpp. References GetSpecularR(), Guard, and m_specular. Referenced by GetSpecularR(), and IncSpecularR().
    00348 {
    00349 Guard(float ExCLight::GetSpecularR(void))
    00350         return m_specular[0];
    00351 UnGuard
    00352 }

float GetSpotCutOff | ( | void |  | ) |

| Definition at line 528 of file ExCLight.cpp. References GetSpotCutOff(), Guard, and m_spotCutOff. Referenced by GetSpotCutOff(), and IncSpotCutOff().
    00529 {
    00530 Guard(float ExCLight::GetSpotCutOff(void))
    00531         return m_spotCutOff[0];
    00532 UnGuard
    00533 }

float GetSpotExponent | ( | void |  | ) |

| Definition at line 496 of file ExCLight.cpp. References GetSpotExponent(), Guard, and m_spotExponent. Referenced by GetSpotExponent(), and IncSpotExponent().
    00497 {
    00498 Guard(float ExCLight::GetSpotExponent(void))
    00499         return m_spotExponent[0];
    00500 UnGuard
    00501 }

bool GetState | ( | void |  | ) | `[inline]`

| Definition at line 65 of file ExCLight.h. References m_State.
    00066 {return m_State;}

float GetTargetX | ( | void |  | ) | `[inline]`

| Definition at line 126 of file ExCLight.h. Referenced by IncTargetY().
    00127 {return m_Target.GetX();}

float GetTargetY | ( | void |  | ) | `[inline]`

| Definition at line 127 of file ExCLight.h. References ExCVec3D::GetX(), and ExCObject3D::m_Target. Referenced by IncTargetnZ().
    00127 {return m_Target.GetX();}

float GetTargetZ | ( | void |  | ) | `[inline]`

| Definition at line 128 of file ExCLight.h. References ExCVec3D::GetY(), and ExCObject3D::m_Target.
    00128 {return m_Target.GetY();}

void IncAmbiantA | ( | float | inc | ) |

| Definition at line 192 of file ExCLight.cpp. References GetAmbiantA(), Guard, IncAmbiantA(), and SetAmbiantA(). Referenced by IncAmbiantA().
    00193 {
    00194 Guard(void ExCLight::IncAmbiantA(float inc))
    00195         SetAmbiantA(GetAmbiantA()+inc);
    00196 UnGuard
    00197 }

void IncAmbiantB | ( | float | inc | ) |

| Definition at line 185 of file ExCLight.cpp. References GetAmbiantB(), Guard, IncAmbiantB(), and SetAmbiantB(). Referenced by IncAmbiantB().
    00186 {
    00187 Guard(void ExCLight::IncAmbiantB(float inc))
    00188         SetAmbiantB(GetAmbiantB()+inc);
    00189 UnGuard
    00190 }

void IncAmbiantG | ( | float | inc | ) |

| Definition at line 178 of file ExCLight.cpp. References GetAmbiantG(), Guard, IncAmbiantG(), and SetAmbiantG(). Referenced by IncAmbiantG().
    00179 {
    00180 Guard(void ExCLight::IncAmbiantG(float inc))
    00181         SetAmbiantG(GetAmbiantG()+inc);
    00182 UnGuard
    00183 }

void IncAmbiantR | ( | float | inc | ) |

| Definition at line 171 of file ExCLight.cpp. References GetAmbiantR(), Guard, IncAmbiantR(), and SetAmbiantR(). Referenced by IncAmbiantR().
    00172 {
    00173 Guard(void ExCLight::IncAmbiantR(float inc))
    00174         SetAmbiantR(GetAmbiantR()+inc);
    00175 UnGuard
    00176 }

void IncConstantAttenuation | ( | float | inc | ) |

| Definition at line 544 of file ExCLight.cpp. References GetConstantAttenuation(), Guard, IncConstantAttenuation(), and SetConstantAttenuation(). Referenced by IncConstantAttenuation().
    00545 {
    00546 Guard(void ExCLight::IncConstantAttenuation(float inc))
    00547         SetConstantAttenuation(GetConstantAttenuation()+inc);
    00548 UnGuard
    00549 }

void IncDiffuseA | ( | float | inc | ) |

| Definition at line 294 of file ExCLight.cpp. References GetDiffuseA(), Guard, IncDiffuseA(), and SetDiffuseA(). Referenced by IncDiffuseA().
    00295 {
    00296 Guard(void ExCLight::IncDiffuseA(float inc))
    00297         SetDiffuseA(GetDiffuseA()+inc);
    00298 UnGuard
    00299 }

void IncDiffuseB | ( | float | inc | ) |

| Definition at line 287 of file ExCLight.cpp. References GetDiffuseB(), Guard, IncDiffuseB(), and SetDiffuseB(). Referenced by IncDiffuseB().
    00288 {
    00289 Guard(void ExCLight::IncDiffuseB(float inc))
    00290         SetDiffuseB(GetDiffuseB()+inc);
    00291 UnGuard
    00292 }

void IncDiffuseG | ( | float | inc | ) |

| Definition at line 280 of file ExCLight.cpp. References GetDiffuseG(), Guard, IncDiffuseG(), and SetDiffuseG(). Referenced by IncDiffuseG().
    00281 {
    00282 Guard(void ExCLight::IncDiffuseG(float inc))
    00283         SetDiffuseG(GetDiffuseG()+inc);
    00284 UnGuard
    00285 }

void IncDiffuseR | ( | float | inc | ) |

| Definition at line 273 of file ExCLight.cpp. References GetDiffuseR(), Guard, IncDiffuseR(), and SetDiffuseR(). Referenced by IncDiffuseR().
    00274 {
    00275 Guard(void ExCLight::IncDiffuseR(float inc))
    00276         SetDiffuseR(GetDiffuseR()+inc);
    00277 UnGuard
    00278 }

void IncLinearAttenuation | ( | float | inc | ) |

| Definition at line 567 of file ExCLight.cpp. References GetLinearAttenuation(), Guard, IncLinearAttenuation(), and SetLinearAttenuation(). Referenced by IncLinearAttenuation().
    00568 {
    00569 Guard(void ExCLight::IncLinearAttenuation(float inc))
    00570         SetLinearAttenuation(GetLinearAttenuation()+inc);
    00571 UnGuard
    00572 }

void IncPositionX | ( | float | inc | ) | `[inline]`

| Definition at line 118 of file ExCLight.h. References ExCVec3D::GetZ(), and ExCObject3D::m_Position.
    00118 {return m_Position.GetZ();}

void IncPositionY | ( | float | inc | ) | `[inline]`

| Definition at line 119 of file ExCLight.h. References GetPositionX(), and SetPositionX().
    00119 {SetPositionX(GetPositionX()+inc);}

void IncPositionZ | ( | float | inc | ) | `[inline]`

| Definition at line 120 of file ExCLight.h. References GetPositionY(), and SetPositionY().
    00120 {SetPositionY(GetPositionY()+inc);}

void IncQuadraticAttenuation | ( | float | inc | ) |

| Definition at line 590 of file ExCLight.cpp. References GetQuadraticAttenuation(), Guard, IncQuadraticAttenuation(), and SetQuadraticAttenuation(). Referenced by IncQuadraticAttenuation().
    00591 {
    00592 Guard(void ExCLight::IncQuadraticAttenuation(float inc))
    00593         SetQuadraticAttenuation(GetQuadraticAttenuation()+inc);
    00594 UnGuard
    00595 }

void IncSpecularA | ( | float | inc | ) |

| Definition at line 396 of file ExCLight.cpp. References GetSpecularA(), Guard, IncSpecularA(), and SetSpecularA(). Referenced by IncSpecularA().
    00397 {
    00398 Guard(void ExCLight::IncSpecularA(float inc))
    00399         SetSpecularA(GetSpecularA()+inc);
    00400 UnGuard
    00401 }

void IncSpecularB | ( | float | inc | ) |

| Definition at line 389 of file ExCLight.cpp. References GetSpecularB(), Guard, IncSpecularB(), and SetSpecularB(). Referenced by IncSpecularB().
    00390 {
    00391 Guard(void ExCLight::IncSpecularB(float inc))
    00392         SetSpecularB(GetSpecularB()+inc);
    00393 UnGuard
    00394 }

void IncSpecularG | ( | float | inc | ) |

| Definition at line 382 of file ExCLight.cpp. References GetSpecularG(), Guard, IncSpecularG(), and SetSpecularG(). Referenced by IncSpecularG().
    00383 {
    00384 Guard(void ExCLight::IncSpecularG(float inc))
    00385         SetSpecularG(GetSpecularG()+inc);
    00386 UnGuard
    00387 }

void IncSpecularR | ( | float | inc | ) |

| Definition at line 375 of file ExCLight.cpp. References GetSpecularR(), Guard, IncSpecularR(), and SetSpecularR(). Referenced by IncSpecularR().
    00376 {
    00377 Guard(void ExCLight::IncSpecularR(float inc))
    00378         SetSpecularR(GetSpecularR()+inc);
    00379 UnGuard
    00380 }

void IncSpotCutOff | ( | float | inc | ) |

| Definition at line 521 of file ExCLight.cpp. References GetSpotCutOff(), Guard, IncSpotCutOff(), and SetSpotCutOff(). Referenced by IncSpotCutOff().
    00522 {
    00523 Guard(void ExCLight::IncSpotCutOff(float inc))
    00524         SetSpotCutOff(GetSpotCutOff()+inc);
    00525 UnGuard
    00526 }

void IncSpotExponent | ( | float | inc | ) |

| Definition at line 489 of file ExCLight.cpp. References GetSpotExponent(), Guard, IncSpotExponent(), and SetSpotExponent(). Referenced by IncSpotExponent().
    00490 {
    00491 Guard(void ExCLight::IncSpotExponent(float inc))
    00492         SetSpotExponent(GetSpotExponent()+inc);
    00493 UnGuard
    00494 }

void IncTargetnZ | ( | float | inc | ) | `[inline]`

| Definition at line 131 of file ExCLight.h. References GetTargetY(), and SetTargetY().
    00131 {SetTargetY(GetTargetY()+inc);}

void IncTargetX | ( | float | inc | ) | `[inline]`

| Definition at line 129 of file ExCLight.h. References ExCVec3D::GetZ(), and ExCObject3D::m_Target.
    00129 {return m_Target.GetZ();}

void IncTargetY | ( | float | inc | ) | `[inline]`

| Definition at line 130 of file ExCLight.h. References GetTargetX(), and SetTargetX().
    00130 {SetTargetX(GetTargetX()+inc);}

void Reset | ( | void |  | ) |

| Definition at line 50 of file ExCLight.cpp. References Guard, ExCObject3D::m_AngleX, ExCObject3D::m_AngleY, ExCObject3D::m_AngleZ, ExCObject3D::m_Position, m_State, ExCObject3D::m_Target, Reset(), SetAmbiant(), SetConstantAttenuation(), SetDiffuse(), SetLinearAttenuation(), SetQuadraticAttenuation(), SetSpecular(), SetSpotCutOff(), SetSpotExponent(), ExCVec3D::SetX(), ExCVec3D::SetY(), and ExCVec3D::SetZ(). Referenced by ExCLight(), and Reset().
    00051 {
    00052 Guard(ExCLight::Reset(void))
    00053         m_AngleX=0;
    00054         m_AngleY=0;
    00055         m_AngleZ=0;
    00056         m_State=false;
    00057         SetAmbiant(0.0f,0.0f,0.0f,1.0f);
    00058         SetDiffuse(1.0f,1.0f,1.0f,1.0f);
    00059         SetSpecular(1.0f,1.0f,1.0f,1.0f);
    00060         m_Position.SetX(0.0f);
    00061         m_Position.SetY(0.0f);
    00062         m_Position.SetZ(0.0f);
    00063         m_Target.SetX(0.0f);
    00064         m_Target.SetY(0.0f);
    00065         m_Target.SetZ(-1.0f);
    00066         SetSpotExponent(0.0f);
    00067         SetSpotCutOff(180.0f);
    00068         SetConstantAttenuation(1.0f);
    00069         SetLinearAttenuation(0.0f);
    00070         SetQuadraticAttenuation(0.0f);
    00071 UnGuard
    00072 }

void SetAmbiant | ( | float | R,
|  | float | G,
|  | float | B,
|  | float | A
| ) |

| Definition at line 97 of file ExCLight.cpp. References A, B, Guard, SetAmbiant(), SetAmbiantA(), SetAmbiantB(), SetAmbiantG(), and SetAmbiantR(). Referenced by Reset(), and SetAmbiant().
    00098 {
    00099 Guard(void ExCLight::SetAmbiant(float R,float G,float B,float A))
    00100         SetAmbiantR(R);
    00101         SetAmbiantG(G);
    00102         SetAmbiantB(B);
    00103         SetAmbiantA(A);
    00104 UnGuard
    00105 }

void SetAmbiantA | ( | float | A | ) |

| Definition at line 134 of file ExCLight.cpp. References A, Guard, m_ambiant, m_LightNumber, and SetAmbiantA(). Referenced by IncAmbiantA(), SetAmbiant(), and SetAmbiantA().
    00135 {
    00136 Guard(void ExCLight::SetAmbiantA(float A))
    00137         if(A>1)A=1.0f;if(A<0.0f)A=0.0f;
    00138         m_ambiant[3]=A;
    00139         glLightfv(m_LightNumber,GL_AMBIENT,m_ambiant);
    00140 UnGuard
    00141 }

void SetAmbiantB | ( | float | B | ) |

| Definition at line 125 of file ExCLight.cpp. References B, Guard, m_ambiant, m_LightNumber, and SetAmbiantB(). Referenced by IncAmbiantB(), SetAmbiant(), and SetAmbiantB().
    00126 {
    00127 Guard(void ExCLight::SetAmbiantB(float B))
    00128         if(B>1)B=1.0f;if(B<0.0f)B=0.0f;
    00129         m_ambiant[2]=B;
    00130         glLightfv(m_LightNumber,GL_AMBIENT,m_ambiant);
    00131 UnGuard
    00132 }

void SetAmbiantG | ( | float | G | ) |

| Definition at line 116 of file ExCLight.cpp. References Guard, m_ambiant, m_LightNumber, and SetAmbiantG(). Referenced by IncAmbiantG(), SetAmbiant(), and SetAmbiantG().
    00117 {
    00118 Guard(void ExCLight::SetAmbiantG(float G))
    00119         if(G>1)G=1.0f;if(G<0.0f)G=0.0f;
    00120         m_ambiant[1]=G;
    00121         glLightfv(m_LightNumber,GL_AMBIENT,m_ambiant);
    00122 UnGuard
    00123 }

void SetAmbiantR | ( | float | R | ) |

| Definition at line 107 of file ExCLight.cpp. References Guard, m_ambiant, m_LightNumber, and SetAmbiantR(). Referenced by IncAmbiantR(), SetAmbiant(), and SetAmbiantR().
    00108 {
    00109 Guard(void ExCLight::SetAmbiantR(float R))
    00110         if(R>1)R=1.0f;if(R<0.0f)R=0.0f;
    00111         m_ambiant[0]=R;
    00112         glLightfv(m_LightNumber,GL_AMBIENT,m_ambiant);
    00113 UnGuard
    00114 }

void SetConstantAttenuation | ( | float | att | ) |

| Definition at line 535 of file ExCLight.cpp. References Guard, m_LightNumber, m_spotConstentAtt, and SetConstantAttenuation(). Referenced by IncConstantAttenuation(), Reset(), and SetConstantAttenuation().
    00536 {
    00537 Guard(void ExCLight::SetConstantAttenuation(float att))
    00538         if(att<0)att=0.0f;if(att>5)att=5.0f;
    00539         m_spotConstentAtt[0]=att;
    00540         glLightfv(m_LightNumber,GL_CONSTANT_ATTENUATION,m_spotConstentAtt);
    00541 UnGuard
    00542 }

void SetDiffuse | ( | float | R,
|  | float | G,
|  | float | B,
|  | float | A
| ) |

| Definition at line 199 of file ExCLight.cpp. References A, B, Guard, SetDiffuse(), SetDiffuseA(), SetDiffuseB(), SetDiffuseG(), and SetDiffuseR(). Referenced by Reset(), and SetDiffuse().
    00200 {
    00201 Guard(void ExCLight::SetDiffuse(float R,float G,float B,float A))
    00202         SetDiffuseR(R);
    00203         SetDiffuseG(G);
    00204         SetDiffuseB(B);
    00205         SetDiffuseA(A);
    00206 UnGuard
    00207 }

void SetDiffuseA | ( | float | A | ) |

| Definition at line 236 of file ExCLight.cpp. References A, Guard, m_diffuse, m_LightNumber, and SetDiffuseA(). Referenced by IncDiffuseA(), SetDiffuse(), and SetDiffuseA().
    00237 {
    00238 Guard(void ExCLight::SetDiffuseA(float A))
    00239         if(A>1)A=1.0f;if(A<0.0f)A=0.0f;
    00240         m_diffuse[3]=A;
    00241         glLightfv(m_LightNumber,GL_DIFFUSE,m_diffuse);
    00242 UnGuard
    00243 }

void SetDiffuseB | ( | float | B | ) |

| Definition at line 227 of file ExCLight.cpp. References B, Guard, m_diffuse, m_LightNumber, and SetDiffuseB(). Referenced by IncDiffuseB(), SetDiffuse(), and SetDiffuseB().
    00228 {
    00229 Guard(void ExCLight::SetDiffuseB(float B))
    00230         if(B>1)B=1.0f;if(B<0.0f)B=0.0f;
    00231         m_diffuse[2]=B;
    00232         glLightfv(m_LightNumber,GL_DIFFUSE,m_diffuse);
    00233 UnGuard
    00234 }

void SetDiffuseG | ( | float | G | ) |

| Definition at line 218 of file ExCLight.cpp. References Guard, m_diffuse, m_LightNumber, and SetDiffuseG(). Referenced by IncDiffuseG(), SetDiffuse(), and SetDiffuseG().
    00219 {
    00220 Guard(void ExCLight::SetDiffuseG(float G))
    00221         if(G>1)G=1.0f;if(G<0.0f)G=0.0f;
    00222         m_diffuse[1]=G;
    00223         glLightfv(m_LightNumber,GL_DIFFUSE,m_diffuse);
    00224 UnGuard
    00225 }

void SetDiffuseR | ( | float | R | ) |

| Definition at line 209 of file ExCLight.cpp. References Guard, m_diffuse, m_LightNumber, and SetDiffuseR(). Referenced by IncDiffuseR(), SetDiffuse(), and SetDiffuseR().
    00210 {
    00211 Guard(void ExCLight::SetDiffuseR(float R))
    00212         if(R>1)R=1.0f;if(R<0.0f)R=0.0f;
    00213         m_diffuse[0]=R;
    00214         glLightfv(m_LightNumber,GL_DIFFUSE,m_diffuse);
    00215 UnGuard
    00216 }

void SetLightNumber | ( | GLenum | light | ) |

| Definition at line 74 of file ExCLight.cpp. References Guard, m_LightNumber, and SetLightNumber(). Referenced by SetLightNumber().
    00075 {
    00076 Guard(void ExCLight::SetLightNumber(GLenum light))
    00077         m_LightNumber=light;
    00078 UnGuard
    00079 }

void SetLinearAttenuation | ( | float | att | ) |

| Definition at line 558 of file ExCLight.cpp. References Guard, m_LightNumber, m_spotLinearAtt, and SetLinearAttenuation(). Referenced by IncLinearAttenuation(), Reset(), and SetLinearAttenuation().
    00559 {
    00560 Guard(void ExCLight::SetLinearAttenuation(float att))
    00561         if(att<0)att=0.0f;if(att>5)att=5.0f;
    00562         m_spotLinearAtt[0]=att;
    00563         glLightfv(m_LightNumber,GL_LINEAR_ATTENUATION,m_spotLinearAtt);
    00564 UnGuard
    00565 }

void SetPosition | ( | double | X,
|  | double | Y,
|  | double | Z,
|  | double | W
| ) |

void SetPosition | ( | double | X,
|  | double | Y,
|  | double | Z
| ) |

| Definition at line 404 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Position, and SetPosition(). Referenced by SetPosition().
    00405 {
    00406 Guard(void ExCLight::SetPosition(double X,double Y,double Z))
    00407         SetPosition(X,Y,Z);
    00408         GLfloat lightPos[] = { m_Position.GetX(), m_Position.GetY(),m_Position.GetZ()};
    00409         glLightfv(m_LightNumber, GL_POSITION, lightPos );
    00410 UnGuard
    00411 }

void SetPositionW | ( | double | W | ) |

void SetPositionX | ( | double | X | ) |

| Definition at line 413 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Position, SetPositionX(), and ExCVec3D::SetX(). Referenced by IncPositionY(), and SetPositionX().
    00414 {
    00415 Guard(void ExCLight::SetPositionX(double X))
    00416         m_Position.SetX(X);
    00417         GLfloat lightPos[] = { m_Position.GetX(), m_Position.GetY(),m_Position.GetZ()};
    00418         glLightfv(m_LightNumber, GL_POSITION, lightPos );
    00419 UnGuard
    00420 }

void SetPositionY | ( | double | Y | ) |

| Definition at line 422 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Position, SetPositionY(), and ExCVec3D::SetY(). Referenced by IncPositionZ(), and SetPositionY().
    00423 {
    00424 Guard(void ExCLight::SetPositionY(double Y))
    00425         m_Position.SetY(Y);
    00426         GLfloat lightPos[] = { m_Position.GetX(), m_Position.GetY(),m_Position.GetZ()};
    00427         glLightfv(m_LightNumber, GL_POSITION, lightPos );
    00428 UnGuard
    00429 }

void SetPositionZ | ( | double | Z | ) |

| Definition at line 431 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Position, SetPositionZ(), and ExCVec3D::SetZ(). Referenced by SetPositionZ().
    00432 {
    00433 Guard(void ExCLight::SetPositionZ(double Z))
    00434         m_Position.SetZ(Z);
    00435         GLfloat lightPos[] = { m_Position.GetX(), m_Position.GetY(),m_Position.GetZ()};
    00436         glLightfv(m_LightNumber, GL_POSITION, lightPos );
    00437 UnGuard
    00438 }

void SetQuadraticAttenuation | ( | float | att | ) |

| Definition at line 581 of file ExCLight.cpp. References Guard, m_LightNumber, m_spotQuadraticAtt, and SetQuadraticAttenuation(). Referenced by IncQuadraticAttenuation(), Reset(), and SetQuadraticAttenuation().
    00582 {
    00583 Guard(void ExCLight::SetQuadraticAttenuation(float att))
    00584         if(att<0)att=0.0f;if(att>5)att=5.0f;
    00585         m_spotQuadraticAtt[1]=att;
    00586         glLightfv(m_LightNumber,GL_QUADRATIC_ATTENUATION,m_spotQuadraticAtt);
    00587 UnGuard
    00588 }

void SetSpecular | ( | float | R,
|  | float | G,
|  | float | B,
|  | float | A
| ) |

| Definition at line 301 of file ExCLight.cpp. References A, B, Guard, SetSpecular(), SetSpecularA(), SetSpecularB(), SetSpecularG(), and SetSpecularR(). Referenced by Reset(), and SetSpecular().
    00302 {
    00303 Guard(void ExCLight::SetSpecular(float R,float G,float B,float A))
    00304         SetSpecularR(R);
    00305         SetSpecularG(G);
    00306         SetSpecularB(B);
    00307         SetSpecularA(A);
    00308 UnGuard
    00309 }

void SetSpecularA | ( | float | A | ) |

| Definition at line 338 of file ExCLight.cpp. References A, Guard, m_LightNumber, m_specular, and SetSpecularA(). Referenced by IncSpecularA(), SetSpecular(), and SetSpecularA().
    00339 {
    00340 Guard(void ExCLight::SetSpecularA(float A))
    00341         if(A>1)A=1.0f;if(A<0.0f)A=0.0f;
    00342         m_specular[3]=A;
    00343         glLightfv(m_LightNumber,GL_SPECULAR,m_specular);
    00344 UnGuard
    00345 }

void SetSpecularB | ( | float | B | ) |

| Definition at line 329 of file ExCLight.cpp. References B, Guard, m_LightNumber, m_specular, and SetSpecularB(). Referenced by IncSpecularB(), SetSpecular(), and SetSpecularB().
    00330 {
    00331 Guard(void ExCLight::SetSpecularB(float B))
    00332         if(B>1)B=1.0f;if(B<0.0f)B=0.0f;
    00333         m_specular[2]=B;
    00334         glLightfv(m_LightNumber,GL_SPECULAR,m_specular);
    00335 UnGuard
    00336 }

void SetSpecularG | ( | float | G | ) |

| Definition at line 320 of file ExCLight.cpp. References Guard, m_LightNumber, m_specular, and SetSpecularG(). Referenced by IncSpecularG(), SetSpecular(), and SetSpecularG().
    00321 {
    00322 Guard(void ExCLight::SetSpecularG(float G))
    00323         if(G>1)G=1.0f;if(G<0.0f)G=0.0f;
    00324         m_specular[1]=G;
    00325         glLightfv(m_LightNumber,GL_SPECULAR,m_specular);
    00326 UnGuard
    00327 }

void SetSpecularR | ( | float | R | ) |

| Definition at line 311 of file ExCLight.cpp. References Guard, m_LightNumber, m_specular, and SetSpecularR(). Referenced by IncSpecularR(), SetSpecular(), and SetSpecularR().
    00312 {
    00313 Guard(void ExCLight::SetSpecularR(float R))
    00314         if(R>1)R=1.0f;if(R<0.0f)R=0.0f;
    00315         m_specular[0]=R;
    00316         glLightfv(m_LightNumber,GL_SPECULAR,m_specular);
    00317 UnGuard
    00318 }

void SetSpotCutOff | ( | float | cut | ) |

| Definition at line 503 of file ExCLight.cpp. References Guard, m_LightNumber, m_spotCutOff, and SetSpotCutOff(). Referenced by IncSpotCutOff(), Reset(), and SetSpotCutOff().
    00504 {
    00505 Guard(void ExCLight::SetSpotCutOff(float cut))
    00506         if(cut>m_spotCutOff[0])
    00507         {
    00508                 if(cut>90)cut=180;
    00509         }else
    00510         {
    00511                 if(cut<0)cut=0;
    00512                 if(cut>90)cut=90;
    00513
    00514         }
    00515
    00516         m_spotCutOff[0]=cut;
    00517         glLightfv(m_LightNumber,GL_SPOT_CUTOFF,m_spotCutOff);
    00518 UnGuard
    00519 }

void SetSpotExponent | ( | float | Exponent | ) |

| Definition at line 480 of file ExCLight.cpp. References Guard, m_LightNumber, m_spotExponent, and SetSpotExponent(). Referenced by IncSpotExponent(), Reset(), and SetSpotExponent().
    00481 {
    00482 Guard(void ExCLight::SetSpotExponent(float Exponent))
    00483         if(Exponent<0)Exponent=0.0f;if(Exponent>128)Exponent=128.0f;
    00484         m_spotExponent[0]=Exponent;
    00485         glLightfv(m_LightNumber,GL_SPOT_EXPONENT,m_spotExponent);
    00486 UnGuard
    00487 }

void SetTarget | ( | double | X,
|  | double | Y,
|  | double | Z
| ) |

| Definition at line 471 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Target, and SetTarget(). Referenced by SetTarget().
    00472 {
    00473 Guard(void ExCLight::SetTarget(double X,double Y,double Z))
    00474         //SetTarget(X,Y,Z);
    00475         GLfloat lightPos[] = { m_Target.GetX(), m_Target.GetY(),m_Target.GetZ(), 1.0 };
    00476         glLightfv(m_LightNumber,GL_SPOT_DIRECTION,lightPos);
    00477 UnGuard
    00478 }

void SetTargetX | ( | double | X | ) |

| Definition at line 441 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Target, SetTargetX(), and ExCVec3D::SetX(). Referenced by IncTargetY(), and SetTargetX().
    00442 {
    00443 Guard(void ExCLight::SetTargetX(double X))
    00444         m_Target.SetX(X);
    00445         GLfloat lightPos[] = { m_Target.GetX(), m_Target.GetY(),m_Target.GetZ(), 1.0 };
    00446         glLightfv(m_LightNumber, GL_POSITION, lightPos );
    00447 UnGuard
    00448 }

void SetTargetY | ( | double | Y | ) |

| Definition at line 450 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Target, SetTargetY(), and ExCVec3D::SetY(). Referenced by IncTargetnZ(), and SetTargetY().
    00451 {
    00452 Guard(void ExCLight::SetTargetY(double Y))
    00453         m_Target.SetY(Y);
    00454         GLfloat lightPos[] = { m_Target.GetX(), m_Target.GetY(),m_Target.GetZ(), 1.0 };
    00455         glLightfv(m_LightNumber, GL_POSITION, lightPos );
    00456 UnGuard
    00457 }

void SetTargetZ | ( | double | Z | ) |

| Definition at line 459 of file ExCLight.cpp. References ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, m_LightNumber, ExCObject3D::m_Target, SetTargetZ(), and ExCVec3D::SetZ(). Referenced by SetTargetZ().
    00460 {
    00461 Guard(void ExCLight::SetTargetZ(double Z))
    00462         m_Target.SetZ(Z);
    00463         GLfloat lightPos[] = { m_Target.GetX(), m_Target.GetY(),m_Target.GetZ(), 1.0 };
    00464         glLightfv(m_LightNumber, GL_POSITION, lightPos );
    00465 UnGuard
    00466 }

void TurnOff | ( | void |  | ) |

| Definition at line 89 of file ExCLight.cpp. References Guard, m_LightNumber, m_State, and TurnOff(). Referenced by TurnOff().
    00090 {
    00091 Guard(void ExCLight::TurnOff(void))
    00092         m_State=false;
    00093         glDisable(m_LightNumber);
    00094 UnGuard
    00095 }

void TurnOn | ( | void |  | ) |

| Definition at line 81 of file ExCLight.cpp. References Guard, m_LightNumber, m_State, and TurnOn(). Referenced by TurnOn().
    00082 {
    00083 Guard(void ExCLight::TurnOn(void))
    00084         m_State=true;
    00085         glEnable(m_LightNumber);
    00086 UnGuard
    00087 }

## Field Documentation

float m_ambiant[4]`[protected]`

| Definition at line 40 of file ExCLight.h. Referenced by GetAmbiantA(), GetAmbiantB(), GetAmbiantG(), GetAmbiantR(), SetAmbiantA(), SetAmbiantB(), SetAmbiantG(), and SetAmbiantR().

float m_diffuse[4]`[protected]`

| Definition at line 41 of file ExCLight.h. Referenced by GetDiffuseA(), GetDiffuseB(), GetDiffuseG(), GetDiffuseR(), SetDiffuseA(), SetDiffuseB(), SetDiffuseG(), and SetDiffuseR().

GLenum m_LightNumber`[protected]`

| Definition at line 38 of file ExCLight.h. Referenced by ExCLight(), SetAmbiantA(), SetAmbiantB(), SetAmbiantG(), SetAmbiantR(), SetConstantAttenuation(), SetDiffuseA(), SetDiffuseB(), SetDiffuseG(), SetDiffuseR(), SetLightNumber(), SetLinearAttenuation(), SetPosition(), SetPositionX(), SetPositionY(), SetPositionZ(), SetQuadraticAttenuation(), SetSpecularA(), SetSpecularB(), SetSpecularG(), SetSpecularR(), SetSpotCutOff(), SetSpotExponent(), SetTarget(), SetTargetX(), SetTargetY(), SetTargetZ(), TurnOff(), and TurnOn().

float m_specular[4]`[protected]`

| Definition at line 42 of file ExCLight.h. Referenced by GetSpecularA(), GetSpecularB(), GetSpecularG(), GetSpecularR(), SetSpecularA(), SetSpecularB(), SetSpecularG(), and SetSpecularR().

float m_spotConstentAtt[1]`[protected]`

| Definition at line 47 of file ExCLight.h. Referenced by GetConstantAttenuation(), and SetConstantAttenuation().

float m_spotCutOff[1]`[protected]`

| Definition at line 45 of file ExCLight.h. Referenced by GetSpotCutOff(), and SetSpotCutOff().

float m_spotExponent[1]`[protected]`

| Definition at line 44 of file ExCLight.h. Referenced by GetSpotExponent(), and SetSpotExponent().

float m_spotLinearAtt[1]`[protected]`

| Definition at line 48 of file ExCLight.h. Referenced by GetLinearAttenuation(), and SetLinearAttenuation().

float m_spotQuadraticAtt[1]`[protected]`

| Definition at line 49 of file ExCLight.h. Referenced by GetQuadraticAttenuation(), and SetQuadraticAttenuation().

bool m_State`[protected]`

| Definition at line 39 of file ExCLight.h. Referenced by GetState(), Reset(), TurnOff(), and TurnOn().

The documentation for this class was generated from the following files:

- ExCLight.h
- ExCLight.cpp