45 #ifndef CPositionalLightH 46 #define CPositionalLightH 124 const bool a_displayEnabled =
true);
Implements a base class for light sources.
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition: CRenderOptions.h:82
GLfloat getAttLinear() const
This method returns the linear attenuation parameter.
Definition: CPositionalLight.h:107
void setAttQuadratic(const GLfloat &a_value)
This method set the quadratic attenuation parameter.
Definition: CPositionalLight.h:110
void setAttConstant(const GLfloat &a_value)
This method sets the constant attenuation parameter.
Definition: CPositionalLight.h:98
GLfloat getAttConstant() const
This method returns the constant attenuation parameter.
Definition: CPositionalLight.h:101
virtual void render(cRenderOptions &a_options)
This method renders a graphical representation (display model) of the light source. (used for debugging purposes typically).
Definition: CPositionalLight.cpp:111
GLfloat getAttQuadratic() const
This method returns the quadratic attenuation parameter.
Definition: CPositionalLight.h:113
This class implements a base class for modeling light sources.
Definition: CGenericLight.h:79
double m_displaySourceRadius
Radius of display model representing light source.
Definition: CPositionalLight.h:160
This class implements a virtual world.
Definition: CWorld.h:92
void setDisplaySettings(const double &a_sourceRadius=0.02, const bool a_displayEnabled=true)
This method sets the display settings of this light source. (To be used for debugging purposes to dis...
Definition: CPositionalLight.cpp:95
This class implements a positional light source.
Definition: CPositionalLight.h:76
cPositionalLight(cWorld *a_world)
Constructor of cPositionalLight.
Definition: CPositionalLight.cpp:59
GLfloat m_attLinear
Linear attenuation parameter.
Definition: CPositionalLight.h:147
virtual void renderLightSource(cRenderOptions &a_options)
This method renders the lighting properties of this light source in OpenGL.
Definition: CPositionalLight.cpp:145
This class defines a color using a GLfloat representation for each component.
Definition: CColor.h:138
T cClamp(const T &a_value, const T &a_low, const T &a_high)
This function clamps a value to a specified range.
Definition: CMaths.h:362
cColorf m_displaySourceColor
Color used for rendering the display model of the light source.
Definition: CPositionalLight.h:134
Definition: CAudioBuffer.cpp:56
void setAttLinear(const GLfloat &a_value)
This method sets the linear attenuation parameter.
Definition: CPositionalLight.h:104
GLfloat m_attQuadratic
Quadratic attenuation parameter.
Definition: CPositionalLight.h:150
virtual ~cPositionalLight()
Destructor of cPositionalLight.
Definition: CPositionalLight.cpp:80
GLfloat m_attConstant
Constant attenuation parameter.
Definition: CPositionalLight.h:144