Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::GLight Class Reference

A light representation that closely follows the OpenGL light format. More...

#include <GLight.h>

List of all members.

Public Member Functions

 GLight ()
bool operator!= (const GLight &other) const
bool operator== (const GLight &other) const

Static Public Member Functions

static GLight directional (const Vector3 &toLight, const Color3 &color, bool specular=true, bool diffuse=true)
static GLight point (const Vector3 &pos, const Color3 &color, float constAtt=1, float linAtt=0, float quadAtt=0, bool specular=true, bool diffuse=true)
static GLight spot (const Vector3 &pos, const Vector3 &pointDirection, float cutOffAngleDegrees, const Color3 &color, float constAtt=1, float linAtt=0, float quadAtt=0, bool specular=true, bool diffuse=true)

Public Attributes

float attenuation [3]
Color3 color
bool diffuse
bool enabled
Vector4 position
bool specular
float spotCutoff
Vector3 spotDirection


Detailed Description

A light representation that closely follows the OpenGL light format.


Constructor & Destructor Documentation

G3D::GLight::GLight (  ) 


Member Function Documentation

static GLight G3D::GLight::directional ( const Vector3 toLight,
const Color3 color,
bool  specular = true,
bool  diffuse = true 
) [static]

Parameters:
toLight will be normalized

bool G3D::GLight::operator!= ( const GLight other  )  const

bool G3D::GLight::operator== ( const GLight other  )  const

static GLight G3D::GLight::point ( const Vector3 pos,
const Color3 color,
float  constAtt = 1,
float  linAtt = 0,
float  quadAtt = 0,
bool  specular = true,
bool  diffuse = true 
) [static]

static GLight G3D::GLight::spot ( const Vector3 pos,
const Vector3 pointDirection,
float  cutOffAngleDegrees,
const Color3 color,
float  constAtt = 1,
float  linAtt = 0,
float  quadAtt = 0,
bool  specular = true,
bool  diffuse = true 
) [static]


Member Data Documentation

Constant, linear, quadratic.

May be outside the range [0, 1].

If false, this light does not create diffuse illumination (useful when rendering a specular-only pass).

If false, this light is ignored.

World space position (for a directional light, w = 0.

If false, this light does not create specular highlights (useful when using negative lights).

In degrees.

180 = no cutoff (point/dir) >90 = spot light


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:46 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo