#include <Objects.h>
Inheritance diagram for PlayerObject:
Definition at line 190 of file Objects.h.
PlayerObject::PlayerObject | ( | ) |
This is the constructor for PlayerObject. A PlayerObject is created with all variables initialized to (illegal) default values
Definition at line 461 of file Objects.cpp.
References angGlobalBodyAngle, angGlobalNeckAngle, angRelativeBodyAngle, angRelativeNeckAngle, iHeteroPlayerType, isGoalie, isKnownPlayer, and UnknownAngleValue.
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.
os | output stream to which output is written |
Implements Object.
Reimplemented in AgentObject.
Definition at line 709 of file Objects.cpp.
References DEFAULT_TEAM_NAME.
Referenced by WorldModel::show().
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.
strTeamName | team name of this player object | |
os | output stream to which output is written |
Reimplemented in AgentObject.
Definition at line 718 of file Objects.cpp.
References angGlobalNeckAngle, Object::getConfidence(), getGlobalBodyAngle(), SoccerTypes::getObjectStr(), isKnownPlayer, MAX_TEAM_NAME_LENGTH, Object::objectType, Object::posGlobal, timeGlobalAngles, Object::timeGlobalPosition, DynamicObject::timeGlobalVelocity, Object::timeLastSeen, and DynamicObject::vecGlobalVelocity.
This method sets the possible range from which this object must originate from. Since the ordening of objects in a 'see' message is always the same (first teammates then opponents and always sorted by player number), it is possible to derive the range of objects from which the supplied information must originate.
objMin | minimum object type | |
objMax | maximum object type |
Definition at line 623 of file Objects.cpp.
References objRangeMax, and objRangeMin.
Referenced by WorldModel::processNewObjectInfo().
bool PlayerObject::isInRange | ( | ObjectT | obj, | |
bool | bTeammatesFirst | |||
) |
This method returns a boolean indicating whether the supplied object type, is in the range of possible object types set by 'setPossibleRange'.
obj | Object type that should be checked |
Definition at line 634 of file Objects.cpp.
References SoccerTypes::getIndex(), SoccerTypes::isOpponent(), objRangeMax, and objRangeMin.
ObjectT PlayerObject::getMinRange | ( | ) |
This method returns the minimal possible object type as set by 'setPossibleRange'.
Definition at line 654 of file Objects.cpp.
References objRangeMin.
ObjectT PlayerObject::getMaxRange | ( | ) |
This method returns the maximal possible object type as set by 'setPossibleRange'.
Definition at line 662 of file Objects.cpp.
References objRangeMax.
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.
b | bool indicating whether player number is known |
Definition at line 673 of file Objects.cpp.
References isKnownPlayer.
Referenced by WorldModel::processNewObjectInfo(), WorldModel::processPerfectHearInfo(), WorldModel::processSeeGlobalInfo(), and WorldModel::setIsKnownPlayer().
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.
Definition at line 684 of file Objects.cpp.
References isKnownPlayer.
Referenced by WorldModel::isKnownPlayer(), and WorldModel::processPerfectHearInfo().
bool PlayerObject::setIsGoalie | ( | bool | b | ) |
This method sets whether this dynamic object is a goalie or not.
b | bool indicating whether this dynamic object is a goalie |
Definition at line 692 of file Objects.cpp.
References isGoalie.
Referenced by WorldModel::processPerfectHearInfo().
bool PlayerObject::getIsGoalie | ( | ) | const |
This method returns whether the current object is a goalie or not.
Definition at line 700 of file Objects.cpp.
References isGoalie.
This method sets the facing direction of the body and the time of this information (all relative to the agent).
ang | new relative facing direction of body | |
time | time corresponding to the facing direction |
Definition at line 479 of file Objects.cpp.
References angRelativeBodyAngle, and setTimeRelativeAngles().
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().
Definition at line 491 of file Objects.cpp.
References angRelativeBodyAngle.
Referenced by WorldModel::updateDynamicObjectAfterSee().
This method sets the facing direction of the body and the time of this information (all global).
ang | new global facing direction of body | |
time | time corresponding to the facing direction |
Definition at line 501 of file Objects.cpp.
References angGlobalBodyAngle, and setTimeGlobalAngles().
Referenced by WorldModel::processSeeGlobalInfo(), and WorldModel::updateDynamicObjectAfterSee().
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().
Definition at line 511 of file Objects.cpp.
References angGlobalBodyAngle.
Referenced by WorldModel::getAgentGlobalBodyAngle(), WorldModel::getGlobalBodyAngle(), and show().
This method returns the facing direction of the neck and the time of this information (all relative to the agent).
ang | new relative facing direction of neck | |
time | time facing direction was received |
Definition at line 521 of file Objects.cpp.
References angRelativeNeckAngle, and setTimeRelativeAngles().
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().
Definition at line 531 of file Objects.cpp.
References angRelativeNeckAngle.
Referenced by WorldModel::updateDynamicObjectAfterSee().
This method returns the facing direction of the neck and the time of this information (all global).
ang | new global facing direction of neck | |
iTime | time facing direction was received |
Definition at line 541 of file Objects.cpp.
References angGlobalNeckAngle, and setTimeGlobalAngles().
Referenced by WorldModel::processSeeGlobalInfo(), and WorldModel::updateDynamicObjectAfterSee().
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().
Definition at line 551 of file Objects.cpp.
References angGlobalNeckAngle.
Referenced by WorldModel::calculateStatePlayer(), WorldModel::getAgentGlobalNeckAngle(), and WorldModel::getGlobalNeckAngle().
bool PlayerObject::setTimeRelativeAngles | ( | Time | time | ) |
This method sets the time the facing direction was calculated.
time | time the facing direction was received |
Definition at line 559 of file Objects.cpp.
References timeRelativeAngles.
Referenced by setRelativeBodyAngle(), and setRelativeNeckAngle().
Time PlayerObject::getTimeRelativeAngles | ( | ) | const |
This method returns the server time in which the relative body and neck angle of this object were calculated.
Definition at line 568 of file Objects.cpp.
References timeRelativeAngles.
Referenced by WorldModel::updateDynamicObjectAfterSee().
bool PlayerObject::setTimeGlobalAngles | ( | Time | time | ) |
This method sets the time the facing direction was calculated.
time | time the facing direction was received |
Definition at line 576 of file Objects.cpp.
References timeGlobalAngles.
Referenced by setGlobalBodyAngle(), and setGlobalNeckAngle().
Time PlayerObject::getTimeGlobalAngles | ( | ) | const |
This method returns the server time in which the global body and neck angle of this object were calculated.
Definition at line 610 of file Objects.cpp.
References timeGlobalAngles.
Referenced by WorldModel::getTimeGlobalAngles().
bool PlayerObject::setGlobalBodyAngleLastSee | ( | AngDeg | ang | ) |
This method sets the global angle of the agent calculated after the last see message. The time of this information corresponds to 'getTimeChangeInformation', since the change information arrives always together with the body and neck information.
Definition at line 588 of file Objects.cpp.
References angGlobalBodyAngleLastSee.
Referenced by WorldModel::updateDynamicObjectAfterSee().
AngDeg PlayerObject::getGlobalBodyAngleLastSee | ( | ) | const |
This method returns the global angle of the agent calculated after the last see message. The time of this information corresponds to 'getTimeChangeInformation', since the change information arrives always together with the body and neck information.
Definition at line 601 of file Objects.cpp.
References angGlobalBodyAngleLastSee.
Referenced by WorldModel::getGlobalBodyAngleLastSee().
bool PlayerObject::setHeteroPlayerType | ( | int | index | ) |
This method sets the heterogeneous index number of this player object.
hetereogeneous | index number |
Definition at line 738 of file Objects.cpp.
References iHeteroPlayerType.
Referenced by WorldModel::mapUnknownPlayers(), and WorldModel::setHeteroPlayerType().
int PlayerObject::getHeteroPlayerType | ( | ) | const |
This method returns the heterogeneous index number of this player object.
Definition at line 746 of file Objects.cpp.
References iHeteroPlayerType.
Referenced by WorldModel::getHeteroInfoPlayer(), and WorldModel::getHeteroPlayerType().
bool PlayerObject::setTimeTackle | ( | Time | time | ) |
This method sets the time related to the last tackle of this object.
Definition at line 753 of file Objects.cpp.
References m_timeTackle.
Time PlayerObject::getTimeTackle | ( | ) | const |
This method returns the time that is related to the last tackle of this object.
Definition at line 761 of file Objects.cpp.
References m_timeTackle.
Referenced by WorldModel::getTackleExpires().
This method sets the global direction in which the arm of this object has last been observed to point. The time related to this update is represented by time.
Definition at line 770 of file Objects.cpp.
References m_angGlobalArm, and setTimeGlobalArm().
AngDeg PlayerObject::getGlobalArm | ( | ) | const |
This method returns the global direction in which the arm of this object has last been observed to point.
Definition at line 778 of file Objects.cpp.
References m_angGlobalArm.
Referenced by WorldModel::getGlobalArmDirection().
bool PlayerObject::setTimeGlobalArm | ( | Time | time | ) |
This method sets the time that is related to the last time the arm of this object has been observed to point in the global direction returned by 'getGlobalArm'.
Definition at line 786 of file Objects.cpp.
References m_timeGlobalArm.
Referenced by setGlobalArm().
Time PlayerObject::getTimeGlobalArm | ( | ) | const |
This method returns the time that is related to the last time the arm of this object has been observed to point in the global direction returned by 'getGlobalArm'.
Definition at line 795 of file Objects.cpp.
References m_timeGlobalArm.
Referenced by WorldModel::getTimeGlobalArmDirection().
bool PlayerObject::isKnownPlayer [protected] |
are we sure about player number
Definition at line 193 of file Objects.h.
Referenced by getIsKnownPlayer(), PlayerObject(), setIsKnownPlayer(), and show().
ObjectT PlayerObject::objRangeMin [protected] |
Minimum in range of possible player obj
Definition at line 194 of file Objects.h.
Referenced by getMinRange(), isInRange(), and setPossibleRange().
ObjectT PlayerObject::objRangeMax [protected] |
Maximum in range of possible player obj
Definition at line 195 of file Objects.h.
Referenced by getMaxRange(), isInRange(), and setPossibleRange().
bool PlayerObject::isGoalie [protected] |
is this object a goalie
Definition at line 196 of file Objects.h.
Referenced by getIsGoalie(), PlayerObject(), and setIsGoalie().
AngDeg PlayerObject::angGlobalBodyAngle [protected] |
Global body angle
Definition at line 197 of file Objects.h.
Referenced by getGlobalBodyAngle(), PlayerObject(), setGlobalBodyAngle(), and AgentObject::setGlobalNeckAngle().
AngDeg PlayerObject::angGlobalNeckAngle [protected] |
Global neck angle
Definition at line 198 of file Objects.h.
Referenced by AgentObject::AgentObject(), getGlobalNeckAngle(), PlayerObject(), AgentObject::setGlobalNeckAngle(), setGlobalNeckAngle(), AgentObject::show(), and show().
AngDeg PlayerObject::angGlobalBodyAngleLastSee [protected] |
Global body angle from last see msg
Definition at line 199 of file Objects.h.
Referenced by getGlobalBodyAngleLastSee(), and setGlobalBodyAngleLastSee().
Time PlayerObject::timeGlobalAngles [protected] |
Server time of global angles
Definition at line 200 of file Objects.h.
Referenced by getTimeGlobalAngles(), setTimeGlobalAngles(), and show().
int PlayerObject::iHeteroPlayerType [protected] |
index of heterogeneous player type
Definition at line 201 of file Objects.h.
Referenced by getHeteroPlayerType(), PlayerObject(), and setHeteroPlayerType().
Time PlayerObject::m_timeTackle [protected] |
time tackle command was observerd
Definition at line 203 of file Objects.h.
Referenced by getTimeTackle(), and setTimeTackle().
AngDeg PlayerObject::m_angGlobalArm [protected] |
global pointing direction of arm
Definition at line 205 of file Objects.h.
Referenced by getGlobalArm(), and setGlobalArm().
Time PlayerObject::m_timeGlobalArm [protected] |
time arm last seen
Definition at line 206 of file Objects.h.
Referenced by getTimeGlobalArm(), and setTimeGlobalArm().
AngDeg PlayerObject::angRelativeBodyAngle [private] |
Relative body angle to main player
Definition at line 209 of file Objects.h.
Referenced by getRelativeBodyAngle(), PlayerObject(), and setRelativeBodyAngle().
AngDeg PlayerObject::angRelativeNeckAngle [private] |
Relative neck angle to main player
Definition at line 210 of file Objects.h.
Referenced by getRelativeNeckAngle(), PlayerObject(), and setRelativeNeckAngle().
Time PlayerObject::timeRelativeAngles [private] |
Server time of relative angles
Definition at line 211 of file Objects.h.
Referenced by getTimeRelativeAngles(), and setTimeRelativeAngles().