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

SIGEL_Simulation::SIG_SimulationQueries Class Reference

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

#include <SIG_SimulationQueries.h>

Inheritance diagram for SIGEL_Simulation::SIG_SimulationQueries:

SIGEL_Simulation::SIG_DynaMechsSimulationQueries SIGEL_Simulation::SIG_DynaMoSimulationQueries List of all members.

Public Methods

 SIG_SimulationQueries ()
 the constructor. More...

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

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

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

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

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

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

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

virtual void checkDynas () const = 0

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_SimulationQueries.h.


Constructor & Destructor Documentation

SIGEL_Simulation::SIG_SimulationQueries::SIG_SimulationQueries ( )
 

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 14 of file SIG_SimulationQueries.cpp.


Member Function Documentation

QTime SIGEL_Simulation::SIG_SimulationQueries::getActualSimulationTime ( ) const [pure virtual]
 

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

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

Reimplemented in SIGEL_Simulation::SIG_DynaMechsSimulationQueries, and SIGEL_Simulation::SIG_DynaMoSimulationQueries.

int SIGEL_Simulation::SIG_SimulationQueries::getLinkCount ( ) const [pure virtual]
 

gets the number of links.

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

Reimplemented in SIGEL_Simulation::SIG_DynaMechsSimulationQueries, and SIGEL_Simulation::SIG_DynaMoSimulationQueries.

DL_matrix SIGEL_Simulation::SIG_SimulationQueries::getLinkOrientation ( int linkNo ) const [pure 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 in SIGEL_Simulation::SIG_DynaMechsSimulationQueries, and SIGEL_Simulation::SIG_DynaMoSimulationQueries.

DL_vector SIGEL_Simulation::SIG_SimulationQueries::getLinkPosition ( int linkNo ) const [pure 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 in SIGEL_Simulation::SIG_DynaMechsSimulationQueries, and SIGEL_Simulation::SIG_DynaMoSimulationQueries.

int SIGEL_Simulation::SIG_SimulationQueries::getRootNumber ( ) const [pure virtual]
 

gets the number of the torso link.

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

Reimplemented in SIGEL_Simulation::SIG_DynaMechsSimulationQueries, and SIGEL_Simulation::SIG_DynaMoSimulationQueries.

double SIGEL_Simulation::SIG_SimulationQueries::getUsedForces ( ) const [pure virtual]
 

gets the amount of forces enacted this timeframe.

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

Reimplemented in SIGEL_Simulation::SIG_DynaMechsSimulationQueries, and SIGEL_Simulation::SIG_DynaMoSimulationQueries.


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