#include <catcheffector.h>
Inheritance diagram for CatchEffector:
Public Member Functions | |
CatchEffector () | |
virtual | ~CatchEffector () |
virtual bool | Realize (boost::shared_ptr< oxygen::ActionObject > action) |
realizes the action described by the ActionObject | |
virtual std::string | GetPredicate () |
returns the name of the predicate this effector implements. | |
virtual boost::shared_ptr< oxygen::ActionObject > | GetActionObject (const oxygen::Predicate &predicate) |
constructs an Actionobject, describing a predicate | |
virtual void | OnLink () |
setup the reference to the ball body node | |
virtual void | OnUnlink () |
remove the reference to the ball body node | |
void | SetCatchMargin (float margin) |
set the catch margin (the area within objects are catchable) | |
Protected Member Functions | |
void | MoveBall (const salt::Vector3f &pos) |
moves the ball to pos setting its linear and angular velocity to 0 | |
Protected Attributes | |
boost::shared_ptr< SoccerRuleAspect > | mSoccerRule |
reference to the soccer rule aspect | |
boost::shared_ptr< oxygen::Body > | mBallBody |
reference to the body node of the ball | |
boost::shared_ptr< oxygen::AgentAspect > | mAgent |
reference to the agent aspect | |
boost::shared_ptr< AgentState > | mAgentState |
reference to the agentstate | |
salt::AABB2 | mRightPenaltyArea |
bounding box for the right penalty area | |
salt::AABB2 | mLeftPenaltyArea |
bounding box for the left penalty area | |
float | mFieldLength |
the field length (in meters) | |
float | mGoalWidth |
the goal width (in meters) | |
Private Attributes | |
float | mCatchMargin |
the margin where objects can be catched | |
float | mPlayerRadius |
radius of the player | |
float | mBallRadius |
radius of the ball |
Definition at line 44 of file catcheffector.h.
|
Definition at line 41 of file catcheffector.cpp. |
|
Definition at line 47 of file catcheffector.cpp. |
|
constructs an Actionobject, describing a predicate
Implements oxygen::Effector. Definition at line 154 of file catcheffector.cpp. References zeitgeist::Object::GetLog(), GetPredicate(), and oxygen::Predicate::name. Here is the call graph for this function: ![]() |
|
returns the name of the predicate this effector implements.
Implements oxygen::Effector. Definition at line 54 of file catcheffector.h. Referenced by GetActionObject(). |
|
moves the ball to pos setting its linear and angular velocity to 0
Definition at line 52 of file catcheffector.cpp. References mBallBody. Referenced by Realize(). |
|
setup the reference to the ball body node
Reimplemented from zeitgeist::Leaf. Definition at line 175 of file catcheffector.cpp. References SoccerBase::GetAgentState(), SoccerBase::GetBallBody(), SoccerBase::GetBallCollider(), zeitgeist::Object::GetLog(), zeitgeist::Leaf::GetParent(), SoccerBase::GetSoccerRuleAspect(), SoccerBase::GetSoccerVar(), mAgent, mAgentState, mBallBody, mBallRadius, mFieldLength, mGoalWidth, mLeftPenaltyArea, mPlayerRadius, mRightPenaltyArea, and mSoccerRule. Here is the call graph for this function: ![]() |
|
remove the reference to the ball body node
Reimplemented from zeitgeist::Leaf. Definition at line 229 of file catcheffector.cpp. References mAgent, mAgentState, mBallBody, and mSoccerRule. |
|
realizes the action described by the ActionObject
Implements oxygen::Effector. Definition at line 60 of file catcheffector.cpp. References salt::AABB2::Contains(), zeitgeist::Object::GetLog(), salt::TVector< DATATYPE, ELEMENTS, TYPE >::Length(), mAgent, mAgentState, mBallBody, mBallRadius, mCatchMargin, mLeftPenaltyArea, MoveBall(), mPlayerRadius, mRightPenaltyArea, mSoccerRule, TI_LEFT, and TI_RIGHT. Here is the call graph for this function: ![]() |
|
set the catch margin (the area within objects are catchable)
Definition at line 238 of file catcheffector.cpp. References mCatchMargin. |
|
reference to the agent aspect
Definition at line 79 of file catcheffector.h. Referenced by OnLink(), OnUnlink(), and Realize(). |
|
reference to the agentstate
Definition at line 81 of file catcheffector.h. Referenced by OnLink(), OnUnlink(), and Realize(). |
|
reference to the body node of the ball
Definition at line 77 of file catcheffector.h. Referenced by MoveBall(), OnLink(), OnUnlink(), and Realize(). |
|
radius of the ball
Definition at line 99 of file catcheffector.h. |
|
the margin where objects can be catched
Definition at line 95 of file catcheffector.h. Referenced by Realize(), and SetCatchMargin(). |
|
the field length (in meters)
Definition at line 89 of file catcheffector.h. Referenced by OnLink(). |
|
the goal width (in meters)
Definition at line 91 of file catcheffector.h. Referenced by OnLink(). |
|
bounding box for the left penalty area
Definition at line 86 of file catcheffector.h. |
|
radius of the player
Definition at line 97 of file catcheffector.h. |
|
bounding box for the right penalty area
Definition at line 84 of file catcheffector.h. |
|
reference to the soccer rule aspect
Definition at line 73 of file catcheffector.h. Referenced by OnLink(), OnUnlink(), and Realize(). |