#include <Objects.h>
Inheritance diagram for AgentObject:
Public Methods | |
AgentObject (double dStaminaMax=4000) | |
void | show (ostream &os=cout) |
void | show (const char *strTeamName, ostream &os=cout) |
VecPosition | getPositionDifference () const |
bool | setPositionDifference (VecPosition v) |
ViewAngleT | getViewAngle () const |
bool | setViewAngle (ViewAngleT v) |
ViewQualityT | getViewQuality () const |
bool | setViewQuality (ViewQualityT v) |
Stamina | getStamina () const |
bool | setStamina (Stamina sta) |
VecPosition | getSpeedRelToNeck () const |
bool | setSpeedRelToNeck (VecPosition v) |
bool | setGlobalNeckAngle (AngDeg ang) |
AngDeg | getBodyAngleRelToNeck () const |
bool | setBodyAngleRelToNeck (AngDeg ang) |
Private Attributes | |
ViewAngleT | viewAngle |
ViewQualityT | viewQuality |
Stamina | stamina |
VecPosition | velSpeedRelToNeck |
AngDeg | angBodyAngleRelToNeck |
VecPosition | posPositionDifference |
Definition at line 290 of file Objects.h.
|
This is the constructor for the class AgentObject and initializes the variables with the AgentObject. This the class that contains information about the agent itself.
Definition at line 725 of file Objects.C. References angBodyAngleRelToNeck, PlayerObject::angGlobalNeckAngle, Stamina::setEffort(), Stamina::setRecovery(), Stamina::setStamina(), VecPosition::setVecPosition(), stamina, UnknownAngleValue, VA_ILLEGAL, velSpeedRelToNeck, viewAngle, viewQuality, and VQ_ILLEGAL. |
|
This method returns the relative angle of the body to the neck of this AgentObject. Example: global angle neck is 90 degrees and global body angle is 0, means that relative angle of body to neck is -90 degrees.
Definition at line 870 of file Objects.C. References angBodyAngleRelToNeck, and AngDeg. Referenced by WorldModel::getAgentBodyAngleRelToNeck(), and setGlobalNeckAngle(). |
|
This method returns the difference between the predicted global position of the agent and the actual derived global position. This difference can be used in determining the actual movement of other objects since the noise caused by the difference in the global position of the agent is then filtered out. Definition at line 778 of file Objects.C. References posPositionDifference. Referenced by WorldModel::calculateStateBall(), and WorldModel::calculateStateBall2(). |
|
This method returns the velocity (speed and direction) of this AgentObject. This information is directly availablefrom the sense message, in which the speed factor and the angle of this speed (relative to the neck) are given.
Definition at line 840 of file Objects.C. References velSpeedRelToNeck. Referenced by WorldModel::calculateStateAgent(), WorldModel::calculateStateAgent2(), and WorldModel::updateAgentAndBallAfterSense(). |
|
This method returns the Stamina of the AgentObject.
Definition at line 822 of file Objects.C. References stamina. Referenced by WorldModel::getAgentEffort(), WorldModel::getAgentStamina(), and WorldModel::processNewAgentInfo(). |
|
This method returns the view angle of this PlayerObject. The view angle equals VA_NARROW, VA_NORMAL, VA_WIDE or VA_ILLEGAL.
Definition at line 768 of file Objects.C. References viewAngle, and ViewAngleT. Referenced by WorldModel::getAgentViewAngle(), and WorldModel::removeGhosts(). |
|
This method returns the view quality of this AgentObject. The view angle equals VQ_LOW, VQ_HIGH, or VQ_ILLEGAL.
Definition at line 806 of file Objects.C. References viewQuality, and ViewQualityT. Referenced by WorldModel::getAgentViewQuality(). |
|
This method sets the relative body angle to the neck for this AgentObject.
Definition at line 878 of file Objects.C. References angBodyAngleRelToNeck, and AngDeg. Referenced by WorldModel::processNewAgentInfo(). |
|
This method sets the global neck angle for this AgentObject.
Definition at line 858 of file Objects.C. References AngDeg, PlayerObject::angGlobalBodyAngle, PlayerObject::angGlobalNeckAngle, getBodyAngleRelToNeck(), and VecPosition::normalizeAngle(). Referenced by WorldModel::updateAgentAndBallAfterSense(), and WorldModel::updateAgentObjectAfterSee(). |
|
This method sets the position difference between the derived global position from the previous cycle information and the global position from the latest see message.
Definition at line 788 of file Objects.C. References posPositionDifference. Referenced by WorldModel::updateAgentObjectAfterSee(). |
|
This method sets the velocity (speed and direction) of this AgentObject. This information comes directly from the sense message.
Definition at line 849 of file Objects.C. References velSpeedRelToNeck. Referenced by WorldModel::processNewAgentInfo(). |
|
This method sets the stamina of this AgentObject.
Definition at line 830 of file Objects.C. References stamina. Referenced by WorldModel::processNewAgentInfo(), and WorldModel::WorldModel(). |
|
This method sets the view angle of this AgentObject.
Definition at line 797 of file Objects.C. References viewAngle, and ViewAngleT. Referenced by WorldModel::processNewAgentInfo(). |
|
Set the view quality of this AgentObject.
Definition at line 814 of file Objects.C. References viewQuality, and ViewQualityT. Referenced by WorldModel::processNewAgentInfo(). |
|
This methods prints the information about this AgentObject to the specified output stream. The specified team name is used as the name
Reimplemented from PlayerObject. Definition at line 751 of file Objects.C. References angBodyAngleRelToNeck, PlayerObject::angGlobalNeckAngle, SoccerTypes::getObjectStr(), MAX_TEAM_NAME_LENGTH, Object::objectType, Object::posGlobal, Stamina::show(), stamina, Object::timeGlobalPosition, DynamicObject::timeGlobalVelocity, and DynamicObject::vecGlobalVelocity. |
|
This methods prints the information about this AgentObject to the specified output stream. The default team name is used as the name.
Reimplemented from PlayerObject. Definition at line 742 of file Objects.C. References DEFAULT_TEAM_NAME. Referenced by WorldModel::show(). |
|
Relative angle of body with neck Definition at line 297 of file Objects.h. Referenced by AgentObject(), getBodyAngleRelToNeck(), setBodyAngleRelToNeck(), and show(). |
|
Global pos difference with last see Definition at line 299 of file Objects.h. Referenced by getPositionDifference(), and setPositionDifference(). |
|
Stamina (stamina, effort, recovery Definition at line 295 of file Objects.h. Referenced by AgentObject(), getStamina(), setStamina(), and show(). |
|
Velocity vector relative to neck Definition at line 296 of file Objects.h. Referenced by AgentObject(), getSpeedRelToNeck(), and setSpeedRelToNeck(). |
|
View angle of this agent Definition at line 292 of file Objects.h. Referenced by AgentObject(), getViewAngle(), and setViewAngle(). |
|
View quality of this agent Definition at line 293 of file Objects.h. Referenced by AgentObject(), getViewQuality(), and setViewQuality(). |