Main Page | Packages | Class Hierarchy | Class List | Directories | Class Members

IDVR.Tools.OpenGLTools.LightObjectGL Class Reference

#include <LightObjectGL.h>

List of all members.


Detailed Description

Class for drawing the light icon onto the canvas.

This class is part of the OpenGLTools namespace which is actually a subnamespace of the main namespace Tools.

The task of this class is not included in the actual rendering process and the succeeding drawing, but to handle the correct display of the light icon an the screen which actually shows the user all information about current light color and light direction. The used values for color and direction are, of course, depending on the current choosen light model which the user can controll over the main GUI window (see class Neu).

As every other class of the subpackage OpenGLTools this class has the base class OpenGLCode of the CSOpenGL library to correctly implement the OpenGL code Which will be handled by the OpenGLPanel which will show the specific drawing results on the screen.

Recapitulatory, the task of this class is the correct drawing of the light icin which is standard length arrow to visualize the light direction and color.

See also:
OpenGLCanvas - the GUI class for the canvas with its draw control

Neu - the main GUI window which also handles the light model.

Author:
Bernhard Pflugfelder
Version:
1.0
Date:
02-20-2005


Public Member Functions

 LightObjectGL (void)
 This is the standard constructor.
 LightObjectGL (int n_CanvasLength, Light *n_LightModel)
 Constructor initialization with the valid light model.
 LightObjectGL (int n_CanvasLength, Light *n_LightModel, Matrix4 *n_DefaultRotation)
 Constructor initialization with the valid light model and a default rotation.
virtual void Init (void)
 This function overwrites the base init funtion of the class OpenGLCode.
virtual void Draw (void)
 This function overwrites the base draw funtion of the class OpenGLCode.
__property void set_BaseRotation (Matrix4 *n_BaseRotation)
 Sets a new base rotation matrix.
__property void set_OffsetRotation (Matrix4 *n_OffsetRotation)
 Sets a new offset rotation matrix.
__property void set_NewCanvasSize (int n_CanvasLength)
 Sets a new canvas width for the correct drawing of light arrow and orientation interface.
__property void set_CanvasBackColor (Color n_CanvasBackColor)
 Sets a new canvas background color.
__property void set_ProxyDrawnMode (bool n_IsProxyDrawn)
 Sets the flag whether the proxy object is already drawn.
__property void set_LightViewMode (unsigned char n_LightViewMode)
 Sets a new light view mode.
__property Matrix4get_BaseRotation (void)
 Returns the current base rotation matrix.
__property Matrix4get_OffsetRotation (void)
 Returns the current offset rotation matrix.
void setLightModel (Light *n_LightModel)
 Sets a new light user-defined light model.
void modifyOffsetRotation (Matrix4 *n_OffsetRotation)
 Multiplies the specified offset rotation matrix to the current offset rotation matrix of this instance.
void modifyBaseRotation (Matrix4 *n_BaseRotation)
 Multiplies the specified base rotation matrix to the current base rotation matrix of this instance.
void resetToBaseLightDirection (void)
 Sets the current base rotation matrix to saved default rotation matrix (default light direction).

Private Member Functions

void defineArrowObject (void)
 Defines the standard light arrow in OpenGL as an OpenGL display list.
void defineOrientationInterface (void)
 Defines the standard light orientation interface in OpenGL as an OpenGL display list.

Private Attributes

float m_CanvasBackColor __gc []
 Saves the current canvas background color.
unsigned int m_ArrowObject
 Saves the index of the used OpenGL texture object for the light arrow.
unsigned int m_OrientationInterface
 Saves the index of the used OpenGL texture object for the orientation interface which will be drawn around the light arrow.
short m_CanvasLength
 Saves the width of the current canvas.
bool m_IsProxyDrawn
 Saves the status whether the proxy object has been already drawn.
Matrix4m_OffsetRotation
 Saves the current offset rotation matrix.
Matrix4m_BaseRotation
 Saves the current base rotation matrix.
Matrix4m_DefaultRotation
 Saves the current default rotation matrix.
Lightm_LightModel
 Saves the current light model with all needed light attributes.
unsigned char m_LightViewMode
 Saves the current light view mode.


Constructor & Destructor Documentation

LightObjectGL::LightObjectGL void   ) 
 

This is the standard constructor.

All member variables of this new instance will be set to zero/null.

