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

SIGEL_Simulation::SIG_DynaMoSimulationQueries Class Reference

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

#include <SIG_DynaMoSimulationQueries.h>

Inheritance diagram for SIGEL_Simulation::SIG_DynaMoSimulationQueries:

SIGEL_Simulation::SIG_SimulationQueries List of all members.

Public Methods

 SIG_DynaMoSimulationQueries (SIG_DynaMoSimulationData& 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_DynaMoSimulationDatasimulationData
 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_DynaMoSimulationQueries.h.


Constructor & Destructor Documentation

SIGEL_Simulation::SIG_DynaMoSimulationQueries::SIG_DynaMoSimulationQueries ( SIG_DynaMoSimulationData & 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 13 of file SIG_DynaMoSimulationQueries.cpp.


Member Function Documentation

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

Reimplemented from SIGEL_Simulation::SIG_SimulationQueries.

Definition at line 71 of file SIG_DynaMoSimulationQueries.cpp.

QTime SIGEL_Simulation::SIG_DynaMoSimulationQueries::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 28 of file SIG_DynaMoSimulationQueries.cpp.

int SIGEL_Simulation::SIG_DynaMoSimulationQueries::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 66 of file SIG_DynaMoSimulationQueries.cpp.

DL_matrix SIGEL_Simulation::SIG_DynaMoSimulationQueries::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 48 of file SIG_DynaMoSimulationQueries.cpp.

DL_vector SIGEL_Simulation::SIG_DynaMoSimulationQueries::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 35 of file SIG_DynaMoSimulationQueries.cpp.

int SIGEL_Simulation::SIG_DynaMoSimulationQueries::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 55 of file SIG_DynaMoSimulationQueries.cpp.

double SIGEL_Simulation::SIG_DynaMoSimulationQueries::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 60 of file SIG_DynaMoSimulationQueries.cpp.

void SIGEL_Simulation::SIG_DynaMoSimulationQueries::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 17 of file SIG_DynaMoSimulationQueries.cpp.


Member Data Documentation

SIG_DynaMoSimulationData & SIGEL_Simulation::SIG_DynaMoSimulationQueries::simulationData [private]
 

the reference to the simulator's simulationData.

Definition at line 30 of file SIG_DynaMoSimulationQueries.h.


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