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

SIG_SimulationVisualisationWidget Class Reference

This widget finally contains the OpenGL framebuffers in which is rendered by the SIG_SimulationVisualisation object that should be referenced by the inherited pointer visualisation. More...

#include <SIG_SimulationVisualisationWidget.h>

Inheritance diagram for SIG_SimulationVisualisationWidget:

SIGEL_CommonGUI::SIG_VisualisationWidget List of all members.

Public Methods

 SIG_SimulationVisualisationWidget ( QWidget *parent=0, char const *name=0, WFlags f=0 )
 The constructor of the SIG_SimulationVisualisationWidget. More...

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

void visualizeThis (SIGEL_Robot::SIG_Robot const &rrobot, SIGEL_Environment::SIG_Environment const &eenvironment, SIGEL_Simulation::SIG_SimulationParameters const &ssimulationParameters, SIGEL_Program::SIG_Program const &pprogram)
 Deletes the possibly existing SIG_SimulationVisualisation object to which the inherited pointer visualisation points and creates a new one with the supplied arguments. More...

bool simulationRunning ()
 Is true if the simulation is in running state. More...

void resetRecorder ()

Public Slots

void setShowAncorPoints ( int state )
void choosePlaneColor ()
void setShowPlane ( int state )
void setShowGrid ( int state )
void setShowRobotPath ( int state )
void slotStartSimulation ()
 Toggles between playing and pause state of the simulation. More...

void slotStopSimulation ()
 Deletes the actual simulation run and creates a new one. More...

void slotStepSimulation ()
 Effects the progress of the simulation about one timestep. More...

void slotFForwardSimulation ()
 Effects the progress of the simulation about 5 seconds. More...

void slotSetFrameDelay (int fframeDelay)
 Sets the delay between to simulated and visualized timesteps. More...

void slotSetTraceRobot ( bool newValue )
void slotNavigateForward ()
void slotNavigateBackward ()
void slotNavigateRight ()
void slotNavigateLeft ()
void slotNavigateDown ()
void slotNavigateUp ()
void slotNavigateCenter ()
void slotRecordClicked ()
 Sets whether the simulation shall be recorded. More...

void slotAlterMovieSettingsClicked ()
 Used to alter the movie settings. More...


Signals

void signalSimulationProgress ( QTime simulationTime )
void signalPosition ( DL_vector position )
void signalSimulationAbort ()
void signalRecordingAllowed ( bool )

Private Methods

void paintGL ()
 Refreshes the contents of this widget by initiating the execution of appropriate OpenGL drawing commands. More...

void makeTimeSteps (int noOfSteps)
 Let the simulation progress about the supplied number of timesteps. More...

void mousePressEvent ( QMouseEvent *event )
 Just calls SIG_VisualisationWidget::mousePressEvent with the same QMouseEvent. More...

void mouseMoveEvent ( QMouseEvent *event )
 Just calls SIG_VisualisationWidget::mouseMoveEvent with the same QMouseEvent. More...


Private Attributes

QTimer* simulationTimer
 The timer that controls the progress of the simulation. More...

int frameDelay
 The time in ms to wait between to simulationframes. More...

int noOfFFSteps
 The number of timesteps that equal 5 seconds. More...

bool traceRobot
QColor planeColor
bool record
 Indicates whether simulation shall be recorded. More...

bool useLeadingZeros
int movieWidth
int movieHeight
int movieFrequency
int movieMaxFrames
int movieQuality
int currentFrameName
 This is the name for the next frame to be saved (initially 0). More...

int currentFrame
 The number of the actual frame (initially 0). More...

QString movieDirectory
QString movieFilePrefix
QString fileFormat
SIGEL_Robot::SIG_Robot const* robot
 The actual robot to simulate. More...

SIGEL_Environment::SIG_Environment
const* 
environment
 The actual environment to simulate. More...

SIGEL_Simulation::SIG_SimulationParameters
const* 
simulationParameters
 The actual parameters of the simulation. More...

SIGEL_Program::SIG_Program
const* 
program
 The actual program to control the robot in the simulation. More...


Private Slots

void slotSimulationProgress ()
 Lets the simulation progress about one timestep. More...


Detailed Description

This widget finally contains the OpenGL framebuffers in which is rendered by the SIG_SimulationVisualisation object that should be referenced by the inherited pointer visualisation.

It offers interfaces to the simulation relevant settings and functions like controlling the simulation or setting the delay between two frames.

Definition at line 26 of file SIG_SimulationVisualisationWidget.h.


Constructor & Destructor Documentation

