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

SIGEL_Visualisation::SIG_SimulationVisualisation Class Reference

This class is used to visualize simulations. More...

#include <SIG_SimulationVisualisation.h>

Inheritance diagram for SIGEL_Visualisation::SIG_SimulationVisualisation:

SIGEL_Visualisation::SIG_Visualisation List of all members.

Public Methods

 SIG_SimulationVisualisation (SIGEL_Robot::SIG_Robot const &robot, SIGEL_Environment::SIG_Environment const &environment, SIGEL_Simulation::SIG_SimulationParameters const &simulationParameter, SIGEL_Program::SIG_Program const &program)
 The constructor of the SIG_SimulationVisualisation. More...

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

void setPointsVisible ( bool visible )
void setPlaneColor ( QColor newColor )
void setShowPlane ( bool newShowPlane )
void setShowGrid ( bool newShowGrid )
void setShowRobotPath ( bool newShowRobotPath )
void visualize ()
 This method finally initiates the calling of certain OpenGL rendering commands. More...

void makeTimeSteps (int noOfTimeSteps) throw (SIGEL_Simulation::SIG_SimulationCannotSolveException)
 This method lets the simulation progress and updates internal data structures (for example position and rotation of objects). More...

QTime getSimulationTime () const
DL_vector getRobotPosition () const
DL_matrix getRobotRotation () const
bool exportToPovray ( QString includeFilename, QString fileName )
bool createPovrayIncludeFile ( QString filename, double aspectRatio )

Private Methods

void updateRobotLinks ()
 Reads the actual positions and rotations of the robot's links from the renderRecorder and writes them in the appropriate elements of the attribute sceneObjects of the robotRenderer. More...

void updateRobotPoints ()
 Reads the actual positions and rotations of the robot's links and sets the according values of the appropriate robot points. More...


Private Attributes

SIG_EnvironmentRenderer environmentRenderer
 The SIG_EnvironmentRenderer object that is responsible for the rendering of the environment. More...

SIG_RobotRenderer robotRenderer
 The SIG_RobotRenderer object that is responsible for the rendering of the robot. More...

SIGEL_Robot::SIG_Robot const& robot
 The SIG_Robot object that should take part in the simulation. More...

SIGEL_Environment::SIG_Environment
const& 
environment
 The SIG_Environment object that should take part in the simulation. More...

SIG_RenderRecorderrenderRecorder
 The pointer to the SIG_RenderRecorder object that is used to retrieve acutal information about the elements of the simulation. More...

SIGEL_Simulation::SIG_Simulationsimulation
 The pointer to the SIG_Simulation that should be visualized. More...

SIGEL_Simulation::SIG_SimulationParameters
const 
simulationParameter
 The SIG_SimulationParameter that should be used in the simulation. More...

SIGEL_Program::SIG_Program
const& 
program
 The SIG_Program object that should take part in the simulation. More...

int frameCounter
int robotPathPointAddingRate

Detailed Description

This class is used to visualize simulations.

Like classes inherited from SIG_GPFitnessFunction, the SIG_SimulationVisualisation contains a SIG_Simulation object and uses a class inherited from the SIG_Recorder class (the SIG_RenderRecorder) to retrieve information from the simulation. Besides the inherited method visualize there is a method makeTimeSteps that effects the progress of the contained simulation and visualisation data structures.

Definition at line 31 of file SIG_SimulationVisualisation.h.


Constructor & Destructor Documentation

SIGEL_Visualisation::SIG_SimulationVisualisation::SIG_SimulationVisualisation ( SIGEL_Robot::SIG_Robot const & robot,
SIGEL_Environment::SIG_Environment const & environment,
SIGEL_Simulation::SIG_SimulationParameters const & simulationParameter,
SIGEL_Program::SIG_Program const & program )
 

The constructor of the SIG_SimulationVisualisation.

It initializes the references that are used to acces the elements that take part in the simulation/visualisation. It creates the SIG_Simulation and SIG_RenderRecorder objects. It initializes the OpenGL stuff.

Parameters:
robot   The robot used for the simulation.
environment   The environment used for the simulation.
simulationParameter   The simulation parameters used for the simulation.
program   The robot control program used for the simulation.

Definition at line 10 of file SIG_SimulationVisualisation.cpp.

SIGEL_Visualisation::SIG_SimulationVisualisation::~SIG_SimulationVisualisation ( )
 

The destructor of the SIG_SimulationVisualisation.

Cleans up the OpenGL stuff and deletes the simulation and the renderRecorder.

Definition at line 45 of file SIG_SimulationVisualisation.cpp.


Member Function Documentation

bool SIGEL_Visualisation::SIG_SimulationVisualisation::createPovrayIncludeFile ( QString fileName,
double aspectRatio )
 

Definition at line 224 of file SIG_SimulationVisualisation.cpp.

bool SIGEL_Visualisation::SIG_SimulationVisualisation::exportToPovray ( QString includeFilename,
QString fileName )
 

Definition at line 166 of file SIG_SimulationVisualisation.cpp.

DL_vector SIGEL_Visualisation::SIG_SimulationVisualisation::getRobotPosition ( ) const
 

Definition at line 152 of file SIG_SimulationVisualisation.cpp.