LightObjectGL::LightObjectGL int  n_CanvasLength,
Light n_LightModel
 

Constructor initialization with the valid light model.

All member variables will be set to zero besides the canvas length member variable and the light model member variable.

Parameters:
n_CanvasLength the width of the current canvas.
n_LightModel the current user-defined light model.

LightObjectGL::LightObjectGL int  n_CanvasLength,
Light n_LightModel,
Matrix4 n_DefaultRotation
 

Constructor initialization with the valid light model and a default rotation.

All member variables will be set to zero besides the canvas length member variables and the light model member variable.

Parameters:
n_CanvasLength the width of the current canvas.
n_LightModel the current user-defined light model.
n_DefaultRotation the default rotation matrix.


Member Function Documentation

void LightObjectGL::defineArrowObject void   )  [private]
 

Defines the standard light arrow in OpenGL as an OpenGL display list.

void LightObjectGL::defineOrientationInterface void   )  [private]
 

Defines the standard light orientation interface in OpenGL as an OpenGL display list.

void LightObjectGL::Draw void   )  [virtual]
 

This function overwrites the base draw funtion of the class OpenGLCode.

It contains the actual drawing code in OpenGL and also performs the code.

Matrix4 * LightObjectGL::get_BaseRotation void   ) 
 

Returns the current base rotation matrix.

Returns:
The current base rotation matrix as an instance of the Matrix4 class.

Matrix4 * LightObjectGL::get_OffsetRotation void   ) 
 

Returns the current offset rotation matrix.

Returns:
The current offset rotation matrix as an instance of the Matrix4 class.

void LightObjectGL::Init void   )  [virtual]
 

This function overwrites the base init funtion of the class OpenGLCode.

It contains the actual initialization code in OpenGL and also performs the code.

void LightObjectGL::modifyBaseRotation Matrix4 n_BaseRotation  ) 
 

Multiplies the specified base rotation matrix to the current base rotation matrix of this instance.

Parameters:
n_BaseRotation the new base offset matrix.

void LightObjectGL::modifyOffsetRotation Matrix4 n_OffsetRotation  ) 
 

Multiplies the specified offset rotation matrix to the current offset rotation matrix of this instance.

Parameters:
n_OffsetRotation the new offset offset matrix.

void LightObjectGL::resetToBaseLightDirection void   ) 
 

Sets the current base rotation matrix to saved default rotation matrix (default light direction).

void LightObjectGL::set_BaseRotation Matrix4 n_BaseRotation  ) 
 

Sets a new base rotation matrix.

Parameters:
n_BaseRotation the new base rotation matrix.

void LightObjectGL::set_CanvasBackColor Color  n_CanvasBackColor  ) 
 

Sets a new canvas background color.

Parameters:
n_CanvasBackColor the new canvas background color as an instance of the standard color class.

void LightObjectGL::set_LightViewMode unsigned char  n_LightViewMode  ) 
 

Sets a new light view mode.

Parameters:
n_LightViewMode the new light view mode.

void LightObjectGL::set_NewCanvasSize int  n_CanvasLength  ) 
 

Sets a new canvas width for the correct drawing of light arrow and orientation interface.

Parameters:
n_CanvasLength the new base rotation matrix.

void LightObjectGL::set_OffsetRotation Matrix4 n_OffsetRotation  ) 
 

Sets a new offset rotation matrix.

Parameters:
n_OffsetRotation the new base offset matrix.

void LightObjectGL::set_ProxyDrawnMode bool  n_IsProxyDrawn  ) 
 

Sets the flag whether the proxy object is already drawn.

Parameters:
n_IsProxyDrawn the corresponding bool value.

void LightObjectGL::setLightModel Light n_LightModel  ) 
 

Sets a new light user-defined light model.

Parameters:
n_LightModel the new light model which conatins light direction and color.


Member Data Documentation

Light* IDVR.Tools.OpenGLTools.LightObjectGL.m_LightModel [private]
 

Saves the current light model with all needed light attributes.

This light attributes are direction and color.

unsigned char IDVR.Tools.OpenGLTools.LightObjectGL.m_LightViewMode [private]
 

Saves the current light view mode.

This folowing light modes are possible:

  • Absolute view mode

  • Relative view mode


The documentation for this class was generated from the following files:
Generated on Sat Apr 9 11:51:00 2005 for RayCaster wiht Importance Driven Volume Rendering (IDVR) by  doxygen 1.4.1