sgLight Class Reference

#include <sgLight.h>

List of all members.

Public Member Functions

 sgLight (sgLight *p, sgLight *n)
sgLightcreateLight ()
void setDefault ()
void destroy ()
void destroyAll ()

Public Attributes

sgVector4 position
sgFColorA ambient
sgFColorA diffuse
sgFColorA specular
float attenuation
sgLightprev
sgLightnext

Detailed Description

Light class. Responsible for light handling.


Constructor & Destructor Documentation

sgLight::sgLight ( sgLight p,
sgLight n 
)

Constructor. Creates a light.

Parameters:
p the previous light in the linked light list
n the next light in the linked light list

Member Function Documentation

sgLight * sgLight::createLight (  ) 

Create light. Creates a new light and makes it next of this.

Returns:
pointer to the new light
void sgLight::destroy (  ) 

Destroy. Destroys this light.

void sgLight::destroyAll (  ) 

Destroy All. Destroys this and all lights connected to it.

void sgLight::setDefault (  ) 

Set to default. Sets all light parameters to the default ones (position is not effected).


Member Data Documentation

Ambient. Color used for the ambient lighting.

Attenuation. Factor used for the quadratic attenuation, if this is a point light source. The smaller, the higher is the range.

Diffuse. Color used for the diffuse lighting.

Next. Pointer to the next light within the lights list or NULL if there is none.

Position. The position of the light. Set the w component to 0, to make this a sun with an endless distance, where xyz define the lights direction.

Previous. Pointer to the previous light within the lights list or NULL if there is none.

Specular. Color used for the specular lighting.


The documentation for this class was generated from the following files:
Generated on Thu Jun 3 13:31:04 2010 for iSDGE by  doxygen 1.6.3