CIvfOldLight Class Reference

#include <ivf/IvfOldLight.h>

Inheritance diagram for CIvfOldLight:

CIvfObject CIvfBase CIvfRefCountBase CIvfRTTIBase List of all members.

Public Types

enum  TLightType { LT_POINT, LT_DIRECTIONAL, LT_SPOT }

Public Member Functions

 CIvfOldLight ()
virtual ~CIvfOldLight ()
CIvfOldLightoperator= (const CIvfOldLight &)
 operator void * ()
 IvfClassInfo ("CIvfOldLight", CIvfObject)
void setAmbient (const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a)
void setDiffuse (const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a)
void setSpecular (const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a)
void setPosition (const GLfloat x, const GLfloat y, const GLfloat z, const GLfloat w)
void setPosition (const GLfloat x, const GLfloat y, const GLfloat z)
void setDirection (const GLfloat x, const GLfloat y, const GLfloat z)
void setConstAtt (const GLint a)
void setLinAtt (const GLint a)
void setQuadAtt (const GLint a)
void getAmbient (GLfloat &r, GLfloat &g, GLfloat &b, GLfloat &a) const
void getDiffuse (GLfloat &r, GLfloat &g, GLfloat &b, GLfloat &a) const
void getSpecular (GLfloat &r, GLfloat &g, GLfloat &b, GLfloat &a) const
void getPosition (GLfloat &x, GLfloat &y, GLfloat &z, GLfloat &w) const
void getConstAtt (GLint &a) const
void getLinAtt (GLint &a) const
void getQuadAtt (GLint &a) const
void render ()
void setSpotExponent (float exponent)
float getSpotExponent ()
void setSpotCutoff (float cutoff)
float getSpotCutoff ()
void setSpotDirection (float ex, float ey, float ez)
void getSpotDirection (float &ex, float &ey, float &ez)
void setType (TLightType lightType)
TLightType getType ()
void activate ()
void deactivate ()

Protected Member Functions

 CIvfOldLight (const CIvfOldLight &)

Static Protected Attributes

static long lightmask

Detailed Description

Light class

Implements a OpenGL lightsource. When used it determines an available light. If all lights are allocated in OpenGL the light will not be rendered.

Author:
Carl Johan Lejdfors

Definition at line 44 of file IvfOldLight.h.


Constructor & Destructor Documentation

CIvfOldLight::CIvfOldLight  ) 
 

Constructor

virtual CIvfOldLight::~CIvfOldLight  )  [virtual]
 

Destructor


Member Function Documentation

void CIvfOldLight::activate  ) 
 

Activate light

When a light is active it will be rendered and enabled (glEnable(GL_LIGHTx).

void CIvfOldLight::deactivate  ) 
 

Activate light

When a light is active it will not be rendered or enabled (glEnable(GL_LIGHTx).

void CIvfOldLight::getAmbient GLfloat &  r,
GLfloat &  g,
GLfloat &  b,
GLfloat &  a
const
 

Return ambient light components

void CIvfOldLight::getConstAtt GLint &  a  )  const
 

return constant attenuation

void CIvfOldLight::getDiffuse GLfloat &  r,
GLfloat &  g,
GLfloat &  b,
GLfloat &  a
const
 

return diffuse light components

void CIvfOldLight::getLinAtt GLint &  a  )  const
 

return linear attenuation

void CIvfOldLight::getPosition GLfloat &  x,
GLfloat &  y,
GLfloat &  z,
GLfloat &  w
const
 

return light position

void CIvfOldLight::getQuadAtt GLint &  a  )  const
 

return quadratic attenuation

void CIvfOldLight::getSpecular GLfloat &  r,
GLfloat &  g,
GLfloat &  b,
GLfloat &  a
const
 

return specular light components

float CIvfOldLight::getSpotCutoff  ) 
 

Return spotlight cutoff angle

void CIvfOldLight::getSpotDirection float &  ex,
float &  ey,
float &  ez
 

Return spotlight direction

float CIvfOldLight::getSpotExponent  ) 
 

Return spotlight exponent value

TLightType CIvfOldLight::getType  ) 
 

Return current type of light

CIvfOldLight::operator void *  ) 
 

void* operator

CIvfOldLight& CIvfOldLight::operator= const CIvfOldLight  ) 
 

Assignment operator

void CIvfOldLight::render  )  [virtual]
 

render light source

Reimplemented from CIvfObject.

void CIvfOldLight::setAmbient const GLfloat  r,
const GLfloat  g,
const GLfloat  b,
const GLfloat  a
 

Set ambient light components

void CIvfOldLight::setConstAtt const GLint  a  ) 
 

Set constant attenuation

void CIvfOldLight::setDiffuse const GLfloat  r,
const GLfloat  g,
const GLfloat  b,
const GLfloat  a
 

Set diffuse light components

void CIvfOldLight::setLinAtt const GLint  a  ) 
 

Set linear attenuation

void CIvfOldLight::setPosition const GLfloat  x,
const GLfloat  y,
const GLfloat  z,
const GLfloat  w
 

Set light position

Parameters:
x light x coordinate
y light y coordinate
z light z coordinate
w light type (w = 0 directional light, w=1 positional light)

void CIvfOldLight::setQuadAtt const GLint  a  ) 
 

Set quadratic attenutation

void CIvfOldLight::setSpecular const GLfloat  r,
const GLfloat  g,
const GLfloat  b,
const GLfloat  a
 

Set specular light components

void CIvfOldLight::setSpotCutoff float  cutoff  ) 
 

Set spotlight cutoff angle

void CIvfOldLight::setSpotDirection float  ex,
float  ey,
float  ez
 

Set direction of spotlight

void CIvfOldLight::setSpotExponent float  exponent  ) 
 

Set spotlight exponent value

void CIvfOldLight::setType TLightType  lightType  ) 
 

Set light type

Parameters:
lightType can be LT_POINT for a point source, LT_DIRECTIONAL for a directional light source and LT_SPOT for a spotlight


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 15:36:55 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO