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

PlayerObject Class Reference

#include <Objects.h>

Inheritance diagram for PlayerObject:

Inheritance graph
[legend]
Collaboration diagram for PlayerObject:

Collaboration graph
[legend]
List of all members.

Public Methods

 PlayerObject ()
void show (ostream &os=cout)
void show (const char *strTeamName, ostream &os=cout)
bool setIsKnownPlayer (bool b)
bool getIsKnownPlayer () const
bool setIsGoalie (bool b)
bool getIsGoalie () const
bool setRelativeBodyAngle (AngDeg ang, Time time)
AngDeg getRelativeBodyAngle () const
bool setGlobalBodyAngle (AngDeg ang, Time time)
AngDeg getGlobalBodyAngle () const
bool setRelativeNeckAngle (AngDeg ang, Time time)
AngDeg getRelativeNeckAngle () const
bool setGlobalNeckAngle (AngDeg ang, Time time)
AngDeg getGlobalNeckAngle () const
bool setTimeRelativeAngles (Time time)
Time getTimeRelativeAngles () const
bool setTimeGlobalAngles (Time time)
Time getTimeGlobalAngles () const

Protected Attributes

bool isKnownPlayer
bool isGoalie
AngDeg angGlobalBodyAngle
AngDeg angGlobalNeckAngle
Time timeGlobalAngles

Private Attributes

AngDeg angRelativeBodyAngle
AngDeg angRelativeNeckAngle
Time timeRelativeAngles

Detailed Description

Class PlayerObject contains RoboCup information that is available for players. Different variables are added to the superclass DynamicObject

Definition at line 180 of file Objects.h.


Constructor & Destructor Documentation

PlayerObject::PlayerObject  
 

This is the constructor for PlayerObject. A PlayerObject is created with all variables initialized to (illegal) default values

Definition at line 433 of file Objects.C.

References AngDeg, angGlobalBodyAngle, angGlobalNeckAngle, angRelativeBodyAngle, angRelativeNeckAngle, isGoalie, isKnownPlayer, and UnknownAngleValue.


Member Function Documentation

AngDeg PlayerObject::getGlobalBodyAngle   const
 

This method returns the global body angle of this object. This information is from the server time that is returned by getTimeGlobalAngles().

Returns:
global body angle of this object

Definition at line 479 of file Objects.C.

References AngDeg.

Referenced by WorldModel::getAgentGlobalBodyAngle(), WorldModel::getGlobalBodyAngle(), and show().

AngDeg PlayerObject::getGlobalNeckAngle   const
 

This method returns the global neck angle of this object. This information is from the time that is returned by getTimeGlobalAngles().

Returns:
global neck angle of this object

Definition at line 519 of file Objects.C.

Referenced by WorldModel::calculateStatePlayer(), WorldModel::getAgentGlobalNeckAngle(), and WorldModel::getGlobalNeckAngle().

bool PlayerObject::getIsGoalie   const
 

This method returns whether the current object is a goalie or not.

Returns:
bool indicating whether this dynamic object is a goalie or not

Definition at line 591 of file Objects.C.

References isGoalie.

Referenced by WorldModel::getOppGoalieType(), and WorldModel::getOwnGoalieType().

bool PlayerObject::getIsKnownPlayer   const
 

This method returns whether the current object is a known player or not. A known player is a player of which we know the number. If we don't know the player number of a player, the player is put at the index of a player that isn't seen in a while and the isKnownPlayer attribute is set to false.

Returns:
bool indicating whether player number is known

Definition at line 575 of file Objects.C.

References isKnownPlayer.

Referenced by WorldModel::isKnownPlayer(), and WorldModel::processPerfectHearInfo().

AngDeg PlayerObject::getRelativeBodyAngle   const
 

This method returns the relative body angle of this object. This information is from the server time that is returned by getTimeRelativeAngles().

Returns:
relative body angle of this object

Definition at line 459 of file Objects.C.

References AngDeg.

Referenced by WorldModel::updateDynamicObjectAfterSee().

AngDeg PlayerObject::getRelativeNeckAngle   const
 

This method returns the relative neck angle of this object. This information is from the time that is returned by getTimeRelativeAngles().

Returns:
relative neck angle of this object

Definition at line 499 of file Objects.C.

References AngDeg.

Referenced by WorldModel::updateDynamicObjectAfterSee().

Time PlayerObject::getTimeGlobalAngles   const
 

This method returns the server time in which the global body and neck angle of this object were calculated.

Returns:
time of the global neck and body information

Definition at line 553 of file Objects.C.

References timeGlobalAngles.

Referenced by WorldModel::getTimeGlobalAngles().

Time PlayerObject::getTimeRelativeAngles   const
 

This method returns the server time in which the relative body and neck angle of this object were calculated.

Returns:
time of the relative neck and body information

Definition at line 536 of file Objects.C.

References timeRelativeAngles.

Referenced by WorldModel::updateDynamicObjectAfterSee().

bool PlayerObject::setGlobalBodyAngle AngDeg    ang,
Time    time
 

This method sets the facing direction of the body and the time of this information (all global).

Parameters:
ang  new global facing direction of body
time  time corresponding to the facing direction
Returns:
bool indicating whether the values were set

Definition at line 469 of file Objects.C.

References AngDeg, angGlobalBodyAngle, and setTimeGlobalAngles().

Referenced by WorldModel::processSeeGlobalInfo(), and WorldModel::updateDynamicObjectAfterSee().

bool PlayerObject::setGlobalNeckAngle AngDeg    ang,
Time    time
 

This method returns the facing direction of the neck and the time of this information (all global).

Parameters:
ang  new global facing direction of neck
iTime  time facing direction was received
Returns:
bool indicating whether the values were set

