#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 278 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 666 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 811 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 719 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 781 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 763 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 709 of file Objects.C. References viewAngle. 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 747 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 819 of file Objects.C. References angBodyAngleRelToNeck. Referenced by WorldModel::processNewAgentInfo(). |
|
This method sets the global neck angle for this AgentObject.
Definition at line 799 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 729 of file Objects.C. References posPositionDifference, and ViewAngleT. 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 790 of file Objects.C. References AngDeg, and velSpeedRelToNeck. Referenced by WorldModel::processNewAgentInfo(). |
|
This method sets the stamina of this AgentObject.
Definition at line 771 of file Objects.C. References stamina. Referenced by WorldModel::processNewAgentInfo(), Stamina::Stamina(), and WorldModel::WorldModel(). |
|
This method sets the view angle of this AgentObject.
Definition at line 738 of file Objects.C. References viewAngle, and ViewQualityT. Referenced by WorldModel::processNewAgentInfo(). |
|
Set the view quality of this AgentObject.
Definition at line 755 of file Objects.C. References viewQuality. 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 692 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, DynamicObject::vecGlobalVelocity, and ViewAngleT. |
|
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 683 of file Objects.C. References DEFAULT_TEAM_NAME. Referenced by WorldModel::show(). |
|
Relative angle of body with neck Definition at line 285 of file Objects.h. Referenced by AgentObject(), getBodyAngleRelToNeck(), setBodyAngleRelToNeck(), and show(). |
|
Global pos difference with last see Definition at line 287 of file Objects.h. Referenced by getPositionDifference(), and setPositionDifference(). |
|
Stamina (stamina, effort, recovery Definition at line 283 of file Objects.h. Referenced by AgentObject(), getStamina(), setStamina(), and show(). |
|
Velocity vector relative to neck Definition at line 284 of file Objects.h. Referenced by AgentObject(), getSpeedRelToNeck(), and setSpeedRelToNeck(). |
|
View angle of this agent Definition at line 280 of file Objects.h. Referenced by AgentObject(), getViewAngle(), and setViewAngle(). |
|
View quality of this agent Definition at line 281 of file Objects.h. Referenced by AgentObject(), getViewQuality(), and setViewQuality(). |