#include <CLightSource.h>
Public Types | |
| ON | |
| OFF | |
| DIRECTIONAL | |
| POINT | |
| CONE | |
| CONE_DIFFUSE | |
| enum | LightStatus { ON, OFF } |
| enum | LightSourceType { DIRECTIONAL, POINT, CONE, CONE_DIFFUSE } |
Public Member Functions | |
| CLightSource () | |
| CLightSource (const CLightSource &) | |
| CLightSource (LightSourceType nType) | |
| CLightSource (const CV3D &direction, float rfIntensity=1.0) | |
| CLightSource (const CP3D &point, float rfIntensity=1.0) | |
| CLightSource (const CP3D &point, const CV3D &direction, float rfAngle, float rfIntensity=1.0) | |
| CLightSource (const CP3D &point, const CV3D &direction, float rfAngle, float rfExponent=50.0, float rfIntensity=1.0) | |
| virtual | ~CLightSource () |
| LightSourceType | getType () const |
| LightStatus | getStatus () const |
| const float * | getColor () const |
| const CP3D & | getPosition () const |
| CV3D | getDirection (const CP3D &point) const |
| const CV3D & | getDirection () const |
| CV3D | getDirectionToLight () const |
| float | getIntensity () const |
| float | getIntensity (const CP3D &point) const |
| float | getExponent () const |
| float | getAngle () const |
| float | getConstantAttenuation () const |
| float | getLinearAttenuation () const |
| float | getQuadraticAttenuation () const |
| void | setType (LightSourceType nType) |
| int | setStatus (LightStatus status) |
| int | setPosition (const CP3D &point) |
| int | setDirection (const CV3D &direction) |
| int | setAngle (float rfAngle) |
| int | setExponent (float rfExponent) |
| int | setIntensity (float rfIntensity) |
| void | setColor (float rfRed, float rfGreen, float rfBlue) |
| void | setConstantAttenuation (float rfValue) |
| void | setLinearAttenuation (float rfValue) |
| void | setQuadraticAttenuation (float rfValue) |
Private Attributes | |
| LightSourceType | m_LightSourceType |
| LightStatus | m_LightStatus |
| CP3D | m_Point |
| CV3D | m_Direction |
| float | m_arfColor [3] |
| float | m_rfIntensity |
| float | m_rfAngle |
| float | m_rfExponent |
| float | m_rfConstantAttenuation |
| float | m_rfLinearAttenuation |
| float | m_rfQuadraticAttenuation |
| CLightSource::CLightSource | ( | ) | [inline] |
Default constructor. Default type is a point light source which is switched on and emits white color light on full intensity.
| CLightSource::CLightSource | ( | const CLightSource & | ) |
Copy Constructor.
| CLightSource::CLightSource | ( | LightSourceType | nType | ) |
Constructor defining the type.
| CLightSource::CLightSource | ( | const CV3D & | direction, | |
| float | rfIntensity = 1.0 | |||
| ) |
Constructor defining a directional lightsource.
| CLightSource::CLightSource | ( | const CP3D & | point, | |
| float | rfIntensity = 1.0 | |||
| ) |
Constructor defining a point lightsource.
| CLightSource::CLightSource | ( | const CP3D & | point, | |
| const CV3D & | direction, | |||
| float | rfAngle, | |||
| float | rfIntensity = 1.0 | |||
| ) |
Constructor defining a cone lightsource.
| CLightSource::CLightSource | ( | const CP3D & | point, | |
| const CV3D & | direction, | |||
| float | rfAngle, | |||
| float | rfExponent = 50.0, |
|||
| float | rfIntensity = 1.0 | |||
| ) |
Constructor defining a diffuse cone lightsource.
| virtual CLightSource::~CLightSource | ( | ) | [inline, virtual] |
| float CLightSource::getAngle | ( | ) | const [inline] |
Returns the opening angle of the light.
| const float* CLightSource::getColor | ( | ) | const [inline] |
Returns the color of the light.
| float CLightSource::getConstantAttenuation | ( | ) | const [inline] |
Returns the const attenuation.
| const CV3D& CLightSource::getDirection | ( | ) | const [inline] |
Returns the direction of the light.
Returns the light direction at the given point.
| CV3D CLightSource::getDirectionToLight | ( | ) | const [inline] |
Returns the inverse direction of the light.
| float CLightSource::getExponent | ( | ) | const [inline] |
Returns the exponent of the intensity distribution of the light (used for cone light sources with diffuse light distribution properties). .
| float CLightSource::getIntensity | ( | const CP3D & | point | ) | const |
Returns the light intensity at the given point.
| float CLightSource::getIntensity | ( | ) | const [inline] |
Returns the intensity of the light.
| float CLightSource::getLinearAttenuation | ( | ) | const [inline] |
Returns the linear attenuation.
| const CP3D& CLightSource::getPosition | ( | ) | const [inline] |
Returns the position of the light.
| float CLightSource::getQuadraticAttenuation | ( | ) | const [inline] |
Returns the quadratic attenuation.
| LightStatus CLightSource::getStatus | ( | ) | const [inline] |
Returns the status of the light.
| LightSourceType CLightSource::getType | ( | ) | const [inline] |
Returns the type of the lightsource.
| int CLightSource::setAngle | ( | float | rfAngle | ) |
Sets the opening angle of the light.
| void CLightSource::setColor | ( | float | rfRed, | |
| float | rfGreen, | |||
| float | rfBlue | |||
| ) |
Sets the color of the light source.
| void CLightSource::setConstantAttenuation | ( | float | rfValue | ) | [inline] |
Sets the const attenuation.
| int CLightSource::setDirection | ( | const CV3D & | direction | ) |
Sets the direction of the light.
| int CLightSource::setExponent | ( | float | rfExponent | ) |
Sets the exponent of the intensity distribution of the light (used for cone light sources with diffuse light distribution properties). .
| int CLightSource::setIntensity | ( | float | rfIntensity | ) |
Sets the intensity of the light.
| void CLightSource::setLinearAttenuation | ( | float | rfValue | ) | [inline] |
Sets the linear attenuation.
| int CLightSource::setPosition | ( | const CP3D & | point | ) |
Sets the position of the light.
| void CLightSource::setQuadraticAttenuation | ( | float | rfValue | ) | [inline] |
Sets the quadratic attenuation.
| int CLightSource::setStatus | ( | LightStatus | status | ) | [inline] |
Sets the position of the light.
| void CLightSource::setType | ( | LightSourceType | nType | ) | [inline] |
Sets the type of the lightsource.
float CLightSource::m_arfColor[3] [private] |
CV3D CLightSource::m_Direction [private] |
LightStatus CLightSource::m_LightStatus [private] |
CP3D CLightSource::m_Point [private] |
float CLightSource::m_rfAngle [private] |
float CLightSource::m_rfConstantAttenuation [private] |
float CLightSource::m_rfExponent [private] |
float CLightSource::m_rfIntensity [private] |
float CLightSource::m_rfLinearAttenuation [private] |
float CLightSource::m_rfQuadraticAttenuation [private] |
1.4.7