CIvfLighting Class Reference

#include <ivf/IvfLighting.h>

Inheritance diagram for CIvfLighting:

CIvfBase CIvfRefCountBase CIvfRTTIBase List of all members.

Public Member Functions

 IvfClassInfo ("CIvfLighting", CIvfBase)
void render ()
void enable ()
void disable ()
bool isEnabled ()
void disableLights ()
void enableLights ()
void saveState ()
void restoreState ()
void setTwoSide (bool flag)
bool getTwoSide ()
void setLocalViewer (bool flag)
bool getLocalViewer ()
CIvfLightgetLight (int idx)
int getSize ()
void setAmbientColor (float red, float green, float blue, float alpha)
void restoreEnabledState ()
void saveEnabledState ()

Static Public Member Functions

static CIvfLightinggetInstance ()

Protected Member Functions

 CIvfLighting ()

Friends

class CIvfSingletonDestroyer< CIvfLighting >

Detailed Description

Lighting singleton class

The CIvfLighting singleton encapsulates OpenGL lighting. An instance of the CIvfLighting class is retrieved using the getInstance() method. See the following code:

 CIvfLightingPtr lighting = CIvfLighting::getInstance();
 lighting->enable();
 CIvfLightPtr light = lighting->getLight(0);
 light->enable();
 ...

Author:
Carl-Johan Lejdfors and Jonas Lindemann

Definition at line 52 of file IvfLighting.h.


Constructor & Destructor Documentation

CIvfLighting::CIvfLighting  )  [protected]
 

Protected constructor (do not use)


Member Function Documentation

void CIvfLighting::disable  ) 
 

Disables lighting

void CIvfLighting::disableLights  ) 
 

Disables all lights

void CIvfLighting::enable  ) 
 

Enables lighting

void CIvfLighting::enableLights  ) 
 

Enables all lights

static CIvfLighting* CIvfLighting::getInstance  )  [static]
 

Return instance of CIvfLighting

Examples:
ac3dreader.cpp, actionctl.cpp, advgeom.cpp, controllers.cpp, culling.cpp, extrusion.cpp, handlers.cpp, lighting.cpp, lod.cpp, manip.cpp, placement.cpp, robot.cpp, selection.cpp, and textures.cpp.

CIvfLight* CIvfLighting::getLight int  idx  ) 
 

Retrieve an OpenGL light source

param idx should be between 0 and getSize()-1

bool CIvfLighting::getLocalViewer  ) 
 

Returns local viewer light model flag

int CIvfLighting::getSize  ) 
 

Return the maximum light sources

bool CIvfLighting::getTwoSide  ) 
 

Returns two-sided lighting flag

bool CIvfLighting::isEnabled  ) 
 

Returns true if lighting is enabled

void CIvfLighting::render  ) 
 

Renders all lights

void CIvfLighting::restoreEnabledState  ) 
 

Save state of enabled lights

void CIvfLighting::restoreState  ) 
 

Restores the lighting state

void CIvfLighting::saveEnabledState  ) 
 

Restore state of enabled lights

void CIvfLighting::saveState  ) 
 

Saves lighting state

void CIvfLighting::setAmbientColor float  red,
float  green,
float  blue,
float  alpha
 

Sets the ambient color level

void CIvfLighting::setLocalViewer bool  flag  ) 
 

Enables/Disables local viewer light model

void CIvfLighting::setTwoSide bool  flag  ) 
 

Enables/Disables two-sided lighting


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