45#ifndef CPositionalLightH
46#define CPositionalLightH
127 const bool a_displayEnabled =
true);
Implements a base class for light sources.
This class implements a base class for modeling light sources.
Definition CGenericLight.h:80
This class implements a positional light source.
Definition CPositionalLight.h:77
double m_displaySourceRadius
Radius of display model representing light source.
Definition CPositionalLight.h:163
virtual ~cPositionalLight()
Destructor of cPositionalLight.
Definition CPositionalLight.cpp:80
void setAttLinear(const GLfloat &a_value)
This method sets the linear attenuation parameter.
Definition CPositionalLight.h:107
GLfloat getAttLinear() const
This method returns the linear attenuation parameter.
Definition CPositionalLight.h:110
virtual std::string getClassName()
This method returns the name of the object class.
Definition CPositionalLight.h:98
GLfloat m_attLinear
Linear attenuation parameter.
Definition CPositionalLight.h:150
GLfloat getAttConstant() const
This method returns the constant attenuation parameter.
Definition CPositionalLight.h:104
virtual void render(cRenderOptions &a_options)
This method renders a graphical representation (display model) of the light source....
Definition CPositionalLight.cpp:111
void setAttConstant(const GLfloat &a_value)
This method sets the constant attenuation parameter.
Definition CPositionalLight.h:101
void setAttQuadratic(const GLfloat &a_value)
This method set the quadratic attenuation parameter.
Definition CPositionalLight.h:113
GLfloat m_attConstant
Constant attenuation parameter.
Definition CPositionalLight.h:147
cColorf m_displaySourceColor
Color used for rendering the display model of the light source.
Definition CPositionalLight.h:137
virtual void renderLightSource(cRenderOptions &a_options)
This method renders the lighting properties of this light source in OpenGL.
Definition CPositionalLight.cpp:145
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
GLfloat getAttQuadratic() const
This method returns the quadratic attenuation parameter.
Definition CPositionalLight.h:116
GLfloat m_attQuadratic
Quadratic attenuation parameter.
Definition CPositionalLight.h:153
This class implements a virtual world.
Definition CWorld.h:93
Definition CAudioBuffer.cpp:57
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:387
This class defines a color using a GLfloat representation for each component.
Definition CColor.h:139
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition CRenderOptions.h:83