SIG_SimulationVisualisationWidget::SIG_SimulationVisualisationWidget ( QWidget * parent = 0,
char const * name = 0,
WFlags f = 0 )
 

The constructor of the SIG_SimulationVisualisationWidget.

Parameters:
parent   Pointer to this widget's parent.
name   This widget's name.
f   The widget flag of this widget.

Definition at line 18 of file SIG_SimulationVisualisationWidget.cpp.

SIG_SimulationVisualisationWidget::~SIG_SimulationVisualisationWidget ( )
 

The destructor of the SIG_SimulationVisualisationWidget.

Definition at line 55 of file SIG_SimulationVisualisationWidget.cpp.


Member Function Documentation

void SIG_SimulationVisualisationWidget::choosePlaneColor ( ) [slot]
 

Definition at line 74 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::makeTimeSteps ( int noOfSteps ) [private]
 

Let the simulation progress about the supplied number of timesteps.

Parameters:
noOfSteps   The number of timesteps to progress.

Definition at line 169 of file SIG_SimulationVisualisationWidget.cpp.

Referenced by slotFForwardSimulation(), slotSimulationProgress(), and slotStepSimulation().

void SIG_SimulationVisualisationWidget::mouseMoveEvent ( QMouseEvent * event ) [private, virtual]
 

Just calls SIG_VisualisationWidget::mouseMoveEvent with the same QMouseEvent.

Reimplemented from SIGEL_CommonGUI::SIG_VisualisationWidget.

Definition at line 164 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::mousePressEvent ( QMouseEvent * event ) [private, virtual]
 

Just calls SIG_VisualisationWidget::mousePressEvent with the same QMouseEvent.

Reimplemented from SIGEL_CommonGUI::SIG_VisualisationWidget.

Definition at line 159 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::paintGL ( ) [private, virtual]
 

Refreshes the contents of this widget by initiating the execution of appropriate OpenGL drawing commands.

This methid is inherited from the QGLWidget. It is called automatically by the QT runtime system. In some cases it is also called by other methods (when changing the eyepoint while automaticRefresh being true). This is only done indirectly by calling the method updateGL.

Reimplemented from SIGEL_CommonGUI::SIG_VisualisationWidget.

Definition at line 604 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::resetRecorder ( )
 

Definition at line 302 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::setShowAncorPoints ( int state ) [virtual, slot]
 

Reimplemented from SIGEL_CommonGUI::SIG_VisualisationWidget.

Definition at line 58 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::setShowGrid ( int state ) [slot]
 

Definition at line 115 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::setShowPlane ( int state ) [slot]
 

Definition at line 93 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::setShowRobotPath ( int state ) [slot]
 

Definition at line 137 of file SIG_SimulationVisualisationWidget.cpp.

bool SIG_SimulationVisualisationWidget::simulationRunning ( )
 

Is true if the simulation is in running state.

Definition at line 309 of file SIG_SimulationVisualisationWidget.cpp.

Referenced by makeTimeSteps(), slotFForwardSimulation(), slotStartSimulation(), slotStepSimulation(), and slotStopSimulation().

void SIG_SimulationVisualisationWidget::slotAlterMovieSettingsClicked ( ) [slot]
 

Used to alter the movie settings.

Definition at line 538 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotFForwardSimulation ( ) [slot]
 

Effects the progress of the simulation about 5 seconds.

Definition at line 350 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotNavigateBackward ( ) [slot]
 

Definition at line 407 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotNavigateCenter ( ) [slot]
 

Definition at line 511 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotNavigateDown ( ) [slot]
 

Definition at line 481 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotNavigateForward ( ) [slot]
 

Definition at line 381 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotNavigateLeft ( ) [slot]
 

Definition at line 455 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotNavigateRight ( ) [slot]
 

Definition at line 429 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotNavigateUp ( ) [slot]
 

Definition at line 496 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotRecordClicked ( ) [slot]
 

Sets whether the simulation shall be recorded.

Definition at line 533 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotSetFrameDelay ( int fframeDelay ) [slot]
 

Sets the delay between to simulated and visualized timesteps.

Has only effects when the simulation in running.

Parameters:
frameDelay   The new framedelay.

Definition at line 359 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotSetTraceRobot ( bool newValue ) [slot]
 

Definition at line 373 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotSimulationProgress ( ) [private, slot]
 

Lets the simulation progress about one timestep.

Updates the widget's contents. This slot is connected to the timeout signal of the simulationTimer.

Definition at line 367 of file SIG_SimulationVisualisationWidget.cpp.

Referenced by SIG_SimulationVisualisationWidget().

void SIG_SimulationVisualisationWidget::slotStartSimulation ( ) [slot]
 