DL_matrix SIGEL_Visualisation::SIG_SimulationVisualisation::getRobotRotation ( ) const
 

Definition at line 159 of file SIG_SimulationVisualisation.cpp.

QTime SIGEL_Visualisation::SIG_SimulationVisualisation::getSimulationTime ( ) const
 

Definition at line 147 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::makeTimeSteps ( int noOfTimeSteps ) throw (SIGEL_Simulation::SIG_SimulationCannotSolveException)
 

This method lets the simulation progress and updates internal data structures (for example position and rotation of objects).

Parameters:
noOfTimeSteps   The number of timeSteps the simulation should progress about.

Definition at line 92 of file SIG_SimulationVisualisation.cpp.

Referenced by SIG_SimulationVisualisationWidget::makeTimeSteps().

void SIGEL_Visualisation::SIG_SimulationVisualisation::setPlaneColor ( QColor newColor )
 

Definition at line 56 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::setPointsVisible ( bool visible )
 

Definition at line 51 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::setShowGrid ( bool newShowGrid )
 

Definition at line 72 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::setShowPlane ( bool newShowPlane )
 

Definition at line 67 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::setShowRobotPath ( bool newShowRobotPath )
 

Definition at line 77 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::updateRobotLinks ( ) [private]
 

Reads the actual positions and rotations of the robot's links from the renderRecorder and writes them in the appropriate elements of the attribute sceneObjects of the robotRenderer.

Is called by the constructor for setting up the initial robot. Is called in makeTimeSteps.

Definition at line 124 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::updateRobotPoints ( ) [private]
 

Reads the actual positions and rotations of the robot's links and sets the according values of the appropriate robot points.

Is called by the constructor for setting up the initial robot. Is called in makeTimeSteps.

Definition at line 134 of file SIG_SimulationVisualisation.cpp.

void SIGEL_Visualisation::SIG_SimulationVisualisation::visualize ( ) [virtual]
 

This method finally initiates the calling of certain OpenGL rendering commands.

They refresh the active framebuffer of the current OpenGL context according to the current state of the simulation and the attribute viewSettings.

Reimplemented from SIGEL_Visualisation::SIG_Visualisation.

Definition at line 82 of file SIG_SimulationVisualisation.cpp.


Member Data Documentation

SIGEL_Environment::SIG_Environment const & SIGEL_Visualisation::SIG_SimulationVisualisation::environment [private]
 

The SIG_Environment object that should take part in the simulation.

Definition at line 141 of file SIG_SimulationVisualisation.h.

SIG_EnvironmentRenderer SIGEL_Visualisation::SIG_SimulationVisualisation::environmentRenderer [private]
 

The SIG_EnvironmentRenderer object that is responsible for the rendering of the environment.

While this SIG_SimulationVisualisation object takes care of all OpenGL related things to be done (framebuffer initialization and setting of OpenGL state variables for example), the final rendering of the environment is done by the environmentRenderer.

Definition at line 116 of file SIG_SimulationVisualisation.h.

int SIGEL_Visualisation::SIG_SimulationVisualisation::frameCounter [private]
 

Definition at line 171 of file SIG_SimulationVisualisation.h.

SIGEL_Program::SIG_Program const & SIGEL_Visualisation::SIG_SimulationVisualisation::program [private]
 

The SIG_Program object that should take part in the simulation.

Definition at line 169 of file SIG_SimulationVisualisation.h.

SIG_RenderRecorder * SIGEL_Visualisation::SIG_SimulationVisualisation::renderRecorder [private]
 

The pointer to the SIG_RenderRecorder object that is used to retrieve acutal information about the elements of the simulation.

Is created in the constructor.

Definition at line 150 of file SIG_SimulationVisualisation.h.

SIGEL_Robot::SIG_Robot const & SIGEL_Visualisation::SIG_SimulationVisualisation::robot [private]
 

The SIG_Robot object that should take part in the simulation.

Definition at line 135 of file SIG_SimulationVisualisation.h.

int SIGEL_Visualisation::SIG_SimulationVisualisation::robotPathPointAddingRate [private]
 

Definition at line 173 of file SIG_SimulationVisualisation.h.

SIG_RobotRenderer SIGEL_Visualisation::SIG_SimulationVisualisation::robotRenderer [private]
 

The SIG_RobotRenderer object that is responsible for the rendering of the robot.

While this SIG_SimulationVisualisation object takes care of all OpenGL related things to be done (framebuffer initialization and setting of OpenGL state variables for example), the final rendering of the robot is done by the robotRenderer.

Definition at line 129 of file SIG_SimulationVisualisation.h.

SIGEL_Simulation::SIG_Simulation * SIGEL_Visualisation::SIG_SimulationVisualisation::simulation [private]
 

The pointer to the SIG_Simulation that should be visualized.

Is created in the constructor.

Definition at line 157 of file SIG_SimulationVisualisation.h.

SIGEL_Simulation::SIG_SimulationParameters const SIGEL_Visualisation::SIG_SimulationVisualisation::simulationParameter [private]
 

The SIG_SimulationParameter that should be used in the simulation.

Definition at line 163 of file SIG_SimulationVisualisation.h.


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