#include <CLightSource.h>
Public Types | |
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 |
|
|
|
|
|
Default constructor. Default type is a point light source which is switched on and emits white color light on full intensity. |
|
Copy Constructor. |
|
Constructor defining the type. |
|
Constructor defining a directional lightsource. |
|
Constructor defining a point lightsource. |
|
Constructor defining a cone lightsource. |
|
Constructor defining a diffuse cone lightsource. |
|
|
|
Returns the opening angle of the light. |
|
Returns the color of the light. |
|
Returns the const attenuation. |
|
Returns the direction of the light. |
|
Returns the light direction at the given point. |
|
Returns the inverse direction of the light. |
|
Returns the exponent of the intensity distribution of the light (used for cone light sources with diffuse light distribution properties). . |
|
Returns the light intensity at the given point. |
|
Returns the intensity of the light. |
|
Returns the linear attenuation. |
|
Returns the position of the light. |
|
Returns the quadratic attenuation. |
|
Returns the status of the light. |
|
Returns the type of the lightsource. |
|
Sets the opening angle of the light. |
|
Sets the color of the light source. |
|
Sets the const attenuation. |
|
Sets the direction of the light. |
|
Sets the exponent of the intensity distribution of the light (used for cone light sources with diffuse light distribution properties). . |
|
Sets the intensity of the light. |
|
Sets the linear attenuation. |
|
Sets the position of the light. |
|
Sets the quadratic attenuation. |
|
Sets the position of the light. |
|
Sets the type of the lightsource. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|