Toggles between playing and pause state of the simulation.

Definition at line 314 of file SIG_SimulationVisualisationWidget.cpp.

Referenced by makeTimeSteps(), and slotStopSimulation().

void SIG_SimulationVisualisationWidget::slotStepSimulation ( ) [slot]
 

Effects the progress of the simulation about one timestep.

Definition at line 341 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::slotStopSimulation ( ) [slot]
 

Deletes the actual simulation run and creates a new one.

Definition at line 328 of file SIG_SimulationVisualisationWidget.cpp.

void SIG_SimulationVisualisationWidget::visualizeThis ( SIGEL_Robot::SIG_Robot const & rrobot,
SIGEL_Environment::SIG_Environment const & eenvironment,
SIGEL_Simulation::SIG_SimulationParameters const & ssimulationParameters,
SIGEL_Program::SIG_Program const & pprogram )
 

Deletes the possibly existing SIG_SimulationVisualisation object to which the inherited pointer visualisation points and creates a new one with the supplied arguments.

Parameters:
rrobot   The robot that should take part in the simulation.
eenvironment   The environment that should take part in the simulation.
ssimulationParameters   The parameters of the simulation.
pprogram   The program that should control the robot in the simulation.

Definition at line 266 of file SIG_SimulationVisualisationWidget.cpp.

Referenced by slotStopSimulation().


Member Data Documentation

int SIG_SimulationVisualisationWidget::currentFrame [private]
 

The number of the actual frame (initially 0).

When the stop button is hit this value has to be resetted to 0.

Definition at line 187 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::currentFrameName [private]
 

This is the name for the next frame to be saved (initially 0).

currentFrameName does not have to be equal to current frame as it is possible to save every n-th frame.

Definition at line 180 of file SIG_SimulationVisualisationWidget.h.

SIGEL_Environment::SIG_Environment const * SIG_SimulationVisualisationWidget::environment [private]
 

The actual environment to simulate.

Definition at line 225 of file SIG_SimulationVisualisationWidget.h.

QString SIG_SimulationVisualisationWidget::fileFormat [private]
 

Definition at line 193 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::frameDelay [private]
 

The time in ms to wait between to simulationframes.

Definition at line 147 of file SIG_SimulationVisualisationWidget.h.

QString SIG_SimulationVisualisationWidget::movieDirectory [private]
 

Definition at line 189 of file SIG_SimulationVisualisationWidget.h.

QString SIG_SimulationVisualisationWidget::movieFilePrefix [private]
 

Definition at line 191 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::movieFrequency [private]
 

Definition at line 169 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::movieHeight [private]
 

Definition at line 167 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::movieMaxFrames [private]
 

Definition at line 171 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::movieQuality [private]
 

Definition at line 173 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::movieWidth [private]
 

Definition at line 165 of file SIG_SimulationVisualisationWidget.h.

int SIG_SimulationVisualisationWidget::noOfFFSteps [private]
 

The number of timesteps that equal 5 seconds.

Definition at line 152 of file SIG_SimulationVisualisationWidget.h.

QColor SIG_SimulationVisualisationWidget::planeColor [private]
 

Definition at line 156 of file SIG_SimulationVisualisationWidget.h.

SIGEL_Program::SIG_Program const * SIG_SimulationVisualisationWidget::program [private]
 

The actual program to control the robot in the simulation.

Definition at line 235 of file SIG_SimulationVisualisationWidget.h.

bool SIG_SimulationVisualisationWidget::record [private]
 

Indicates whether simulation shall be recorded.

Definition at line 161 of file SIG_SimulationVisualisationWidget.h.

SIGEL_Robot::SIG_Robot const * SIG_SimulationVisualisationWidget::robot [private]
 

The actual robot to simulate.

Definition at line 220 of file SIG_SimulationVisualisationWidget.h.

SIGEL_Simulation::SIG_SimulationParameters const * SIG_SimulationVisualisationWidget::simulationParameters [private]
 

The actual parameters of the simulation.

Definition at line 230 of file SIG_SimulationVisualisationWidget.h.

QTimer * SIG_SimulationVisualisationWidget::simulationTimer [private]
 

The timer that controls the progress of the simulation.

Definition at line 142 of file SIG_SimulationVisualisationWidget.h.

bool SIG_SimulationVisualisationWidget::traceRobot [private]
 

Definition at line 154 of file SIG_SimulationVisualisationWidget.h.

bool SIG_SimulationVisualisationWidget::useLeadingZeros [private]
 

Definition at line 163 of file SIG_SimulationVisualisationWidget.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