BALL
1.4.1
|
#include <BALL/VIEW/KERNEL/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 |
Constructors and Destructors | |
LightSource () | |
LightSource (const LightSource &light_source) | |
virtual | ~LightSource () |
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 |
void | setIntensity (float intensity) |
const ColorRGBA & | getColor () const |
void | setColor (const ColorRGBA &color) |
Index | getType () const |
void | setType (Types type) |
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_ |
Light source is mainly used for Renderer classes (e.g. 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.
Constructor
BALL::VIEW::LightSource::LightSource | ( | const LightSource & | light_source | ) |
Copy Constructor
virtual BALL::VIEW::LightSource::~LightSource | ( | ) | [inline, virtual] |
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 Angle& BALL::VIEW::LightSource::getAngle | ( | ) | const [inline] |
const Vector3& BALL::VIEW::LightSource::getAttenuation | ( | ) | const [inline] |
const ColorRGBA& BALL::VIEW::LightSource::getColor | ( | ) | const [inline] |
const Vector3& BALL::VIEW::LightSource::getDirection | ( | ) | const [inline] |
float BALL::VIEW::LightSource::getIntensity | ( | ) | const [inline] |
const Vector3& BALL::VIEW::LightSource::getPosition | ( | ) | const [inline] |
Index BALL::VIEW::LightSource::getType | ( | ) | const [inline] |
bool BALL::VIEW::LightSource::isRelativeToCamera | ( | ) | const [inline] |
Test if a LightSource will move with the Camera.
bool BALL::VIEW::LightSource::operator< | ( | const LightSource & | light | ) | const |
needed for MSVC, dont use it otherwise!
LightSource& BALL::VIEW::LightSource::operator= | ( | const LightSource & | light | ) |
bool BALL::VIEW::LightSource::operator== | ( | const LightSource & | light_source | ) | const |
void BALL::VIEW::LightSource::setAngle | ( | const Angle & | angle | ) | [inline] |
void BALL::VIEW::LightSource::setAttenuation | ( | const Vector3 & | attenuation | ) | [inline] |
void BALL::VIEW::LightSource::setColor | ( | const ColorRGBA & | color | ) | [inline] |
void BALL::VIEW::LightSource::setDirection | ( | const Vector3 & | direction | ) | [inline] |
void BALL::VIEW::LightSource::setIntensity | ( | float | intensity | ) | [inline] |
void BALL::VIEW::LightSource::setPosition | ( | const Vector3 & | position | ) | [inline] |
void BALL::VIEW::LightSource::setRelativeToCamera | ( | bool | state | ) | [inline] |
If set to true, the LightSource will move with the Camera.
void BALL::VIEW::LightSource::setType | ( | Types | type | ) | [inline] |
Angle BALL::VIEW::LightSource::angle_ [protected] |
Vector3 BALL::VIEW::LightSource::attenuation_ [protected] |
ColorRGBA BALL::VIEW::LightSource::color_ [protected] |
Vector3 BALL::VIEW::LightSource::direction_ [protected] |
float BALL::VIEW::LightSource::intensity_ [protected] |
Vector3 BALL::VIEW::LightSource::position_ [protected] |
Vector3 BALL::VIEW::LightSource::r_direction_ [protected] |
Vector3 BALL::VIEW::LightSource::r_position_ [protected] |
bool BALL::VIEW::LightSource::relative_ [protected] |
Index BALL::VIEW::LightSource::type_ [protected] |