#include <Objects.h>
Inheritance diagram for DynamicObject:
Public Member Functions | |
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 |
Definition at line 143 of file Objects.h.
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.
bool DynamicObject::setRelativeDistanceChange | ( | double | d, | |
Time | time | |||
) |
This method sets the relative distance change and the time this information was calculated.
d | new relative distance change | |
time | time relative distance change was calculated |
Definition at line 379 of file Objects.cpp.
References dRelativeDistanceChange, and setTimeChangeInformation().
Referenced by WorldModel::processNewObjectInfo().
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().
Definition at line 392 of file Objects.cpp.
References dRelativeDistanceChange.
Referenced by WorldModel::calculateVelocityDynamicObject(), WorldModel::checkParticlesBall(), and WorldModel::initParticlesBall().
bool DynamicObject::setRelativeAngleChange | ( | double | d, | |
Time | time | |||
) |
This method sets the relative angle change and the server time this information belongs to.
d | new relative angle change | |
time | time relative angle change was received |
Definition at line 402 of file Objects.cpp.
References dRelativeAngleChange, and setTimeChangeInformation().
Referenced by WorldModel::processNewObjectInfo().
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().
Definition at line 413 of file Objects.cpp.
References dRelativeAngleChange.
Referenced by WorldModel::calculateVelocityDynamicObject(), WorldModel::checkParticlesBall(), and WorldModel::initParticlesBall().
bool DynamicObject::setTimeChangeInformation | ( | Time | time | ) |
This method sets the time the change information was calculated.
time | time information for change was calculated |
Definition at line 421 of file Objects.cpp.
References timeChangeInformation.
Referenced by WorldModel::processSeeGlobalInfo(), setRelativeAngleChange(), and setRelativeDistanceChange().
Time DynamicObject::getTimeChangeInformation | ( | ) | const |
This method returns the server time that belongs to the relative distance and relative angle change of this object.
Definition at line 430 of file Objects.cpp.
References timeChangeInformation.
Referenced by WorldModel::calculateStateBall(), WorldModel::calculateStatePlayer(), WorldModel::checkParticlesBall(), WorldModel::getTimeChangeInformation(), and WorldModel::initParticlesBall().
bool DynamicObject::setGlobalVelocity | ( | VecPosition | v, | |
Time | time | |||
) |
This method sets the global velocity of this object and the time of this information
v | new global velocity | |
time | time global velocity was received |
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().
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().
Definition at line 342 of file Objects.cpp.
References vecGlobalVelocity.
Referenced by WorldModel::getAgentGlobalVelocity(), WorldModel::getBallDirection(), WorldModel::getBallSpeed(), and WorldModel::getGlobalVelocity().
double DynamicObject::getSpeed | ( | ) | const |
This method returns the speed of this object. The speed is the magnitude of the global velocity of the object
Definition at line 350 of file Objects.cpp.
References VecPosition::getMagnitude(), and vecGlobalVelocity.
Referenced by WorldModel::getAgentSpeed().
bool DynamicObject::setTimeGlobalVelocity | ( | Time | time | ) |
This method sets the time that corresponds to the last update of the global velocity of this object.
time | time corresponding to current value of global velocity |
Definition at line 359 of file Objects.cpp.
References timeGlobalVelocity.
Referenced by setGlobalVelocity().
Time DynamicObject::getTimeGlobalVelocity | ( | ) | const |
This method returns the time that belongs to the global velocity of this object.
Definition at line 368 of file Objects.cpp.
References timeGlobalVelocity.
Referenced by WorldModel::getTimeGlobalVelocity().
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'.
Definition at line 439 of file Objects.cpp.
References vecGlobalVelocityLastSee.
Referenced by WorldModel::updateDynamicObjectAfterSee().
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'.
Definition at line 449 of file Objects.cpp.
References vecGlobalVelocityLastSee.
Referenced by WorldModel::getGlobalVelocityLastSee().
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().
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().
double DynamicObject::dRelativeDistanceChange [protected] |
Relative distance change
Definition at line 152 of file Objects.h.
Referenced by DynamicObject(), getRelativeDistanceChange(), setRelativeDistanceChange(), and BallObject::show().
double DynamicObject::dRelativeAngleChange [protected] |
Relative angle change
Definition at line 153 of file Objects.h.
Referenced by DynamicObject(), getRelativeAngleChange(), setRelativeAngleChange(), and BallObject::show().
Time DynamicObject::timeChangeInformation [protected] |
Time of change information
Definition at line 154 of file Objects.h.
Referenced by getTimeChangeInformation(), and setTimeChangeInformation().
VecPosition DynamicObject::vecGlobalVelocityLastSee [protected] |
vel. derived from last see
Definition at line 156 of file Objects.h.
Referenced by getGlobalVelocityLastSee(), and setGlobalVelocityLastSee().