#include <ACG/Scenegraph/LightSourceNode.hh>


Classes | |
| struct | LightSource |
| Structure to hold options for one LightSource. More... | |
Public Member Functions | |
| LightSourceNode (BaseNode *_parent=0, const std::string &_name="<LightSourceNode>") | |
| Default constructor. Applies all properties. | |
| virtual | ~LightSourceNode () |
| Destructor. | |
| ACG_CLASSNAME (LightSourceNode) | |
| void | enter (GLState &_state, unsigned int _drawmode) |
| set current Light Sources | |
| void | leave (GLState &_state, unsigned int _drawmode) |
| restores original Light Sources | |
| void | enable (GLenum _nr) |
| enable LightSource _nr | |
| void | disable (GLenum _nr) |
| disable LightSource _nr | |
| void | set_position (GLenum _nr, Vec4f _pos) |
| set position ( _pos = 1) or direction ( _pos = 0) of LightSource | |
| void | set_position (GLenum _nr, Vec3f _pos) |
| set position for Point-LightSource | |
| void | set_direction (GLenum _nr, Vec3f _pos) |
| set direction for directional LightSource | |
| void | set_ambient_color (GLenum _nr, Vec4f _color) |
| set Ambient color for LightSource _nr | |
| void | set_diffuse_color (GLenum _nr, Vec4f _color) |
| set Diffuse color for LightSource _nr | |
| void | set_specular_color (GLenum _nr, Vec4f _color) |
| set Specular color for LightSource _nr | |
| void | fixed_position (GLenum _nr, bool _state) |
| make LightSource fixed or moveable with ModelViewMatrix | |
Private Member Functions | |
| int | gl2index (GLenum _nr) |
| return index in vector for GL_LIGHT* | |
| GLenum | index2gl (int _nr) |
| return GL_LIGHT* for light _nr | |
| void | set_parameters (GLenum _index, LightSource &_light) |
| set _light Options in OpenGL for GL_LIGHT::_index | |
| void | get_parameters (GLenum _index, LightSource &_light) |
| get _light Options in OpenGL for GL_LIGHT::_index | |
Private Attributes | |
| std::vector< LightSource > | lights_ |
| store LightSources of this node | |
| std::vector< LightSource > | lightsSave_ |
| save old LightSources | |
Set LightSources (0 to 7) for this node and all its children. All changes will be done in the enter() method undone in the leave() method.
Definition at line 84 of file LightSourceNode.hh.
| void ACG::SceneGraph::LightSourceNode::enter | ( | GLState & | _state, | |
| unsigned int | _drawmode | |||
| ) | [virtual] |
set current Light Sources
transfer GL-preferences to lightsSave_
Reimplemented from ACG::SceneGraph::BaseNode.
Definition at line 80 of file LightSourceNode.cc.
References get_parameters(), index2gl(), ACG::GLState::inverse_modelview(), lights_, lightsSave_, and set_parameters().