| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/spotlight.h>

Public Member Functions | |
| SpotLight (const Vector &pos=Vector(0, 0, 0), const Vector &dir=Vector(1, 0, 0), const Color &col=Color::white, double spotAngle=45, double spotExponent=10, double intensity=0.5, double ambientIntensity=0.05, double const_attenuation=1.0, double linear_attenuation=1.0, double quadratic_attenuation=0.0) | |
| void | setDirection (const Vector &) |
| Vector | getDirection () const |
| Spot light direction. | |
| void | setSpotAngle (double) |
| double | getSpotAngle () const |
| Spot light angle. | |
| void | setSpotExponent (double) |
| double | getSpotExponent () const |
| 0 <= spotAngle() <= 90 (spread angle, or cut-off angle). | |
| VRS_TYPEINFO (SpotLight, PointLight) | |
| VRS_SERIALIZABLE (SpotLight) | |
| VRS::SpotLight::SpotLight | ( | const Vector & | pos = Vector(0, 0, 0), |
|
| const Vector & | dir = Vector(1, 0, 0), |
|||
| const Color & | col = Color::white, |
|||
| double | spotAngle = 45, |
|||
| double | spotExponent = 10, |
|||
| double | intensity = 0.5, |
|||
| double | ambientIntensity = 0.05, |
|||
| double | const_attenuation = 1.0, |
|||
| double | linear_attenuation = 1.0, |
|||
| double | quadratic_attenuation = 0.0 | |||
| ) |
A spot-light is a directed-light. It is emitted from a point and the rays go towards the directrion. No Rays outside of `spotAngle' are cast. The `spotExponent' controlls the fall-off. Higher values produce smaller spots.
| void VRS::SpotLight::setDirection | ( | const Vector & | ) |
| Vector VRS::SpotLight::getDirection | ( | void | ) | const [inline] |
Spot light direction.
| void VRS::SpotLight::setSpotAngle | ( | double | ) |
| double VRS::SpotLight::getSpotAngle | ( | ) | const [inline] |
Spot light angle.
| void VRS::SpotLight::setSpotExponent | ( | double | ) |
| double VRS::SpotLight::getSpotExponent | ( | ) | const [inline] |
0 <= spotAngle() <= 90 (spread angle, or cut-off angle).
| VRS::SpotLight::VRS_TYPEINFO | ( | SpotLight | , | |
| PointLight | ||||
| ) |
| VRS::SpotLight::VRS_SERIALIZABLE | ( | SpotLight | ) |