Definition at line 509 of file Objects.C.

References AngDeg, angGlobalNeckAngle, and setTimeGlobalAngles().

Referenced by WorldModel::processSeeGlobalInfo(), and WorldModel::updateDynamicObjectAfterSee().

bool PlayerObject::setIsGoalie bool    b
 

This method sets whether this dynamic object is a goalie or not.

Parameters:
b  bool indicating whether this dynamic object is a goalie
Returns:
bool indicating whether value was set.

Definition at line 583 of file Objects.C.

References isGoalie.

Referenced by WorldModel::processPerfectHearInfo().

bool PlayerObject::setIsKnownPlayer bool    b
 

This method sets whether this dynamic object is a known player or not. A known player is a player of which we know the number. If we don't know the player number of a player, the player is put at the index of a player that isn't seen in a while and the isKnownPlayer attribute is set to false.

Parameters:
b  bool indicating whether player number is known
Returns:
bool indicating whether value was set.

Definition at line 564 of file Objects.C.

References isKnownPlayer.

Referenced by WorldModel::processPerfectHearInfo(), WorldModel::processSeeGlobalInfo(), and WorldModel::setIsKnownPlayer().

bool PlayerObject::setRelativeBodyAngle AngDeg    ang,
Time    time
 

This method sets the facing direction of the body and the time of this information (all relative to the agent).

Parameters:
ang  new relative facing direction of body
time  time corresponding to the facing direction
Returns:
bool indicating whether the values were set

Definition at line 449 of file Objects.C.

References AngDeg, angRelativeBodyAngle, and setTimeRelativeAngles().

bool PlayerObject::setRelativeNeckAngle AngDeg    ang,
Time    time
 

This method returns the facing direction of the neck and the time of this information (all relative to the agent).

Parameters:
ang  new relative facing direction of neck
time  time facing direction was received
Returns:
bool indicating whether the values were set

Definition at line 489 of file Objects.C.

References AngDeg, angRelativeNeckAngle, and setTimeRelativeAngles().

bool PlayerObject::setTimeGlobalAngles Time    time
 

This method sets the time the facing direction was calculated.

Parameters:
time  time the facing direction was received
Returns:
bool indicating whether the values were set

Definition at line 544 of file Objects.C.

References timeGlobalAngles.

Referenced by setGlobalBodyAngle(), and setGlobalNeckAngle().

bool PlayerObject::setTimeRelativeAngles Time    time
 

This method sets the time the facing direction was calculated.

Parameters:
time  time the facing direction was received
Returns:
bool indicating whether the values were set

Definition at line 527 of file Objects.C.

References timeRelativeAngles.

Referenced by setRelativeBodyAngle(), and setRelativeNeckAngle().

void PlayerObject::show const char *    strTeamName,
ostream &    os = cout
 

This method prints the information about this PlayerObject to the specified output stream. The variables are printed with the specified team name.

Parameters:
strTeamName  team name of this player object
os  output stream to which output is written

Reimplemented in AgentObject.

Definition at line 609 of file Objects.C.

References angGlobalNeckAngle, getGlobalBodyAngle(), SoccerTypes::getObjectStr(), MAX_TEAM_NAME_LENGTH, Object::objectType, Object::posGlobal, Object::posRelative, timeGlobalAngles, Object::timeGlobalPosDerivedFromSee, Object::timeGlobalPosition, DynamicObject::timeGlobalVelocity, Object::timeLastSeen, Object::timeRelativePosition, and DynamicObject::vecGlobalVelocity.

void PlayerObject::show ostream &    os = cout [virtual]
 

This method prints the information about this PlayerObject to the specified output stream. The variables are printed with the default team name.

Parameters:
os  output stream to which output is written

Reimplemented from Object.

Reimplemented in AgentObject.

Definition at line 600 of file Objects.C.

References DEFAULT_TEAM_NAME.

Referenced by WorldModel::show().


Member Data Documentation

AngDeg PlayerObject::angGlobalBodyAngle [protected]
 

Global body angle

Definition at line 185 of file Objects.h.

Referenced by PlayerObject(), setGlobalBodyAngle(), and AgentObject::setGlobalNeckAngle().

AngDeg PlayerObject::angGlobalNeckAngle [protected]
 

Global neck angle

Definition at line 186 of file Objects.h.

Referenced by AgentObject::AgentObject(), PlayerObject(), AgentObject::setGlobalNeckAngle(), setGlobalNeckAngle(), AgentObject::show(), and show().

AngDeg PlayerObject::angRelativeBodyAngle [private]
 

Relative body angle to main player

Definition at line 190 of file Objects.h.

Referenced by PlayerObject(), and setRelativeBodyAngle().

AngDeg PlayerObject::angRelativeNeckAngle [private]
 

Relative neck angle to main player

Definition at line 191 of file Objects.h.

Referenced by PlayerObject(), and setRelativeNeckAngle().

bool PlayerObject::isGoalie [protected]
 

is this object a goalie

Definition at line 184 of file Objects.h.

Referenced by getIsGoalie(), PlayerObject(), and setIsGoalie().

bool PlayerObject::isKnownPlayer [protected]
 

are we sure about player number

Definition at line 183 of file Objects.h.

Referenced by getIsKnownPlayer(), PlayerObject(), and setIsKnownPlayer().

Time PlayerObject::timeGlobalAngles [protected]
 

Server time of global angles

Definition at line 187 of file Objects.h.

Referenced by getTimeGlobalAngles(), setTimeGlobalAngles(), and show().

Time PlayerObject::timeRelativeAngles [private]
 

Server time of relative angles

Definition at line 192 of file Objects.h.

Referenced by getTimeRelativeAngles(), and setTimeRelativeAngles().


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