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

SIGEL_Simulation::SIG_DynaMechsSimulationQueries Class Reference

This class is used to query actual data about the simulation. More...

#include <SIG_DynaMechsSimulationQueries.h>

Inheritance diagram for SIGEL_Simulation::SIG_DynaMechsSimulationQueries:

SIGEL_Simulation::SIG_SimulationQueries List of all members.

Public Methods

 SIG_DynaMechsSimulationQueries (SIG_DynaMechsSimulationData& theSimulationData)
 the constructor. More...

void sense (int sensorNo,QVector<SIG_Register> & registers) const
 Interprets the SENSE command and writes the results into the registers. More...

QTime getActualSimulationTime () const
 gets the actual simulation time which is calculated frame*stepsize. More...

DL_vector getLinkPosition (int linkNo) const
 gets the position of link linkNo. More...

DL_matrix getLinkOrientation (int linkNo) const
 gets the orientation of link linkNo. More...

int getRootNumber () const
 gets the number of the torso link. More...

double getUsedForces () const
 gets the amount of forces enacted this timeframe. More...

int getLinkCount () const
 gets the number of links. More...

void checkDynas () const

Private Attributes

SIG_DynaMechsSimulationDatasimulationData
 the reference to the simulator's simulationData. More...


Detailed Description

This class is used to query actual data about the simulation.

Several entities as for example the recorder or the interpreter need to be able to get actual values from the simulator. For this task the class SIG_SimulationQueries is needed. It gives access to relevant simulation data. Its functionality will be expanded as needed by more sophisticated fitness-functions (respectively their recorders). Especially it can be used to query the actual simulation time and the position of each roboter link.

Definition at line 24 of file SIG_DynaMechsSimulationQueries.h.


Constructor & Destructor Documentation

SIGEL_Simulation::SIG_DynaMechsSimulationQueries::SIG_DynaMechsSimulationQueries ( SIG_DynaMechsSimulationData & theSimulationData )
 

the constructor.

Precondition:
the simulator has created theSimulationData
Postcondition:
SIG_SimulationQueries is created. simulationData is set to theSimulationData
Parameters:
theSimulationData   reference to the simulator's simulationData

Definition at line 18 of file SIG_DynaMechsSimulationQueries.cpp.


Member Function Documentation

void SIGEL_Simulation::SIG_DynaMechsSimulationQueries::checkDynas ( ) const [virtual]
 

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 228 of file SIG_DynaMechsSimulationQueries.cpp.

QTime SIGEL_Simulation::SIG_DynaMechsSimulationQueries::getActualSimulationTime ( ) const [virtual]
 

gets the actual simulation time which is calculated frame*stepsize.

Precondition:
none
Postcondition:
none
Returns:
the calculated actual simulation time

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 118 of file SIG_DynaMechsSimulationQueries.cpp.

int SIGEL_Simulation::SIG_DynaMechsSimulationQueries::getLinkCount ( ) const [virtual]
 

gets the number of links.

Precondition:
none
Postcondition:
none
Returns:
the number of links

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 223 of file SIG_DynaMechsSimulationQueries.cpp.

DL_matrix SIGEL_Simulation::SIG_DynaMechsSimulationQueries::getLinkOrientation ( int linkNo ) const [virtual]
 

gets the orientation of link linkNo.

Precondition:
none
Postcondition:
none
Parameters:
linkNo   the number of the link. if the link doesn't exist, it is calculated modulo maxlinks
Returns:
the orientation of the link relativ to the original orientation

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 168 of file SIG_DynaMechsSimulationQueries.cpp.

DL_vector SIGEL_Simulation::SIG_DynaMechsSimulationQueries::getLinkPosition ( int linkNo ) const [virtual]
 

gets the position of link linkNo.

Precondition:
none
Postcondition:
none
Parameters:
linkNo   the number of the link. if the link doesn't exist, it is calculated modulo maxlinks
Returns:
the position of the center of mass of link linkNo

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 127 of file SIG_DynaMechsSimulationQueries.cpp.

int SIGEL_Simulation::SIG_DynaMechsSimulationQueries::getRootNumber ( ) const [virtual]
 

gets the number of the torso link.

Precondition:
none
Postcondition:
none
Returns:
the number of the torso link

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 212 of file SIG_DynaMechsSimulationQueries.cpp.

double SIGEL_Simulation::SIG_DynaMechsSimulationQueries::getUsedForces ( ) const [virtual]
 

gets the amount of forces enacted this timeframe.

Precondition:
none
Postcondition:
none
Returns:
the amount of forces this frame

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 217 of file SIG_DynaMechsSimulationQueries.cpp.

void SIGEL_Simulation::SIG_DynaMechsSimulationQueries::sense ( int sensorNo,
QVector< SIG_Register >& registers ) const [virtual]
 

Interprets the SENSE command and writes the results into the registers.

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 22 of file SIG_DynaMechsSimulationQueries.cpp.


Member Data Documentation

SIG_DynaMechsSimulationData & SIGEL_Simulation::SIG_DynaMechsSimulationQueries::simulationData [private]
 

the reference to the simulator's simulationData.

Definition at line 30 of file SIG_DynaMechsSimulationQueries.h.


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