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

SIGEL_Visualisation::SIG_Renderer Class Reference

This is the abstract superclass of all concrete Renderer classes. More...

#include <SIG_Renderer.h>

Inheritance diagram for SIGEL_Visualisation::SIG_Renderer:

SIGEL_Visualisation::SIG_EnvironmentRenderer SIGEL_Visualisation::SIG_RobotRenderer List of all members.

Public Methods

 SIG_Renderer (int noOfObjects, int noOfFloatingTexts)
 The constructor of the SIG_Renderer. More...

 ~SIG_Renderer ()
 The destructor of the SIG_Renderer. More...

virtual void render () = 0
 This method finally starts the rendering into the current OpenGL context. More...

virtual QString exportToPovray () = 0
virtual QString createPovrayDeclarations () = 0

Public Attributes

QVector<SIG_VisualSceneObjectsceneObjects
 The array of SIG_VisualSceneObjects. More...

QVector<SIG_FloatingText> floatingTexts

Static Public Methods

QString vectorToPovray ( NEWMAT::ColumnVector input )

Protected Methods

virtual void buildDisplayLists () = 0
 This method builds the OpenGL display lists. More...

void renderSceneObjects ()
 This method calls all the display lists of this SIG_Renderer. More...

QString exportSceneObjectsToPovray ()

Protected Attributes

GLuint displayListsOffset
 The number of the first display list of this SIG_Renderer. More...

GLuint noOfObjects
 The number of objects in sceneObjects, which should be rendered by the method renderSceneObjects. More...


Detailed Description

This is the abstract superclass of all concrete Renderer classes.

Its task is to execute the appropriate OpenGL-commands to render something. What is rendered is specified in the subclasses.

Definition at line 24 of file SIG_Renderer.h.


Constructor & Destructor Documentation

SIGEL_Visualisation::SIG_Renderer::SIG_Renderer ( int noOfObjects,
int noOfFloatingTexts )
 

The constructor of the SIG_Renderer.

May used to initialize some stuff concerning the OpenGL context. This could be the allocating of display lists indices and the call of the buildDisplayLists method.

Parameters:
noOfObjects   Becomes the value of the attribute noOfObjects and initializes the sizes of sceneObjects.
noOfFloatingTexts   Intializes the size of floatingTexts.

Definition at line 9 of file SIG_Renderer.cpp.

SIGEL_Visualisation::SIG_Renderer::~SIG_Renderer ( )
 

The destructor of the SIG_Renderer.

May used to clean up some OpenGL stuff. For example the display lists could be cleared.

Definition at line 22 of file SIG_Renderer.cpp.


Member Function Documentation

void SIGEL_Visualisation::SIG_Renderer::buildDisplayLists ( ) [protected, pure virtual]
 

This method builds the OpenGL display lists.

Dependend from the kind of thing that should be rendered a static (geometric) data structure supplied in the subclass could be read. OpenGL commands to draw this geometry are then recorded in display lists.

Reimplemented in SIGEL_Visualisation::SIG_EnvironmentRenderer, and SIGEL_Visualisation::SIG_RobotRenderer.

QString SIGEL_Visualisation::SIG_Renderer::exportSceneObjectsToPovray ( ) [protected]
 

Definition at line 41 of file SIG_Renderer.cpp.

void SIGEL_Visualisation::SIG_Renderer::render ( ) [pure virtual]
 

This method finally starts the rendering into the current OpenGL context.

After the display lists are builded properly they are called in this method to do the rendering of the particular object(s). This is mainly done by calling the method renderSceneObjects. But if there is more to show than just what is defined in the display lists, this method is the place to do it.

Precondition:
The display lists are builded.

Reimplemented in SIGEL_Visualisation::SIG_EnvironmentRenderer, and SIGEL_Visualisation::SIG_RobotRenderer.

void SIGEL_Visualisation::SIG_Renderer::renderSceneObjects ( ) [protected]
 

This method calls all the display lists of this SIG_Renderer.

This is the same procedure for every subclass. This method should be called from the method render.

Precondition:
The display lists are builded.

Definition at line 27 of file SIG_Renderer.cpp.

QString SIGEL_Visualisation::SIG_Renderer::vectorToPovray ( NEWMAT::ColumnVector input ) [static]
 

Definition at line 81 of file SIG_Renderer.cpp.


Member Data Documentation

GLuint SIGEL_Visualisation::SIG_Renderer::displayListsOffset [protected]
 

The number of the first display list of this SIG_Renderer.

Definition at line 95 of file SIG_Renderer.h.

QVector< SIG_FloatingText > SIGEL_Visualisation::SIG_Renderer::floatingTexts
 

Definition at line 87 of file SIG_Renderer.h.

GLuint SIGEL_Visualisation::SIG_Renderer::noOfObjects [protected]
 

The number of objects in sceneObjects, which should be rendered by the method renderSceneObjects.

Definition at line 101 of file SIG_Renderer.h.

QVector< SIG_VisualSceneObject > SIGEL_Visualisation::SIG_Renderer::sceneObjects
 

The array of SIG_VisualSceneObjects.

It contains the actual properties of the objects that are used to render them. Its public so the object containing the SIG_Renderer can change the object properties with the progress of a simulation for example.

Definition at line 85 of file SIG_Renderer.h.


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