version 3.3

VRS::Light Class Reference

Abstract Base Class for Lights. More...

#include <vrs/light.h>

Inheritance diagram for VRS::Light:

VRS::PolyAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable VRS::AmbientLight VRS::DistantLight VRS::PointLight VRS::SpotLight

List of all members.

Public Member Functions

 Light (const Color &ambient=Color(0.1, 0.1, 0.1), const Color &diffuse=Color(1.0, 1.0, 1.0), const Color &specular=Color(0.0, 0.0, 0.0), double ambientI=1.0, double diffuseI=1.0, double specularI=1.0)
bool operator== (const Light &other) const
virtual ID category () const
void setAmbientColor (const Color &)
void setAmbientIntensity (double)
Color getAmbientColor () const
double getAmbientIntensity () const
 Contribution to the global (ambient) illumination.
void setDiffuseColor (const Color &)
void setDiffuseIntensity (double)
Color getDiffuseColor () const
double getDiffuseIntensity () const
 Diffuse light emission.
void setSpecularColor (const Color &)
void setSpecularIntensity (double)
Color getSpecularColor () const
double getSpecularIntensity () const
 Specular light emission.
virtual bool switchDefault () const
 light sources are switched on per default
 VRS_TYPEINFO (Light, PolyAttribute)
 VRS_SERIALIZABLE (Light)


Detailed Description

Abstract Base Class for Lights.

Constructor & Destructor Documentation

VRS::Light::Light ( const Color ambient = Color(0.1, 0.1, 0.1),
const Color diffuse = Color(1.0, 1.0, 1.0),
const Color specular = Color(0.0, 0.0, 0.0),
double  ambientI = 1.0,
double  diffuseI = 1.0,
double  specularI = 1.0 
)

Lightsource. All light sources have intensity and color for ambient, diffuse, and specular illumination. Several light sources can be active at once, hence light sources are PolyAttribute objects. Whether a light source is activated of deactivated in a part of the scene graph is controled by LightSwitch attributes.


Member Function Documentation

bool VRS::Light::operator== ( const Light other  )  const

virtual ID VRS::Light::category (  )  const [virtual]

All light objects of derived light classes are managed uniformly as Light objects.

Reimplemented from VRS::Attribute.

void VRS::Light::setAmbientColor ( const Color  ) 

void VRS::Light::setAmbientIntensity ( double   ) 

Color VRS::Light::getAmbientColor (  )  const [inline]

double VRS::Light::getAmbientIntensity (  )  const [inline]

Contribution to the global (ambient) illumination.

void VRS::Light::setDiffuseColor ( const Color  ) 

void VRS::Light::setDiffuseIntensity ( double   ) 

Color VRS::Light::getDiffuseColor (  )  const [inline]

double VRS::Light::getDiffuseIntensity (  )  const [inline]

Diffuse light emission.

void VRS::Light::setSpecularColor ( const Color  ) 

void VRS::Light::setSpecularIntensity ( double   ) 

Color VRS::Light::getSpecularColor (  )  const [inline]

double VRS::Light::getSpecularIntensity (  )  const [inline]

Specular light emission.

virtual bool VRS::Light::switchDefault (  )  const [virtual]

light sources are switched on per default

VRS::Light::VRS_TYPEINFO ( Light  ,
PolyAttribute   
)

VRS::Light::VRS_SERIALIZABLE ( Light   ) 


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

Generated on Mon May 21 06:00:19 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact