ES3D::Lightf Class Reference

#include <Lightf.h>

List of all members.

Public Member Functions

 Lightf ()
virtual ~Lightf ()
GLboolean activatef (GLvoid)
GLvoid resetf (GLvoid)
ES3Denum setPositionDirectionf (ES3Denum type, GLfloat posDir[3])
GLvoid getPositionf (GLfloat currentPosition[4])
GLvoid getAttenuationf (GLfloat currentAttenuation[3])
GLenum getLightNumberf (GLvoid)

Static Public Member Functions

static LightfgetLightf (GLenum light)

Public Attributes

Spotf spot
GLboolean enableSpot
GLfloat ambient [4]
GLfloat diffuse [4]
GLfloat specular [4]
GLfloat emission [4]

Classes

class  Spotf


Detailed Description

Light class which encapsulates one OpenGL ES light


Constructor & Destructor Documentation

ES3D::Lightf::Lightf (  ) 

Constructor

ES3D::Lightf::~Lightf (  )  [virtual]

Destructor


Member Function Documentation

GLboolean ES3D::Lightf::activatef ( GLvoid   ) 

Enables, activates the light. Tries to aquire a light. Updates all parameters.

Returns:
returns true on success; false, if no lights are left

GLvoid ES3D::Lightf::getAttenuationf ( GLfloat  currentAttenuation[3]  ) 

Rerieves and returns the current attenuation of the light

Parameters:
currentAttenuation the array to store the attenuations

Lightf * ES3D::Lightf::getLightf ( GLenum  light  )  [static]

Returns the light, if one exists.

Parameters:
light the light to return
Returns:
pointer to the default light

GLenum ES3D::Lightf::getLightNumberf ( GLvoid   ) 

Returns the light number used by this light. Returns GL_MAX_LIGHTS if no one is associated to it.

Returns:
the light number

GLvoid ES3D::Lightf::getPositionf ( GLfloat  currentPosition[4]  ) 

Retrieves and returns the current position (and type) of the light.

Parameters:
currentPosition the array to store the position.

GLvoid ES3D::Lightf::resetf ( GLvoid   ) 

Disables the light. Frees the resource.

ES3Denum ES3D::Lightf::setPositionDirectionf ( ES3Denum  type,
GLfloat  posDir[3] 
)

Sets the position or direction of the light

Parameters:
type positional or directional light
posDir the position or direction of the light
Returns:
no error on success


Member Data Documentation

GLfloat ES3D::Lightf::ambient[4]

Ambient light.

GLfloat ES3D::Lightf::diffuse[4]

Diffuse light.

GLfloat ES3D::Lightf::emission[4]

Emission light.

GLboolean ES3D::Lightf::enableSpot

Flag, if spot is enabled

GLfloat ES3D::Lightf::specular[4]

Specular light.

Spotf ES3D::Lightf::spot

The spot light, if needed.


The documentation for this class was generated from the following files:
Generated on Sat May 10 16:30:55 2008 for ES 3D Game SDK Documentation by  doxygen 1.4.7