#include <light_source.h>
Public Member Functions | |
| CL_LightSource_GL1 () | |
| Constructs a light source container. | |
| ~CL_LightSource_GL1 () | |
| float | get_spot_exponent () const |
| Attributes Returns the intensity distribution of the light. | |
| float | get_spot_cutoff () const |
| Returns the spot cutoff angle (the maximum spread angle of a light source). | |
| float | get_constant_attenuation () const |
| Returns constant attenuation of the light. | |
| float | get_linear_attenuation () const |
| Returns linear attenuation of the light. | |
| float | get_quadratic_attenuation () const |
| Returns quadratic attenuation of the light. | |
| CL_Colorf | get_ambient_intensity () const |
| Returns the ambient (global light) intensity of the light. | |
| CL_Colorf | get_diffuse_intensity () const |
| Returns the diffuse (spread over wide area) intensity of the light. | |
| CL_Colorf | get_specular_intensity () const |
| Returns the specular (mirror reflective) intensity of the light. | |
| CL_Vec4f | get_position () const |
| Returns the light position. | |
| CL_Vec4f | get_spot_direction () const |
| Returns the light spot direction. | |
| void | set_spot_exponent (float spot_exponent) |
| Operations Sets the intensity distribution of the light. | |
| void | set_spot_cutoff (float spot_cutoff) |
| Sets the spot cutoff angle (the maximum spread angle of a light source). | |
| void | set_constant_attenuation (float constant_attenuation) |
| Sets the constant attenuation of the light. | |
| void | set_linear_attenuation (float linear_attenuation) |
| Sets linear attenuation of the light. | |
| void | set_quadratic_attenuation (float quadratic_attenuation) |
| Sets quadratic attenuation of the light. | |
| void | set_ambient_intensity (const CL_Colorf &color) |
| Sets the ambient (global light) intensity of the light. | |
| void | set_diffuse_intensity (const CL_Colorf &color) |
| Sets the diffuse (spread over wide area) intensity of the light. | |
| void | set_specular_intensity (const CL_Colorf &color) |
| Sets the specular (mirror reflective) intensity of the light. | |
| void | set_position (const CL_Vec4f &position) |
| Sets the light position. | |
| void | set_spot_direction (const CL_Vec3f &spot_direction) |
| Sets the light spot direction. | |
|
|
Constructs a light source container.
|
|
|
|
|
|
Returns the ambient (global light) intensity of the light.
|
|
|
Returns constant attenuation of the light. The default attenuation factors are (1,0,0), resulting in no attenuation. |
|
|
Returns the diffuse (spread over wide area) intensity of the light.
|
|
|
Returns linear attenuation of the light. The default attenuation factors are (1,0,0), resulting in no attenuation. |
|
|
Returns the light position.
|
|
|
Returns quadratic attenuation of the light. The default attenuation factors are (1,0,0), resulting in no attenuation. |
|
|
Returns the specular (mirror reflective) intensity of the light.
|
|
|
Returns the spot cutoff angle (the maximum spread angle of a light source). The default spot cutoff is 180, resulting in uniform light distribution. |
|
|
Returns the light spot direction.
|
|
|
Attributes Returns the intensity distribution of the light. Only values in the range [0,128] are accepted. The default spot exponent is 0, resulting in uniform light distribution. |
|
|
Sets the ambient (global light) intensity of the light.
|
|
|
Sets the constant attenuation of the light. The default attenuation factors are (1,0,0), resulting in no attenuation. |
|
|
Sets the diffuse (spread over wide area) intensity of the light.
|
|
|
Sets linear attenuation of the light. The default attenuation factors are (1,0,0), resulting in no attenuation. |
|
|
Sets the light position. The position is transformed by the modelview matrix when glLight is called (just as if it were a point), and it is stored in eye coordinates. If the w component of the position is 0.0, the light is treated as a directional source. Diffuse and specular lighting calculations take the lights direction, but not its actual position, into account, and attenuation is disabled. Otherwise, diffuse and specular lighting calculations are based on the actual location of the light in eye coordinates, and attenuation is enabled. The default position is (0,0,1,0); thus, the default light source is directional, parallel to, and in the direction of the –z axis. |
|
|
Sets quadratic attenuation of the light. The default attenuation factors are (1,0,0), resulting in no attenuation. |
|
|
Sets the specular (mirror reflective) intensity of the light.
|
|
|
Sets the spot cutoff angle (the maximum spread angle of a light source). The default spot cutoff is 180, resulting in uniform light distribution. |
|
|
Sets the light spot direction.
|
|
|
Operations Sets the intensity distribution of the light. Only values in the range [0,128] are accepted. The default spot exponent is 0, resulting in uniform light distribution. |
1.4.6