Class hierarchy   Compound list   File list   Compound Members   File Members  

Light Class Reference

Generic light. More...

Inherits Interface.

List of all members.

Public Members

Related Functions

(Note that these are not member functions.)

Detailed Description

Generic light.


Member Function Documentation

virtual long Light::status() = 0 [pure virtual]

Returns non-zero if an error has occurred.

virtual long Light::update() = 0 [pure virtual]

Update the light state, after changing some settings.

virtual long Light::setColor(float Red, float Green, float Blue) = 0 [pure virtual]

Set the light's color.

A call to update() must be made to make the changes active.

virtual long Light::setRange(float Range) = 0 [pure virtual]

Set the light's range.

Valid for spot/point lights. A negative range indicates maximum range. A call to update() must be made to make the changes active.

virtual long Light::setAngles(float Theta, float Phi) = 0 [pure virtual]

Set the spot light's angles.

Theta is the inner cone, and Phi is the outer cone. They must conform to: 0 <= Theta <= Phi <= PI A call to update() must be made to make the changes active.

DLLExport Light* newSunLight(float x, float y, float z, float Red=0.7f, float Green=0.9f, float Blue=0.7f)

Create a new light, which is a parallel point (like Sun Light) with a specified color.

This is similar to a point light, but requires less calculations by assuming great distance. Coordinates specify the initial position for the light.

DLLExport Light* newSunLight(const Vector3D& Position, const fColor& Color=fColor(0.7f, 0.9f, 0.7f))

Create a new light, which is a parallel point (like Sun Light) with a specified color.

This is similar to a point light, but requires less calculations by assuming great distance. Coordinates specify the initial position for the light.

DLLExport Light* newSpotLight(const Vector3D& Position, const Vector3D& Direction, const fColor& Color=fColor(1.0f, 1.0f, 1.0f), const float Range=-1, const float Theta=PI/4, const float Phi=PI/2)

Create a new light, which is a spot.

It has direction, range and angles for cones of effect.

DLLExport Light* newPointLight(const Vector3D& Position, const fColor& Color=fColor(1.0f, 1.0f, 1.0f), const float Range=-1)

Create a new light, which is a point source of light.

It radiates light equally in all directions but may have a limited range. (-1 => infinite range)

DLLExport Light* newDirectionLight(const Vector3D& Direction, const fColor& Color=fColor(1.0f, 1.0f, 1.0f))

Create a new light, which radiates in a specific direction always.

It doesn't have a specific source position and has unlimited range.


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