Inheritance diagram for RS::OffsideTrapView:


Public Member Functions | |
| OffsideTrapView (const ViewId id, Float maxTrapDist=25.0) | |
| Construct a view with the ViewId id. | |
| ~OffsideTrapView () | |
| Destroys the view. | |
| bool | canPressureOpponent () |
| Checks whether there are any defenders that can put pressure on the ball keeper. | |
| void | getPlayersToSetPress (std::vector< PlayerObject > &pressurePlayers) |
| Get the players that can put pressure on the ball keeper. | |
| bool | opponentHasBall () |
| Checks if opponent is ball keeper. | |
| FloatUE | getOpponentPosClosestToGoal () |
| Get the position of the opponent closest to our goal. | |
| FloatUE | getTeammatePosNextClosestToGoal () |
| Get the second last defender (including the goalie). | |
| bool | suitable () |
| Checks whether it is suitbale to start an offside trap. | |
| bool | unsuitable (int xcoord) |
| Checks wheter it is unsuitable to continue with the trap. | |
Protected Member Functions | |
| virtual void | myNewCycle () |
| Called when the sensor interface detects a new cycle. | |
| virtual void | myUpdateAfterCoachMessage () |
| Called after a new message from the coach has been recieved. | |
| virtual void | myUpdateAfterInit () |
| Called after an init message has been received. | |
| virtual void | myUpdateAfterSee () |
| Called after an visual (see) message has been received. | |
| virtual void | myUpdateAfterHear () |
| Called after an aural (hear) message has been received. | |
| virtual void | myUpdateAfterSense () |
| Called after a sense body message has been received. | |
| virtual void | myUpdateAfterCommand () |
| Called after a command has been executed. | |
Protected Attributes | |
| const WorldFacts * | facts |
| PlayerView * | playerView |
| The agents view of other players. | |
| BallView * | ballView |
| The agents view of the ball. | |
| AgentView * | agentView |
| The agents view of itself. | |
It can be used by all players. It is used by the skills InitiateOffsideTrap and ExecuteOffsideTrap.
Definition at line 106 of file OffsideTrapView.h.
|
||||||||||||
|
Construct a view with the ViewId id.
Definition at line 83 of file OffsideTrapView.cc. References RS::getView(). |
|
|
Checks whether there are any defenders that can put pressure on the ball keeper.
Definition at line 95 of file OffsideTrapView.cc. |
|
|
Get the players that can put pressure on the ball keeper.
Definition at line 105 of file OffsideTrapView.cc. References agentView, ballView, RS::AgentView::getAgentObject(), RS::BallView::getPosition(), RS::PlayerView::getTeammateClosestToBall(), RS::PlayerView::getTeammates(), and playerView. |
|
|
Checks if opponent is ball keeper.
Definition at line 150 of file OffsideTrapView.cc. References ballView, RS::PlayerView::getOpponentClosestToBall(), RS::BallView::getPosition(), RS::MobileObject::getPosition(), RS::BallView::getRelativeDistance(), RS::PlayerView::getTeammateClosestToBall(), and playerView. Referenced by suitable(). |
|
|
Get the position of the opponent closest to our goal.
Definition at line 174 of file OffsideTrapView.cc. References RS::PlayerView::getOpponents(), and playerView. Referenced by suitable(). |
|
|
Get the second last defender (including the goalie).
Definition at line 191 of file OffsideTrapView.cc. References agentView, RS::AgentView::getAgentObject(), RS::PlayerView::getTeammates(), and playerView. Referenced by suitable(), and unsuitable(). |
|
|
Checks whether it is suitbale to start an offside trap. This is considered suitable if these conditions are met:
Definition at line 218 of file OffsideTrapView.cc. References ballView, getOpponentPosClosestToGoal(), RS::BallView::getPosition(), getTeammatePosNextClosestToGoal(), and opponentHasBall(). |
|
|
Checks wheter it is unsuitable to continue with the trap. It is considered unsuitable if one of these conditions are met:
Definition at line 238 of file OffsideTrapView.cc. References ballView, RS::BallView::getPosition(), and getTeammatePosNextClosestToGoal(). |
|
|
Called when the sensor interface detects a new cycle. It is called *before* the values in SensorInterface are erased, so this is the last chance to use them. Implements RS::View. Definition at line 262 of file OffsideTrapView.cc. |
1.3-rc3