version 3.3

VRS::SpotLight Class Reference

Spot Light Source. More...

#include <vrs/spotlight.h>

Inheritance diagram for VRS::SpotLight:

VRS::PointLight VRS::Light VRS::PolyAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

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)


Detailed Description

Spot Light Source.

Constructor & Destructor Documentation

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.


Member Function Documentation

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   ) 


The documentation for this class was generated from the following file:

Generated on Tue May 22 06:00:32 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact