Light Class Reference

#include <Light.h>

Inheritance diagram for Light:

Inheritance graph
[legend]
Collaboration diagram for Light:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Light (bool dynamic_in=true)
 ~Light ()
void setLightId (GLint glLightId_in)
void setup (GLint glLightId=-1)
void enable ()
void disable (GLint glLightId=-1)
void setTargeted (bool has_target_in)
void control (int controllerId, int motionId, float value)
void bindParent (SceneObject &parent_in)
void setType (unsigned short type_in)
void setAmbient (const RGB &rgb_in)
void setDiffuse (const RGB &rgb_in)
void setSpecular (const RGB &rgb_in)
void setPosition (const XYZ &xyz_in)
void setRotation (const XYZ &xyz_in)
void setTarget (const XYZ &xyz_in)
void bindTarget (SceneObject *sceneObj)
void setCutoff (float cutoff_in)
void setExponent (float exponent_in)
void setConstantAttenuation (float constant_attenuation_in)
void setLinearAttenuation (float linear_attenuation_in)
void setQuadraticAttenuation (float quadratic_attenuation_in)
void setClipping (float near_in, float far_in)
void setDynamic (bool dynamic_in)
bool isDynamic ()
void setShadow (unsigned int map_res_in, const std::string cone_tex)
bool hasShadow ()
void shadowInit ()
void shadowBegin ()
void shadowEnd ()
void setupTexgen (double angle, int unit)
void shadowRenderStart (int stage, int unit)
void shadowRenderFinish (int stage, int unit)

Static Public Member Functions

static void setGlobalAmbient (const RGB &global_ambient_rgb)

Public Attributes

Vector direction
unsigned int shadowmapTex
unsigned int coneTex
unsigned int shadow_mtex
unsigned int cone_mtex
unsigned short type
unsigned int shadowBuffer
GLint glLightId
XYZ position
XYZ rotation
XYZ target
XYZ rotation_last
RGB ambient
RGB diffuse
RGB specular
float cutoff
float exponent
float constant_attenuation
float linear_attenuation
float quadratic_attenuation
float nearclip
float farclip
int map_res
float projectionMatrix [16]
float viewMatrix [16]
float modelViewMatrix [16]
bool has_target
bool has_shadow
bool has_projector
bool dynamic
SceneObjectparent
SceneObjectsceneObjTarget

Static Public Attributes

static GLint active_lights [MAX_LIGHTS] = {-1,-1,-1,-1,-1,-1,-1,-1}
static GLint active_light_types [MAX_LIGHTS] = {-1,-1,-1,-1,-1,-1,-1,-1}
static GLint active_shadow = -1
static GLint active_projector = -1
static RGB global_ambient = RGB(0.1,0.1,0.1)

Protected Attributes

Transform directionTransform


Constructor & Destructor Documentation

Light::Light ( bool  dynamic_in = true  ) 

Here is the call graph for this function:

Light::~Light (  ) 


Member Function Documentation

void Light::setGlobalAmbient ( const RGB global_ambient_rgb  )  [static]

void Light::setLightId ( GLint  glLightId_in  ) 

void Light::setup ( GLint  glLightId = -1  ) 

Here is the call graph for this function:

void Light::enable (  ) 

void Light::disable ( GLint  glLightId = -1  ) 

void Light::setTargeted ( bool  has_target_in  ) 

void Light::control ( int  controllerId,
int  motionId,
float  value 
) [virtual]

Implements Controllable.

void Light::bindParent ( SceneObject parent_in  ) 

void Light::setType ( unsigned short  type_in  ) 

void Light::setAmbient ( const RGB rgb_in  ) 

void Light::setDiffuse ( const RGB rgb_in  ) 

void Light::setSpecular ( const RGB rgb_in  ) 

void Light::setPosition ( const XYZ xyz_in  ) 

void Light::setRotation ( const XYZ xyz_in  ) 

void Light::setTarget ( const XYZ xyz_in  ) 

void Light::bindTarget ( SceneObject sceneObj  ) 

void Light::setCutoff ( float  cutoff_in  ) 

void Light::setExponent ( float  exponent_in  ) 

void Light::setConstantAttenuation ( float  constant_attenuation_in  ) 

void Light::setLinearAttenuation ( float  linear_attenuation_in  ) 

void Light::setQuadraticAttenuation ( float  quadratic_attenuation_in  ) 

void Light::setClipping ( float  near_in,
float  far_in 
)

void Light::setDynamic ( bool  dynamic_in  )  [inline]

bool Light::isDynamic (  )  [inline]

void Light::setShadow ( unsigned int  map_res_in,
const std::string  cone_tex 
)

Here is the call graph for this function:

bool Light::hasShadow (  ) 

void Light::shadowInit (  ) 

void Light::shadowBegin (  ) 

Here is the call graph for this function:

void Light::shadowEnd (  ) 

Here is the call graph for this function:

void Light::setupTexgen ( double  angle,
int  unit 
)

void Light::shadowRenderStart ( int  stage,
int  unit 
)

Here is the call graph for this function:

void Light::shadowRenderFinish ( int  stage,
int  unit 
)

Here is the call graph for this function:


Member Data Documentation

GLint Light::active_lights = {-1,-1,-1,-1,-1,-1,-1,-1} [static]

GLint Light::active_light_types = {-1,-1,-1,-1,-1,-1,-1,-1} [static]

GLint Light::active_shadow = -1 [static]

GLint Light::active_projector = -1 [static]

RGB Light::global_ambient = RGB(0.1,0.1,0.1) [static]

unsigned int Light::shadowmapTex

unsigned int Light::coneTex

unsigned int Light::shadow_mtex

unsigned int Light::cone_mtex

unsigned short Light::type

unsigned int Light::shadowBuffer

float Light::viewMatrix[16]


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

Generated on Thu Mar 19 19:35:25 2009 for CubicVR by  doxygen 1.5.6