#include <LightObjectGL.h>
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.
Neu - the main GUI window which also handles the light model.
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 Matrix4 * | get_BaseRotation (void) |
Returns the current base rotation matrix. | |
__property Matrix4 * | get_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. | |
Matrix4 * | m_OffsetRotation |
Saves the current offset rotation matrix. | |
Matrix4 * | m_BaseRotation |
Saves the current base rotation matrix. | |
Matrix4 * | m_DefaultRotation |
Saves the current default rotation matrix. | |
Light * | m_LightModel |
Saves the current light model with all needed light attributes. | |
unsigned char | m_LightViewMode |
Saves the current light view mode. |
|
This is the standard constructor. All member variables of this new instance will be set to zero/null. |
|
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.
|
|
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.
|
|
Defines the standard light arrow in OpenGL as an OpenGL display list.
|
|
Defines the standard light orientation interface in OpenGL as an OpenGL display list.
|
|
This function overwrites the base draw funtion of the class OpenGLCode. It contains the actual drawing code in OpenGL and also performs the code. |
|
Returns the current base rotation matrix.
|
|
Returns the current offset rotation matrix.
|
|
This function overwrites the base init funtion of the class OpenGLCode. It contains the actual initialization code in OpenGL and also performs the code. |
|
Multiplies the specified base rotation matrix to the current base rotation matrix of this instance.
|
|
Multiplies the specified offset rotation matrix to the current offset rotation matrix of this instance.
|
|
Sets the current base rotation matrix to saved default rotation matrix (default light direction).
|
|
Sets a new base rotation matrix.
|
|
Sets a new canvas background color.
|
|
Sets a new light view mode.
|
|
Sets a new canvas width for the correct drawing of light arrow and orientation interface.
|
|
Sets a new offset rotation matrix.
|
|
Sets the flag whether the proxy object is already drawn.
|
|
Sets a new light user-defined light model.
|
|
Saves the current light model with all needed light attributes. This light attributes are direction and color. |
|
Saves the current light view mode.
This folowing light modes are possible:
|