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

AgentObject Class Reference

#include <Objects.h>

Inheritance diagram for AgentObject:

Inheritance graph
[legend]
Collaboration diagram for AgentObject:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Class AgentObject contains RoboCup information that is available for the agent. New variables are declared that extend a normal PlayerObject.

Definition at line 278 of file Objects.h.


Constructor & Destructor Documentation

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.

Parameters:
dStaminaMax  maximum stamina for this agent (default 4000.0)

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.


Member Function Documentation

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.

Returns:
relative body angle to the neck

Definition at line 811 of file Objects.C.

References angBodyAngleRelToNeck, and AngDeg.

Referenced by WorldModel::getAgentBodyAngleRelToNeck(), and setGlobalNeckAngle().

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 719 of file Objects.C.

References posPositionDifference.

Referenced by WorldModel::calculateStateBall(), and WorldModel::calculateStateBall2().

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.

Returns:
velocity agent relative to the neck.

Definition at line 781 of file Objects.C.

References velSpeedRelToNeck.

Referenced by WorldModel::calculateStateAgent(), WorldModel::calculateStateAgent2(), and WorldModel::updateAgentAndBallAfterSense().

Stamina AgentObject::getStamina   const
 

This method returns the Stamina of the AgentObject.

Returns:
stamina from the agent.

Definition at line 763 of file Objects.C.

References stamina.

Referenced by WorldModel::getAgentEffort(), WorldModel::getAgentStamina(), and WorldModel::processNewAgentInfo().

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.

Returns:
view angle of this PlayerObject

Definition at line 709 of file Objects.C.

References viewAngle.

Referenced by WorldModel::getAgentViewAngle(), and WorldModel::removeGhosts().

ViewQualityT AgentObject::getViewQuality   const
 

This method returns the view quality of this AgentObject. The view angle equals VQ_LOW, VQ_HIGH, or VQ_ILLEGAL.

Returns:
view quality of this AgentObject

Definition at line 747 of file Objects.C.

References viewQuality, and ViewQualityT.

Referenced by WorldModel::getAgentViewQuality().

bool AgentObject::setBodyAngleRelToNeck AngDeg    ang
 

This method sets the relative body angle to the neck for this AgentObject.

Parameters:
ang  relative body angle to the neck
Returns:
bool indicating whether value was set

Definition at line 819 of file Objects.C.

References angBodyAngleRelToNeck.

Referenced by WorldModel::processNewAgentInfo().

bool AgentObject::setGlobalNeckAngle AngDeg    ang
 

This method sets the global neck angle for this AgentObject.

Parameters:
ang  value for the global neck angle.
Returns:
bool indicating whether value was set

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().

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.

Parameters:
p  new position difference
Returns:
bool indicating whether the update was succesfull.

Definition at line 729 of file Objects.C.

References posPositionDifference, and ViewAngleT.

Referenced by WorldModel::updateAgentObjectAfterSee().

bool AgentObject::setSpeedRelToNeck VecPosition    v
 

This method sets the velocity (speed and direction) of this AgentObject. This information comes directly from the sense message.

Parameters:
v  new velocity for this agentobject
Returns:
bool indicating whether value was set

Definition at line 790 of file Objects.C.

References AngDeg, and velSpeedRelToNeck.

Referenced by WorldModel::processNewAgentInfo().

bool AgentObject::setStamina Stamina    sta
 

This method sets the stamina of this AgentObject.

Parameters:
sta  new stamina for this AgentObject
Returns:
bool indicating whether value was set

Definition at line 771 of file Objects.C.

References stamina.

Referenced by WorldModel::processNewAgentInfo(), Stamina::Stamina(), and WorldModel::WorldModel().

bool AgentObject::setViewAngle ViewAngleT    v
 

This method sets the view angle of this AgentObject.

Parameters:
v  new view angle (VA_NARROW, VA_NORMAL, VA_WIDE or VA_ILLEGAL)
Returns:
bool indicating whether value was set

Definition at line 738 of file Objects.C.

References viewAngle, and ViewQualityT.

Referenced by WorldModel::processNewAgentInfo().

bool AgentObject::setViewQuality ViewQualityT    v
 

Set the view quality of this AgentObject.

Parameters:
v  new view quality (VQ_LOW, VQ_HIGH, VQ_ILLEGAL)
Returns:
bool indicating whether value was set

Definition at line 755 of file Objects.C.

References viewQuality.

Referenced by WorldModel::processNewAgentInfo().

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

Parameters:
strTeamName  team name for this agent.
os  output stream to which information is written.

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.

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.

Parameters:
os  output stream to which information is written.

Reimplemented from PlayerObject.

Definition at line 683 of file Objects.C.

References DEFAULT_TEAM_NAME.

Referenced by WorldModel::show().


Member Data Documentation

AngDeg AgentObject::angBodyAngleRelToNeck [private]
 

Relative angle of body with neck

Definition at line 285 of file Objects.h.

Referenced by AgentObject(), getBodyAngleRelToNeck(), setBodyAngleRelToNeck(), and show().

VecPosition AgentObject::posPositionDifference [private]
 

Global pos difference with last see

Definition at line 287 of file Objects.h.

Referenced by getPositionDifference(), and setPositionDifference().

Stamina AgentObject::stamina [private]
 

Stamina (stamina, effort, recovery

Definition at line 283 of file Objects.h.

Referenced by AgentObject(), getStamina(), setStamina(), and show().

VecPosition AgentObject::velSpeedRelToNeck [private]
 

Velocity vector relative to neck

Definition at line 284 of file Objects.h.

Referenced by AgentObject(), getSpeedRelToNeck(), and setSpeedRelToNeck().

ViewAngleT AgentObject::viewAngle [private]
 

View angle of this agent

Definition at line 280 of file Objects.h.

Referenced by AgentObject(), getViewAngle(), and setViewAngle().

ViewQualityT AgentObject::viewQuality [private]
 

View quality of this agent

Definition at line 281 of file Objects.h.

Referenced by AgentObject(), getViewQuality(), and setViewQuality().


The documentation for this class was generated from the following files:
Generated on Thu Mar 7 00:37:52 2002 for UvA Trilearn 2001 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001