Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

ThingLight Class Reference

LightThing and all its settings. More...

#include <ThingLight.h>

Inherits Thing.

Inherited by ThingSpotlight.

Inheritance diagram for ThingLight:

Inheritance graph
[legend]
Collaboration diagram for ThingLight:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ThingLight (void)
 constructor
 ThingLight (int glob)
virtual ~ThingLight (void)
 destructor
void setAmbient (float red, float green, float blue, float intensity)
 set the ambient term of the light
void setDiffuse (float red, float green, float blue, float intensity)
 set the diffuse term of the light
void setSpecular (float red, float green, float blue, float intensity)
 set the specular term of the light
void setPosition (float x, float y, float z, float w)
void setConstantAttenuation (float intensity)
void setLinearAttenuation (float intensity)
void setQuadraticAttenuation (float intensity)
LightSettingsgetAmbient ()
LightSettingsgetDiffuse ()
LightSettingsgetSpecular ()
bool isOn ()
bool shadowIsOn ()
void switchLight ()
void switchShadow ()
void init ()
void render ()

Public Attributes

int zus

Protected Attributes

bool shadow
bool lightOn
LightSettings ambient
LightSettings diffuse
LightSettings specular
float attConstIntensity
float attLinIntensity
float attQuadIntensity
float position [4]

Detailed Description

LightThing and all its settings.

Light Thing for the scenegraph. Ambient, diffuse and specular settings can be set, attenuation is also editable. Additionally shadow can be enabled for this light.


Constructor & Destructor Documentation

ThingLight::ThingLight void   ) 
 

constructor

ThingLight::ThingLight int  glob  ) 
 

ThingLight::~ThingLight void   )  [virtual]
 

destructor


Member Function Documentation

LightSettings * ThingLight::getAmbient  ) 
 

LightSettings * ThingLight::getDiffuse  ) 
 

LightSettings * ThingLight::getSpecular  ) 
 

void ThingLight::init  )  [virtual]
 

Reimplemented from Thing.

Reimplemented in ThingSpotlight.

bool ThingLight::isOn  ) 
 

void ThingLight::render  )  [virtual]
 

Reimplemented from Thing.

Reimplemented in ThingSpotlight.

void ThingLight::setAmbient float  red,
float  green,
float  blue,
float  intensity
 

set the ambient term of the light

Parameters:
red part (0.0-1.0)
green part (0.0-1.0)
blue part (0.0-1.0)
intensity of the ambient term (0.0-1.0)

void ThingLight::setConstantAttenuation float  intensity  ) 
 

void ThingLight::setDiffuse float  red,
float  green,
float  blue,
float  intensity
 

set the diffuse term of the light

Parameters:
red part (0.0-1.0)
green part (0.0-1.0)
blue part (0.0-1.0)
intensity of the diffuse term (0.0-1.0)

void ThingLight::setLinearAttenuation float  intensity  ) 
 

void ThingLight::setPosition float  x,
float  y,
float  z,
float  w
[inline]
 

void ThingLight::setQuadraticAttenuation float  intensity  ) 
 

void ThingLight::setSpecular float  red,
float  green,
float  blue,
float  intensity
 

set the specular term of the light

Parameters:
red part (0.0-1.0)
green part (0.0-1.0)
blue part (0.0-1.0)
intensity of the specular term (0.0-1.0)

bool ThingLight::shadowIsOn  ) 
 

void ThingLight::switchLight  ) 
 

void ThingLight::switchShadow  ) 
 


Member Data Documentation

LightSettings ThingLight::ambient [protected]
 

float ThingLight::attConstIntensity [protected]
 

float ThingLight::attLinIntensity [protected]
 

float ThingLight::attQuadIntensity [protected]
 

LightSettings ThingLight::diffuse [protected]
 

bool ThingLight::lightOn [protected]
 

float ThingLight::position[4] [protected]
 

Reimplemented in ThingSpotlight.

bool ThingLight::shadow [protected]
 

LightSettings ThingLight::specular [protected]
 

int ThingLight::zus
 


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 17:42:33 2005 for Loud and Proud by doxygen 1.3.8