CL_LightSource_GL1 Class Reference
[clanGL1 Display]

Light Source description. More...

#include <light_source.h>

List of all members.

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.


Detailed Description

Light Source description.


Constructor & Destructor Documentation

CL_LightSource_GL1::CL_LightSource_GL1  ) 
 

Constructs a light source container.

CL_LightSource_GL1::~CL_LightSource_GL1  ) 
 


Member Function Documentation

CL_Colorf CL_LightSource_GL1::get_ambient_intensity  )  const
 

Returns the ambient (global light) intensity of the light.

float CL_LightSource_GL1::get_constant_attenuation  )  const
 

Returns constant attenuation of the light.

The default attenuation factors are (1,0,0), resulting in no attenuation.

CL_Colorf CL_LightSource_GL1::get_diffuse_intensity  )  const
 

Returns the diffuse (spread over wide area) intensity of the light.

float CL_LightSource_GL1::get_linear_attenuation  )  const
 

Returns linear attenuation of the light.

The default attenuation factors are (1,0,0), resulting in no attenuation.

CL_Vec4f CL_LightSource_GL1::get_position  )  const
 

Returns the light position.

float CL_LightSource_GL1::get_quadratic_attenuation  )  const
 

Returns quadratic attenuation of the light.

The default attenuation factors are (1,0,0), resulting in no attenuation.

CL_Colorf CL_LightSource_GL1::get_specular_intensity  )  const
 

Returns the specular (mirror reflective) intensity of the light.

float CL_LightSource_GL1::get_spot_cutoff  )  const
 

Returns the spot cutoff angle (the maximum spread angle of a light source).

The default spot cutoff is 180, resulting in uniform light distribution.

CL_Vec4f CL_LightSource_GL1::get_spot_direction  )  const
 

Returns the light spot direction.

float CL_LightSource_GL1::get_spot_exponent  )  const
 

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.

void CL_LightSource_GL1::set_ambient_intensity const CL_Colorf color  ) 
 

Sets the ambient (global light) intensity of the light.

void CL_LightSource_GL1::set_constant_attenuation float  constant_attenuation  ) 
 

Sets the constant attenuation of the light.

The default attenuation factors are (1,0,0), resulting in no attenuation.

void CL_LightSource_GL1::set_diffuse_intensity const CL_Colorf color  ) 
 

Sets the diffuse (spread over wide area) intensity of the light.

void CL_LightSource_GL1::set_linear_attenuation float  linear_attenuation  ) 
 

Sets linear attenuation of the light.

The default attenuation factors are (1,0,0), resulting in no attenuation.

void CL_LightSource_GL1::set_position const CL_Vec4f position  ) 
 

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.

void CL_LightSource_GL1::set_quadratic_attenuation float  quadratic_attenuation  ) 
 

Sets quadratic attenuation of the light.

The default attenuation factors are (1,0,0), resulting in no attenuation.

void CL_LightSource_GL1::set_specular_intensity const CL_Colorf color  ) 
 

Sets the specular (mirror reflective) intensity of the light.

void CL_LightSource_GL1::set_spot_cutoff float  spot_cutoff  ) 
 

Sets the spot cutoff angle (the maximum spread angle of a light source).

The default spot cutoff is 180, resulting in uniform light distribution.

void CL_LightSource_GL1::set_spot_direction const CL_Vec3f spot_direction  ) 
 

Sets the light spot direction.

void CL_LightSource_GL1::set_spot_exponent float  spot_exponent  ) 
 

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.


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 02:39:38 2009 for ClanLib by  doxygen 1.4.6