#include <SpotLightDesc.h>
Public Member Functions | |
| const ml7::Vector2 & | get_direction () const |
| void | set_direction (const ml7::Vector2 &direction) |
| float | get_falloff () const |
| void | set_falloff (float falloff) |
| float | get_theta () const |
| void | set_theta (float theta) |
| float | get_phi () const |
| void | set_phi (float phi) |
Public Attributes | |
| friend | WorldDesc |
Protected Member Functions | |
| SpotLightDesc (unsigned id, unsigned long color, const bl7::geometry2::Sphere &sphere, const ml7::Vector2 &position, float range, const ml7::Vector2 &direction, float angle) | |
| SpotLightDesc (const SpotLightDesc &rhs) | |
| SpotLightDesc & | operator= (const SpotLightDesc &rhs) |
| virtual | ~SpotLightDesc (void) |
The point light object description class.
| cyber::world::lights::SpotLightDesc::SpotLightDesc | ( | unsigned | id, | |
| unsigned long | color, | |||
| const bl7::geometry2::Sphere & | sphere, | |||
| const ml7::Vector2 & | position, | |||
| float | range, | |||
| const ml7::Vector2 & | direction, | |||
| float | angle | |||
| ) | [protected] |
Explicit constructor.
| cyber::world::lights::SpotLightDesc::SpotLightDesc | ( | const SpotLightDesc & | rhs | ) | [protected] |
Copy constructor.
| cyber::world::lights::SpotLightDesc::~SpotLightDesc | ( | void | ) | [protected, virtual] |
Destructor.
| const ml7::Vector2& cyber::world::lights::SpotLightDesc::get_direction | ( | ) | const [inline] |
Returns the direction that the light is pointing in world-space. It has to be normalized and should have a nonzero length.
| float cyber::world::lights::SpotLightDesc::get_falloff | ( | ) | const [inline] |
Returns the decrease in illumination between the inner cone (angle theta) and the outer cone (angle phi) of a spotlight. falloff should have a value of 1 mostly.
| float cyber::world::lights::SpotLightDesc::get_phi | ( | ) | const [inline] |
Returns the angle, in radians, of the light's outer cone (illumination bound). This value must be between 0 and pi.
| float cyber::world::lights::SpotLightDesc::get_theta | ( | ) | const [inline] |
Returns the angle, in radians, of the light's inner (fully illuminated) cone. This value must be in the range from 0 through the value specified by phi.
| SpotLightDesc & cyber::world::lights::SpotLightDesc::operator= | ( | const SpotLightDesc & | rhs | ) | [protected] |
Copy assignment operator.
| void cyber::world::lights::SpotLightDesc::set_direction | ( | const ml7::Vector2 & | direction | ) | [inline] |
Sets the direction that the light is pointing in world-space. It has to be normalized and should have a nonzero length.
| void cyber::world::lights::SpotLightDesc::set_falloff | ( | float | falloff | ) | [inline] |
Sets the decrease in illumination between the inner cone (angle theta) and the outer cone (angle phi) of a spotlight. falloff should have a value of 1 mostly.
| void cyber::world::lights::SpotLightDesc::set_phi | ( | float | phi | ) | [inline] |
Sets the angle, in radians, of the light's outer cone (illumination bound). This value must be between 0 and pi.
| void cyber::world::lights::SpotLightDesc::set_theta | ( | float | theta | ) | [inline] |
Sets the angle, in radians, of the light's inner (fully illuminated) cone. This value must be in the range from 0 through the value specified by phi.
1.7.1