#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 |
Internal value dump. |
|
Constructors and Destructors
|
|
LightSource () | |
Constructor. |
|
LightSource (const LightSource &light_source) | |
Copy Constructor. |
|
virtual | ~LightSource () |
Destructor. |
|
Accessors
|
|
const Vector3 & | getPosition () const |
Get position. |
|
void | setPosition (const Vector3 &position) |
Set position. |
|
const Vector3 & | getDirection () const |
Get the direction vector of the
light. |
|
void | setDirection (const Vector3 &direction) |
Set the direction vector of the
light. |
|
const Vector3 & | getAttenuation () const |
Get the attenuation parameters of
the light. |
|
void | setAttenuation (const Vector3 &attenuation) |
Set the attenuation parameters of
the light. |
|
const Angle & | getAngle () const |
Get the angle of the light
cone. |
|
void | setAngle (const Angle &angle) |
Set the angle of the light
cone. |
|
float | getIntensity () const |
Get the light intensity. |
|
void | setIntensity (float intensity) |
Set the intensity. |
|
const ColorRGBA & | getColor () const |
Get the color of the light. |
|
void | setColor (const ColorRGBA &color) |
Set the color of the light. |
|
Index | getType () const |
Get the type of the light. |
|
void | setType (Types type) |
Set the type of the light. |
|
void | setRelativeToCamera (bool state) |
If set to true, the LightSource
will move with the Camera. |
|
bool | isRelativeToCamera () const |
Test if a LightSource
will move with the Camera. |
|
LightSource & | operator= (const LightSource &light) |
bool | operator< (const LightSource &light) const |
needed for MSVC, dont use it
otherwise! |
|
Predicates
|
|
bool | operator== (const LightSource &light_source) const |
Protected Attributes |
|
Vector3 | position_ |
Vector3 | direction_ |
Vector3 | attenuation_ |
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:
Enumeration of different types of lights.
virtual void BALL::VIEW::LightSource::dump | ( | std::ostream & | s =
std::cout , |
|
Size | depth =
0 |
|||
) | const [virtual] |
Internal value dump.
Dump the current state of this instance to the output ostream s with dumping depth depth.
s | output stream | |
depth | the dumping depth |
const ColorRGBA& BALL::VIEW::LightSource::getColor | ( | ) | const |
Get the color of the light.
The alpha channel of the color is ignored.
float BALL::VIEW::LightSource::getIntensity | ( | ) | const |
Get the light intensity.
0 is the minumum, 1 is the maximum.
Index BALL::VIEW::LightSource::getType | ( | ) | const |
Get the type of the light.
void BALL::VIEW::LightSource::setColor | ( | const ColorRGBA & | color | ) |
Set the color of the light.
The alpha channel of the color is ignored.
void BALL::VIEW::LightSource::setIntensity | ( | float | intensity | ) |
Set the intensity.
0 is the minumum, 1 is the maximum.