#include <stage.h>
Public Types | |
enum | Types { AMBIENT = 0, POSITIONAL, DIRECTIONAL } |
Enumeration of different types of lights. More... | |
Public Member Functions | |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const throw () |
Internal value dump. | |
Constructors and Destructors | |
LightSource () throw () | |
Constructor. | |
LightSource (const LightSource &light_source) throw () | |
Copy Constructor. | |
virtual | ~LightSource () throw () |
Destructor. | |
Accessors | |
const Vector3 & | getPosition () const throw () |
Get position. | |
void | setPosition (const Vector3 &position) throw () |
Set position. | |
const Vector3 & | getDirection () const throw () |
Get the direction vector of the light. | |
void | setDirection (const Vector3 &direction) throw () |
Set the direction vector of the light. | |
const Angle & | getAngle () const throw () |
Get the angle of the light cone. | |
void | setAngle (const Angle &angle) throw () |
Set the angle of the light cone. | |
float | getIntensity () const throw () |
Get the light intensity. | |
void | setIntensity (float intensity) throw () |
Set the intensity. | |
const ColorRGBA & | getColor () const throw () |
Get the color of the light. | |
void | setColor (const ColorRGBA &color) throw () |
Set the color of the light. | |
Index | getType () const throw () |
Get the type of the light. | |
void | setType (Types type) throw () |
Set the type of the light. | |
void | setRelativeToCamera (bool state) throw () |
If set to true, the LightSource will move with the Camera. | |
bool | isRelativeToCamera () const throw () |
Test if a LightSource will move with the Camera. | |
LightSource & | operator= (const LightSource &light) throw () |
bool | operator< (const LightSource &light) const throw () |
needed for MSVC, dont use it otherwise! | |
Predicates | |
bool | operator== (const LightSource &light_source) const throw () |
Protected Attributes | |
Vector3 | position_ |
Vector3 | direction_ |
Vector3 | r_position_ |
Vector3 | r_direction_ |
Angle | angle_ |
float | intensity_ |
ColorRGBA | color_ |
Index | type_ |
bool | relative_ |
OpenGL and POVRay). Currently we support ambient, positional and directional light sources. The Position and direction of lights can be stored twofold:
|
|
Internal value dump. Dump the current state of this instance to the output ostream s with dumping depth depth.
|
|
Get the color of the light. The alpha channel of the color is ignored. |
|
Get the light intensity. 0 is the minumum, 1 is the maximum. |
|
Get the type of the light.
|
|
Set the color of the light. The alpha channel of the color is ignored. |
|
Set the intensity. 0 is the minumum, 1 is the maximum. |
|
Set the type of the light.
|