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

DynamicObject Class Reference

#include <Objects.h>

Inheritance diagram for DynamicObject:

Inheritance graph
[legend]
Collaboration diagram for DynamicObject:

Collaboration graph
[legend]
List of all members.

Public Methods

 DynamicObject ()
bool setRelativeDistanceChange (double d, Time time)
double getRelativeDistanceChange () const
bool setRelativeAngleChange (double d, Time time)
double getRelativeAngleChange () const
bool setTimeChangeInformation (Time time)
Time getTimeChangeInformation () const
bool setGlobalVelocity (VecPosition v, Time time)
VecPosition getGlobalVelocity () const
double getSpeed () const
bool setTimeGlobalVelocity (Time time)
Time getTimeGlobalVelocity () const
bool setGlobalVelocityLastSee (VecPosition vec)
VecPosition getGlobalVelocityLastSee () const

Protected Attributes

VecPosition vecGlobalVelocity
Time timeGlobalVelocity
double dRelativeDistanceChange
double dRelativeAngleChange
Time timeChangeInformation
VecPosition vecGlobalVelocityLastSee

Detailed Description

Class DynamicObject contains RoboCup information that is available for objects that can move (players, ball). Different variables are added to the superclass Object

Definition at line 143 of file Objects.h.


Constructor & Destructor Documentation

DynamicObject::DynamicObject  
 

This is the constructor for DynamicObject. A DynamicObject is created with all the variables initialized by (illegal) default values

Definition at line 318 of file Objects.cpp.

References dRelativeAngleChange, dRelativeDistanceChange, and UnknownDoubleValue.


Member Function Documentation

VecPosition DynamicObject::getGlobalVelocity   const
 

This method returns the global velocity of this object. The time of this information is related to the time returned by getTimeGlobalVelocity().

Returns:
global position of this object

Definition at line 342 of file Objects.cpp.

References vecGlobalVelocity.

Referenced by WorldModel::getAgentGlobalVelocity(), WorldModel::getBallDirection(), WorldModel::getBallSpeed(), and WorldModel::getGlobalVelocity().

VecPosition DynamicObject::getGlobalVelocityLastSee   const
 

This method returns the global velocity of the object calculated after the last see message. The time of this information corresponds to 'getTimeChangeInformation'.

Returns:
global body velocity derived from the last see message

Definition at line 449 of file Objects.cpp.

Referenced by WorldModel::getGlobalVelocityLastSee().

double DynamicObject::getRelativeAngleChange   const
 

This method returns the relative angle change of this object. This information belongs to the server time that is returned by getTimeChangeInformation().

Returns:
relative angle change of object in the last cycle

Definition at line 413 of file Objects.cpp.

References dRelativeAngleChange.

Referenced by WorldModel::calculateVelocityDynamicObject(), WorldModel::checkParticlesBall(), and WorldModel::initParticlesBall().

double DynamicObject::getRelativeDistanceChange   const
 

This method returns the relative distance change of this object. Note that this value is zero when object is at the same distance, but at a complete different angle. This occurs when an object has moved a lot in one cycle. This information belongs to the server time that is returned by getTimeChangeInformation().

Returns:
relative distance change of object in the last cycle

Definition at line 392 of file Objects.cpp.

References dRelativeDistanceChange.

Referenced by WorldModel::calculateVelocityDynamicObject(), WorldModel::checkParticlesBall(), and WorldModel::initParticlesBall().

double DynamicObject::getSpeed   const
 

This method returns the speed of this object. The speed is the magnitude of the global velocity of the object

Returns:
speed of this object (zero for non-moving objects)

Definition at line 350 of file Objects.cpp.

References VecPosition::getMagnitude(), and vecGlobalVelocity.

Referenced by WorldModel::getAgentSpeed().

Time DynamicObject::getTimeChangeInformation   const
 

This method returns the server time that belongs to the relative distance and relative angle change of this object.

Returns:
time of the change information of this DynamicObject

Definition at line 430 of file Objects.cpp.

Referenced by WorldModel::calculateStateBall(), WorldModel::calculateStatePlayer(), WorldModel::checkParticlesBall(), WorldModel::getTimeChangeInformation(), and WorldModel::initParticlesBall().

Time DynamicObject::getTimeGlobalVelocity   const
 

This method returns the time that belongs to the global velocity of this object.

Returns:
time of the global velocity of this object

Definition at line 368 of file Objects.cpp.

References timeGlobalVelocity.

Referenced by WorldModel::getTimeGlobalVelocity().

