#include <lvt/Light.h>
Inheritance diagram for Light:
Public Member Functions | |
int | GetGLLightNum () const |
Returns the OpenGL light number of this object. | |
Light () | |
Default constructor. | |
virtual void | Render () |
Renders the light. | |
void | SetCutoff (float cutoff) |
Sets the light's spotlight cutoff. | |
void | SetSpotExponent (float exp) |
Controls the concentration of the light. | |
void | SetAmbient (float r, float g, float b, float a=1.0f) |
Sets the ambient component of the light. | |
void | SetAmbient (const Vec &v) |
Sets the ambient component of the light. | |
void | SetAttenuation (float c, float l, float q) |
Sets the light's attenuation factors. | |
void | SetAttenuation (const Vec &v) |
Sets the light's attenuation factors. | |
void | SetColor (float r, float g, float b, float a=1.0f) |
Sets the diffuse, ambient, and specular terms. | |
void | SetColor (const Vec &v) |
Sets the diffuse, ambient, and specular terms. | |
void | SetDiffuse (float r, float g, float b, float a=1.0f) |
Sets the diffuse component of the light. | |
void | SetDiffuse (const Vec &v) |
Sets the diffuse component of the light. | |
void | SetDirection (float x, float y, float z) |
Sets the spotlight direction of the light. | |
void | SetDirection (const Vec &v) |
Sets the spotlight direction of the light. | |
void | SetPosition (float x, float y, float z, float w=1) |
Sets the light's position. | |
void | SetPosition (const Vec &pos) |
Sets the light's position. | |
void | SetSpecular (float r, float g, float b, float a=1.0f) |
Sets the specular component of the light. | |
void | SetSpecular (const Vec &v) |
Sets the specular component of the light. |
|
Default constructor. The light's position, color components, and other parameters are initialized to the OpenGL defaults. |
|
Returns the OpenGL light number of this object.
|
|
Renders the light. Activates lighting, and the corresponding light in OpenGL. Implements Node. |
|
Sets the ambient component of the light.
|
|
Sets the ambient component of the light.
|
|
Sets the light's attenuation factors.
|
|
Sets the light's attenuation factors. An OpenGL light attenuates with distance according to the following formula 1/(c + l*d + q*d^2). Where c, l, and q are controllable constants, and d is the distance from the light to the point being lit. The default is q = 0, l = 0, c = 1, i.e. no attenuation. |
|
Sets the diffuse, ambient, and specular terms.
|
|
Sets the diffuse, ambient, and specular terms.
|
|
Sets the light's spotlight cutoff. The light cutoff is the angle, in degrees, from the lights spotlight direction that is illuminated by the light. The default is 180, resulting in an omni-directional light. |
|
Sets the diffuse component of the light.
|
|
Sets the diffuse component of the light.
|
|
Sets the spotlight direction of the light.
|
|
Sets the spotlight direction of the light.
|
|
Sets the light's position.
|
|
Sets the light's position.
|
|
Sets the specular component of the light.
|
|
Sets the specular component of the light.
|
|
Controls the concentration of the light. The default value is 0, resulting in uniform brightness throughout the area illuminated by the spotlight. Higher values cause the light to attenuate more quickly towards the edges. |