Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_Visualisation::SIG_VisualSceneObject Class Reference

This class models a renderable object. More...

#include <SIG_VisualSceneObject.h>

Inheritance diagram for SIGEL_Visualisation::SIG_VisualSceneObject:

SIGEL_Visualisation::SIG_SceneObject List of all members.

Public Methods

 SIG_VisualSceneObject (int number, QString name, DL_vector position = DL_vector(), DL_matrix rotation = DL_matrix(), DL_vector color = DL_vector())
 The constructor of the SIG_VisualSceneObject. More...

int getNumber ()
 Gets the objects number. More...

void setPosition (DL_vector newPosition)
 Sets the object's position. More...

DL_vector getPosition () const
 Gets the object's position. More...

void setRotation (DL_matrix newRotation)
 Sets the object's rotation. More...

DL_matrix getRotation () const
 Gets the object's rotation. More...

void setColor (DL_vector newColor)
 Sets the object's color. More...

DL_vector getColor () const
 Gets the object's color. More...

void applyTransformation ()
 Executes appropriate OpenGL commands to apply this object's transformation matrix transformationInternal. More...

void applyColor ()
 Executes appropriate OpenGL command to apply this object's color by using the attribute coloInternal. More...

void setVisible ( bool newVisible )
 Sets the attribute visible. More...

bool getVisible ()
 Gets the attribute visible. More...

void setFloatingText ( SIG_FloatingText *newFloatingText )
SIG_FloatingText* getFloatingText ()

Public Attributes

QString const name
 The name of this SIG_VisualSceneObject. More...


Private Methods

void updatePositionInternal ()
 Recalculate the elements of the attribute transformationInternal dependent from the attribute position from the actual position. More...

void updateRotationInternal ()
 Recalculate the elements of the attribute transformationInternal dependent from the attribute rotation from the actual rotation. More...

void updateColorInternal ()
 Sets the elements of the attribute colorInternal according to the attribute color. More...


Private Attributes

DL_vector color
 The current color of this SIG_VisualSceneObject. More...

QArray<GLdouble> transformationInternal
 Internal representation of the attributes position and rotation as a homogenous transformation matrix. More...

QArray<GLdouble> colorInternal
 Internal representation the attribute color. More...

bool visible
 Controls if the object is rendered. More...

SIG_FloatingText* floatingText

Detailed Description

This class models a renderable object.

The inherited attributes are now private. They may be only accessed via the appropriate set- ang get-methods, because their setting influences internal OpenGL-data. Together with color information it contains everything that can change during general visualisation (highlighting for example).

Definition at line 27 of file SIG_VisualSceneObject.h.


Constructor & Destructor Documentation

SIGEL_Visualisation::SIG_VisualSceneObject::SIG_VisualSceneObject ( int number,
QString name,
DL_vector position = DL_vector(),
DL_matrix rotation = DL_matrix(),
DL_vector color = DL_vector() )
 

The constructor of the SIG_VisualSceneObject.

Initializes the attributes.

Parameters:
number   Initializes the attribute number.
name   Initializes the attribute name.
position   Initializes the attribute position.
color   Initializes the attribute color.

Definition at line 5 of file SIG_VisualSceneObject.cpp.


Member Function Documentation

void SIGEL_Visualisation::SIG_VisualSceneObject::applyColor ( )
 

Executes appropriate OpenGL command to apply this object's color by using the attribute coloInternal.

Definition at line 70 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::applyTransformation ( )
 

Executes appropriate OpenGL commands to apply this object's transformation matrix transformationInternal.

Definition at line 65 of file SIG_VisualSceneObject.cpp.

DL_vector SIGEL_Visualisation::SIG_VisualSceneObject::getColor ( ) const
 

Gets the object's color.

Definition at line 60 of file SIG_VisualSceneObject.cpp.

SIG_FloatingText * SIGEL_Visualisation::SIG_VisualSceneObject::getFloatingText ( )
 

Definition at line 109 of file SIG_VisualSceneObject.cpp.

int SIGEL_Visualisation::SIG_VisualSceneObject::getNumber ( void )
 

Gets the objects number.

Definition at line 27 of file SIG_VisualSceneObject.cpp.

DL_vector SIGEL_Visualisation::SIG_VisualSceneObject::getPosition ( ) const
 

Gets the object's position.

Definition at line 38 of file SIG_VisualSceneObject.cpp.

DL_matrix SIGEL_Visualisation::SIG_VisualSceneObject::getRotation ( ) const
 

Gets the object's rotation.

Definition at line 49 of file SIG_VisualSceneObject.cpp.

bool SIGEL_Visualisation::SIG_VisualSceneObject::getVisible ( )
 

Gets the attribute visible.

Definition at line 99 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::setColor ( DL_vector newColor )
 

Sets the object's color.

Sets the attribute color and updates the attribute colorInternal.

Definition at line 54 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::setFloatingText ( SIG_FloatingText * newFloatingText )
 

Definition at line 104 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::setPosition ( DL_vector newPosition )
 

Sets the object's position.

Sets the attribute position and updates the transformation matrix transformationInternal. The last task is performed by calling the method updateTransformationInternal.

Definition at line 32 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::setRotation ( DL_matrix newRotation )
 

Sets the object's rotation.

Sets the attribute rotation and updates the transformation matrix transformationInternal. The last task is performed by calling the method updateTransformationInternal.

Definition at line 43 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::setVisible ( bool newVisible )
 

Sets the attribute visible.

Definition at line 94 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::updateColorInternal ( ) [private]
 

Sets the elements of the attribute colorInternal according to the attribute color.

Definition at line 88 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::updatePositionInternal ( ) [private]
 

Recalculate the elements of the attribute transformationInternal dependent from the attribute position from the actual position.

Definition at line 75 of file SIG_VisualSceneObject.cpp.

void SIGEL_Visualisation::SIG_VisualSceneObject::updateRotationInternal ( ) [private]
 

Recalculate the elements of the attribute transformationInternal dependent from the attribute rotation from the actual rotation.

Definition at line 81 of file SIG_VisualSceneObject.cpp.


Member Data Documentation

DL_vector SIGEL_Visualisation::SIG_VisualSceneObject::color [private]
 

The current color of this SIG_VisualSceneObject.

Definition at line 156 of file SIG_VisualSceneObject.h.

QArray< GLdouble > SIGEL_Visualisation::SIG_VisualSceneObject::colorInternal [private]
 

Internal representation the attribute color.

Used for OpenGL rendering. The QArray contains the R, G and B components of the object's color.

Definition at line 182 of file SIG_VisualSceneObject.h.

SIG_FloatingText * SIGEL_Visualisation::SIG_VisualSceneObject::floatingText [private]
 

Definition at line 189 of file SIG_VisualSceneObject.h.

QString const SIGEL_Visualisation::SIG_VisualSceneObject::name
 

The name of this SIG_VisualSceneObject.

Definition at line 127 of file SIG_VisualSceneObject.h.

QArray< GLdouble > SIGEL_Visualisation::SIG_VisualSceneObject::transformationInternal [private]
 

Internal representation of the attributes position and rotation as a homogenous transformation matrix.

Used for OpenGL rendering. The QArray contains the matrix columnwise, so it should contain 16 elements.

Invariant:
transformationInternal has to perform the same transformation as a rotation about the attribute rotation and a translation about the attribute position. This is guaranted by the method updateTransformationInternal.

Definition at line 173 of file SIG_VisualSceneObject.h.

bool SIGEL_Visualisation::SIG_VisualSceneObject::visible [private]
 

Controls if the object is rendered.

Definition at line 187 of file SIG_VisualSceneObject.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:59 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000