bool DynamicObject::setGlobalVelocity VecPosition    v,
Time    time
 

This method sets the global velocity of this object and the time of this information

Parameters:
v  new global velocity
time  time global velocity was received
Returns:
bool indicating whether the values were set

Definition at line 329 of file Objects.cpp.

References EPSILON, VecPosition::getMagnitude(), setTimeGlobalVelocity(), VecPosition::setVecPosition(), and vecGlobalVelocity.

Referenced by WorldModel::processCatchedBall(), WorldModel::processPerfectHearInfo(), WorldModel::processPerfectHearInfoBall(), WorldModel::processSeeGlobalInfo(), WorldModel::updateAfterSenseMessage(), WorldModel::updateAgentAndBallAfterSense(), WorldModel::updateAgentObjectAfterSee(), WorldModel::updateBallAfterKick(), WorldModel::updateBallForCollision(), WorldModel::updateDynamicObjectAfterSee(), and WorldModel::updateDynamicObjectForNextCycle().

bool DynamicObject::setGlobalVelocityLastSee VecPosition    vec
 

This method sets the global velocity of the object calculated after the last see message. The time of this information corresponds to 'getTimeChangeInformation'.

Returns:
global body velocity derived from the last see message

Definition at line 439 of file Objects.cpp.

References vecGlobalVelocityLastSee.

Referenced by WorldModel::updateDynamicObjectAfterSee().

bool DynamicObject::setRelativeAngleChange double    d,
Time    time
 

This method sets the relative angle change and the server time this information belongs to.

Parameters:
d  new relative angle change
time  time relative angle change was received
Returns:
bool indicating whether the values were set

Definition at line 402 of file Objects.cpp.

References dRelativeAngleChange, and setTimeChangeInformation().

Referenced by WorldModel::processNewObjectInfo().

bool DynamicObject::setRelativeDistanceChange double    d,
Time    time
 

This method sets the relative distance change and the time this information was calculated.

Parameters:
d  new relative distance change
time  time relative distance change was calculated
Returns:
bool indicating whether the values were set

Definition at line 379 of file Objects.cpp.

References dRelativeDistanceChange, and setTimeChangeInformation().

Referenced by WorldModel::processNewObjectInfo().

bool DynamicObject::setTimeChangeInformation Time    time
 

This method sets the time the change information was calculated.

Parameters:
time  time information for change was calculated
Returns:
bool indicating whether the values was set

Definition at line 421 of file Objects.cpp.

References timeChangeInformation.

Referenced by WorldModel::processSeeGlobalInfo(), setRelativeAngleChange(), and setRelativeDistanceChange().

bool DynamicObject::setTimeGlobalVelocity Time    time
 

This method sets the time that corresponds to the last update of the global velocity of this object.

Parameters:
time  time corresponding to current value of global velocity
Returns:
bool indicating whether the value was set

Definition at line 359 of file Objects.cpp.

References timeGlobalVelocity.

Referenced by setGlobalVelocity().


Member Data Documentation

double DynamicObject::dRelativeAngleChange [protected]
 

Relative angle change

Definition at line 153 of file Objects.h.

Referenced by DynamicObject(), getRelativeAngleChange(), setRelativeAngleChange(), and BallObject::show().

double DynamicObject::dRelativeDistanceChange [protected]
 

Relative distance change

Definition at line 152 of file Objects.h.

Referenced by DynamicObject(), getRelativeDistanceChange(), setRelativeDistanceChange(), and BallObject::show().

Time DynamicObject::timeChangeInformation [protected]
 

Time of change information

Definition at line 154 of file Objects.h.

Referenced by setTimeChangeInformation().

Time DynamicObject::timeGlobalVelocity [protected]
 

Time of the corresponding velocity

Definition at line 149 of file Objects.h.

Referenced by getTimeGlobalVelocity(), setTimeGlobalVelocity(), AgentObject::show(), BallObject::show(), and PlayerObject::show().

VecPosition DynamicObject::vecGlobalVelocity [protected]
 

Global velocity of the player

Definition at line 148 of file Objects.h.

Referenced by getGlobalVelocity(), getSpeed(), setGlobalVelocity(), AgentObject::show(), BallObject::show(), and PlayerObject::show().

VecPosition DynamicObject::vecGlobalVelocityLastSee [protected]
 

vel. derived from last see

Definition at line 156 of file Objects.h.

Referenced by setGlobalVelocityLastSee().


The documentation for this class was generated from the following files:
Generated on Fri Nov 7 11:46:02 2003 for UvA Trilearn 2003 Base Code by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001