#include <Objects.h>
Inheritance diagram for AgentObject:
Definition at line 319 of file Objects.h.
AgentObject::AgentObject | ( | double | dStaminaMax = 4000 |
) |
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.
dStaminaMax | maximum stamina for this agent (default 4000.0) |
Definition at line 843 of file Objects.cpp.
References angBodyAngleRelToNeck, PlayerObject::angGlobalNeckAngle, Stamina::setEffort(), Stamina::setRecovery(), Stamina::setStamina(), VecPosition::setVecPosition(), stamina, UnknownAngleValue, VA_NORMAL, velSpeedRelToNeck, viewAngle, viewQuality, and VQ_HIGH.
void AgentObject::show | ( | ostream & | os = cout |
) | [virtual] |
This methods prints the information about this AgentObject to the specified output stream. The default team name is used as the name.
os | output stream to which information is written. |
Reimplemented from PlayerObject.
Definition at line 860 of file Objects.cpp.
References DEFAULT_TEAM_NAME.
Referenced by WorldModel::show().
void AgentObject::show | ( | const char * | strTeamName, | |
ostream & | os = cout | |||
) |
This methods prints the information about this AgentObject to the specified output stream. The specified team name is used as the name
strTeamName | team name for this agent. | |
os | output stream to which information is written. |
Reimplemented from PlayerObject.
Definition at line 869 of file Objects.cpp.
References angBodyAngleRelToNeck, PlayerObject::angGlobalNeckAngle, SoccerTypes::getObjectStr(), MAX_TEAM_NAME_LENGTH, Object::objectType, Object::posGlobal, Stamina::show(), stamina, Object::timeGlobalPosition, DynamicObject::timeGlobalVelocity, and DynamicObject::vecGlobalVelocity.
VecPosition AgentObject::getPositionDifference | ( | ) | const |
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 896 of file Objects.cpp.
References posPositionDifference.
Referenced by WorldModel::calculateStateBall().
bool AgentObject::setPositionDifference | ( | VecPosition | p | ) |
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.
p | new position difference |
Definition at line 906 of file Objects.cpp.
References posPositionDifference.
Referenced by WorldModel::updateAgentObjectAfterSee().
ViewAngleT AgentObject::getViewAngle | ( | ) | const |
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 886 of file Objects.cpp.
References viewAngle.
Referenced by WorldModel::getAgentViewAngle(), and WorldModel::removeGhosts().
bool AgentObject::setViewAngle | ( | ViewAngleT | v | ) |
This method sets the view angle of this AgentObject.
v | new view angle (VA_NARROW, VA_NORMAL, VA_WIDE or VA_ILLEGAL) |
Definition at line 915 of file Objects.cpp.
References viewAngle.
Referenced by WorldModel::processNewAgentInfo(), and WorldModel::setAgentViewAngle().
ViewQualityT AgentObject::getViewQuality | ( | ) | const |
This method returns the view quality of this AgentObject. The view angle equals VQ_LOW, VQ_HIGH, or VQ_ILLEGAL.
Definition at line 924 of file Objects.cpp.
References viewQuality.
Referenced by WorldModel::getAgentViewQuality().
bool AgentObject::setViewQuality | ( | ViewQualityT | v | ) |
Set the view quality of this AgentObject.
v | new view quality (VQ_LOW, VQ_HIGH, VQ_ILLEGAL) |
Definition at line 932 of file Objects.cpp.
References viewQuality.
Referenced by WorldModel::processNewAgentInfo(), and WorldModel::setAgentViewQuality().
Stamina AgentObject::getStamina | ( | ) | const |
This method returns the Stamina of the AgentObject.
Definition at line 940 of file Objects.cpp.
References stamina.
Referenced by WorldModel::getAgentEffort(), WorldModel::getAgentStamina(), and WorldModel::processNewAgentInfo().
bool AgentObject::setStamina | ( | Stamina | sta | ) |
This method sets the stamina of this AgentObject.
sta | new stamina for this AgentObject |
Definition at line 948 of file Objects.cpp.
References stamina.
Referenced by WorldModel::processNewAgentInfo(), and WorldModel::WorldModel().
VecPosition AgentObject::getSpeedRelToNeck | ( | ) | const |
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 958 of file Objects.cpp.
References velSpeedRelToNeck.
Referenced by WorldModel::calculateStateAgent(), WorldModel::calculateStateAgent2(), WorldModel::calculateStateAgent3(), and WorldModel::updateAgentAndBallAfterSense().
bool AgentObject::setSpeedRelToNeck | ( | VecPosition | v | ) |
This method sets the velocity (speed and direction) of this AgentObject. This information comes directly from the sense message.
v | new velocity for this agentobject |
Definition at line 967 of file Objects.cpp.
References velSpeedRelToNeck.
Referenced by WorldModel::processNewAgentInfo().
bool AgentObject::setGlobalNeckAngle | ( | AngDeg | ang | ) |
This method sets the global neck angle for this AgentObject.
ang | value for the global neck angle. |
Definition at line 976 of file Objects.cpp.
References PlayerObject::angGlobalBodyAngle, PlayerObject::angGlobalNeckAngle, getBodyAngleRelToNeck(), and VecPosition::normalizeAngle().
Referenced by WorldModel::updateAgentAndBallAfterSense(), and WorldModel::updateAgentObjectAfterSee().
AngDeg AgentObject::getBodyAngleRelToNeck | ( | ) | const |
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 988 of file Objects.cpp.
References angBodyAngleRelToNeck.
Referenced by WorldModel::getAgentBodyAngleRelToNeck(), and setGlobalNeckAngle().
bool AgentObject::setBodyAngleRelToNeck | ( | AngDeg | ang | ) |
This method sets the relative body angle to the neck for this AgentObject.
ang | relative body angle to the neck |
Definition at line 996 of file Objects.cpp.
References angBodyAngleRelToNeck.
Referenced by WorldModel::processNewAgentInfo().
bool AgentObject::getArmMovable | ( | ) | const |
This method sets whether it is allowed to move the arm of the agent.
Definition at line 1004 of file Objects.cpp.
References m_bArmMovable.
Referenced by WorldModel::getAgentArmMovable().
bool AgentObject::setArmMovable | ( | bool | b | ) |
This method returns whether it is allowed to move the arm of the agent.
Definition at line 1010 of file Objects.cpp.
References m_bArmMovable.
Referenced by WorldModel::processNewAgentInfo().
int AgentObject::getArmExpires | ( | ) | const |
This method returns the numer of cycles it will take the arm to expire. In case of zero, the arm doesn't point anymore and the other players won't see the arm pointing anymore.
Definition at line 1019 of file Objects.cpp.
References m_iArmExpires.
Referenced by WorldModel::getAgentArmExpires().
bool AgentObject::setArmExpires | ( | int | i | ) |
This method sets the numer of cycles it will take the arm to expire. In case of zero, the arm doesn't point anymore and the other players won't see the arm pointing anymore.
Definition at line 1027 of file Objects.cpp.
References m_iArmExpires.
Referenced by WorldModel::processNewAgentInfo().
VecPosition AgentObject::getGlobalArmPosition | ( | ) | const |
This method returns the global position to which the arm points. If 'getArmExpires' returns zero, it means that the arm doesn't point anymore and this value is invalid.
Definition at line 1036 of file Objects.cpp.
References m_posGlobalArm.
Referenced by WorldModel::getAgentArmPosition().
bool AgentObject::setGlobalArmPosition | ( | VecPosition | v | ) |
This method sets the global position to which the arm points.
Definition at line 1042 of file Objects.cpp.
References m_posGlobalArm.
Referenced by WorldModel::processNewAgentInfo().
int AgentObject::getTackleExpires | ( | ) | const |
This method returns the number of cycles it will take the tackle to expire. In case of 0 a tackle command can be issued.
Definition at line 1050 of file Objects.cpp.
References m_iTackleExpires.
Referenced by WorldModel::getTackleExpires().
bool AgentObject::setTackleExpires | ( | int | i | ) |
This method sets the number of cycles it will take the tackle to expire. In case of 0 a tackle command can be issued.
Definition at line 1057 of file Objects.cpp.
References m_iTackleExpires.
Referenced by WorldModel::processNewAgentInfo().
ViewAngleT AgentObject::viewAngle [private] |
View angle of this agent
Definition at line 321 of file Objects.h.
Referenced by AgentObject(), getViewAngle(), and setViewAngle().
ViewQualityT AgentObject::viewQuality [private] |
View quality of this agent
Definition at line 322 of file Objects.h.
Referenced by AgentObject(), getViewQuality(), and setViewQuality().
Stamina AgentObject::stamina [private] |
Stamina (stamina, effort, recovery
Definition at line 324 of file Objects.h.
Referenced by AgentObject(), getStamina(), setStamina(), and show().
VecPosition AgentObject::velSpeedRelToNeck [private] |
Velocity vector relative to neck
Definition at line 325 of file Objects.h.
Referenced by AgentObject(), getSpeedRelToNeck(), and setSpeedRelToNeck().
AngDeg AgentObject::angBodyAngleRelToNeck [private] |
Relative angle of body with neck
Definition at line 326 of file Objects.h.
Referenced by AgentObject(), getBodyAngleRelToNeck(), setBodyAngleRelToNeck(), and show().
Global pos difference with lastsee
Definition at line 328 of file Objects.h.
Referenced by getPositionDifference(), and setPositionDifference().
bool AgentObject::m_bArmMovable [private] |
Indicates whether can move arm.
Definition at line 330 of file Objects.h.
Referenced by getArmMovable(), and setArmMovable().
int AgentObject::m_iArmExpires [private] |
Nr. of cycles till arm expires
Definition at line 331 of file Objects.h.
Referenced by getArmExpires(), and setArmExpires().
VecPosition AgentObject::m_posGlobalArm [private] |
Global point to which arm point
Definition at line 332 of file Objects.h.
Referenced by getGlobalArmPosition(), and setGlobalArmPosition().
int AgentObject::m_iTackleExpires [private] |
Nr. of cycles till tackle expires
Definition at line 333 of file Objects.h.
Referenced by getTackleExpires(), and setTackleExpires().