sofa::component::visualmodel::Light Class Reference

#include <Light.h>

Inheritance diagram for sofa::component::visualmodel::Light:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::visualmodel::Light:

Collaboration graph
[legend]

Public Member Functions

 Light ()
virtual ~Light ()
void setID (const GLint &id)
virtual void initVisual ()
 Initialize the textures, or other graphical resources.
void init ()
 Initialization method called at graph modification, during bottom-up traversal.
virtual void drawLight ()
void draw ()
 Render internal data of this object, for debugging purposes.
virtual void reinit ()
 Update method called when variables used in precomputation are modified.
void update ()
 used to update the model if necessary.

Protected Attributes

Data< Vector3 > color
GLint lightID

Detailed Description

Definition at line 56 of file Light.h.


Constructor & Destructor Documentation

sofa::component::visualmodel::Light::Light (  ) 

Definition at line 71 of file Light.cpp.

sofa::component::visualmodel::Light::~Light (  )  [virtual]

Definition at line 77 of file Light.cpp.


Member Function Documentation

void sofa::component::visualmodel::Light::draw (  )  [inline, virtual]

Render internal data of this object, for debugging purposes.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 71 of file Light.h.

void sofa::component::visualmodel::Light::drawLight (  )  [virtual]

void sofa::component::visualmodel::Light::init ( void   )  [virtual]

Initialization method called at graph modification, during bottom-up traversal.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 86 of file Light.cpp.

References sofa::core::objectmodel::BaseObject::getContext(), and sofa::component::visualmodel::LightManager::putLight().

void sofa::component::visualmodel::Light::initVisual (  )  [virtual]

Initialize the textures, or other graphical resources.

Called once before the first frame is drawn, and if the graphical context has been recreated.

Reimplemented from sofa::core::VisualModel.

Reimplemented in sofa::component::visualmodel::DirectionalLight, sofa::component::visualmodel::PositionalLight, and sofa::component::visualmodel::SpotLight.

Definition at line 95 of file Light.cpp.

References color, sofa::core::objectmodel::Data< T >::getValue(), and lightID.

Referenced by reinit().

void sofa::component::visualmodel::Light::reinit (  )  [virtual]

Update method called when variables used in precomputation are modified.

Reimplemented from sofa::core::objectmodel::BaseObject.

Reimplemented in sofa::component::visualmodel::DirectionalLight, sofa::component::visualmodel::PositionalLight, and sofa::component::visualmodel::SpotLight.

Definition at line 107 of file Light.cpp.

References initVisual().

void sofa::component::visualmodel::Light::setID ( const GLint &  id  ) 

Definition at line 81 of file Light.cpp.

References lightID.

Referenced by sofa::component::visualmodel::LightManager::putLight().

void sofa::component::visualmodel::Light::update (  )  [inline, virtual]

used to update the model if necessary.

Deprecated:
Use updateVisual() instead.

Reimplemented from sofa::core::VisualModel.

Definition at line 73 of file Light.h.


Field Documentation

Definition at line 58 of file Light.h.

Referenced by initVisual().


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

Generated on Sun Nov 23 04:21:43 2008 for Sofa by  doxygen 1.5.7.1