#include <light.H>
Collaboration diagram for Light:

Public Member Functions | |
| Light () | |
| Default constructor. | |
| Light (mlib::CWvec &dir, bool is_enabled=false, bool is_in_cam_space=true, CCOLOR &ambient=COLOR::black, CCOLOR &diffuse=COLOR::white, CCOLOR &specular=COLOR::white) | |
| Constructor for a directional light. | |
| Light (mlib::CWpt &loc, bool is_enabled=false, bool is_in_cam_space=true, CCOLOR &ambient=COLOR::black, CCOLOR &diffuse=COLOR::white, CCOLOR &specular=COLOR::white, mlib::CWvec &spot_dir=mlib::Wvec(0, 0,-1), float spot_exponent=0, float spot_cutoff=180, float k0=1, float k1=0, float k2=0) | |
| Constructor for a positional light. | |
| mlib::Wvec | get_direction () const |
| For a directional light, returns the direction:. | |
| mlib::Wpt | get_position () const |
| For a positional light, returns the position:. | |
| void | set_position (mlib::CWpt &p) |
| void | set_direction (mlib::CWvec &v) |
Public Attributes | |
| bool | _is_enabled |
| is enabled? | |
| bool | _is_in_cam_space |
| is defined in camera space? | |
| bool | _is_positional |
| is positional? | |
| COLOR | _ambient_color |
| ambient color | |
| COLOR | _diffuse_color |
| diffuse color | |
| COLOR | _specular_color |
| specular color | |
| mlib::Wvec | _coords |
| "coordinates": direction or position | |
| mlib::Wvec | _spot_direction |
| GL_SPOT_DIRECTION. | |
| float | _spot_exponent |
| GL_SPOT_EXPONENT. | |
| float | _spot_cutoff |
| GL_SPOT_CUTOFF. | |
| float | _k0 |
| GL_CONSTANT_ATTENUATION. | |
| float | _k1 |
| GL_LINEAR_ATTENUATION. | |
| float | _k2 |
| GL_QUADRATIC_ATTENUATION. | |
Definition at line 12 of file light.H.
|
|
Default constructor.
|
|
||||||||||||||||||||||||||||
|
Constructor for a directional light.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Constructor for a positional light.
|
|
|
For a directional light, returns the direction:.
Definition at line 82 of file light.H. References _coords, and mlib::Vec3< V >::normalized(). Referenced by VIEW::light_get_coordinates_v(), and GL_VIEW::setup_light(). |
|
|
For a positional light, returns the position:.
Definition at line 84 of file light.H. References _coords. Referenced by VIEW::light_get_coordinates_p(), and GL_VIEW::setup_light(). |
|
|
Definition at line 92 of file light.H. References _coords, and _is_positional. Referenced by VIEW::light_set_coordinates_v(). |
|
|
Definition at line 88 of file light.H. References _coords, and _is_positional. Referenced by VIEW::light_set_coordinates_p(). |
|
|
ambient color
Definition at line 105 of file light.H. Referenced by VIEW::light_get_ambient(), VIEW::light_set_ambient(), and GL_VIEW::setup_light(). |
|
|
"coordinates": direction or position
Definition at line 108 of file light.H. Referenced by get_direction(), get_position(), set_direction(), and set_position(). |
|
|
diffuse color
Definition at line 106 of file light.H. Referenced by VIEW::light_get_diffuse(), VIEW::light_set_diffuse(), and GL_VIEW::setup_light(). |
|
|
is enabled?
Definition at line 102 of file light.H. Referenced by VIEW::light_get_enable(), VIEW::light_set_enable(), and GL_VIEW::setup_light(). |
|
|
is defined in camera space?
Definition at line 103 of file light.H. Referenced by VIEW::light_get_in_cam_space(), VIEW::light_set_in_cam_space(), and GL_VIEW::setup_light(). |
|
|
is positional?
Definition at line 104 of file light.H. Referenced by VIEW::light_get_positional(), VIEW::light_set_positional(), set_direction(), set_position(), and GL_VIEW::setup_light(). |
|
|
GL_CONSTANT_ATTENUATION.
Definition at line 112 of file light.H. Referenced by GL_VIEW::setup_light(). |
|
|
GL_LINEAR_ATTENUATION.
Definition at line 113 of file light.H. Referenced by GL_VIEW::setup_light(). |
|
|
GL_QUADRATIC_ATTENUATION.
Definition at line 114 of file light.H. Referenced by GL_VIEW::setup_light(). |
|
|
specular color
Definition at line 107 of file light.H. Referenced by GL_VIEW::setup_light(). |
|
|
GL_SPOT_CUTOFF.
Definition at line 111 of file light.H. Referenced by GL_VIEW::setup_light(). |
|
|
GL_SPOT_DIRECTION.
Definition at line 109 of file light.H. Referenced by GL_VIEW::setup_light(). |
|
|
GL_SPOT_EXPONENT.
Definition at line 110 of file light.H. Referenced by GL_VIEW::setup_light(). |
1.4.4