#include <soccerbase.h>
Public Types | |
typedef std::list< boost::shared_ptr< AgentState > > | TAgentStateList |
Public Member Functions | |
SoccerBase () | |
virtual | ~SoccerBase () |
Static Public Member Functions | |
static bool | GetSceneServer (const zeitgeist::Leaf &base, boost::shared_ptr< oxygen::SceneServer > &scene_server) |
returns a reference to the SceneServer | |
static bool | GetTransformParent (const zeitgeist::Leaf &base, boost::shared_ptr< oxygen::Transform > &transform_parent) |
returns a reference to the closest parent supporting Transform | |
static bool | GetBody (const zeitgeist::Leaf &base, boost::shared_ptr< oxygen::Body > &body) |
returns a reference to the Body node below the closest transform parent | |
static bool | GetAgentBody (const boost::shared_ptr< oxygen::Transform > transform, boost::shared_ptr< oxygen::Body > &agent_body) |
returns a reference to the Body node below the given Transform node | |
static bool | GetAgentBody (const zeitgeist::Leaf &base, TTeamIndex idx, int unum, boost::shared_ptr< oxygen::Body > &agent_body) |
returns a reference to the Body node below the given Transform node based on parameters team index and uniform number | |
static bool | GetAgentState (const zeitgeist::Leaf &base, boost::shared_ptr< AgentState > &agent_state) |
returns a reference to the AgentState node below the closest Transform parent | |
static bool | GetAgentState (const boost::shared_ptr< oxygen::Transform > transform, boost::shared_ptr< AgentState > &agentState) |
returns a reference to the AgentState node below the given transform node | |
static bool | GetAgentState (const zeitgeist::Leaf &base, TTeamIndex idx, int unum, boost::shared_ptr< AgentState > &agent_state) |
returns a reference to the AgentState node below the given Transform node based on parameters team index and uniform number | |
static bool | GetAgentStates (const zeitgeist::Leaf &base, TAgentStateList &agentStates, TTeamIndex idx=TI_NONE) |
static bool | GetGameState (const zeitgeist::Leaf &base, boost::shared_ptr< GameStateAspect > &game_state) |
return a reference to the GameStateAspect node | |
static bool | GetSoccerRuleAspect (const zeitgeist::Leaf &base, boost::shared_ptr< SoccerRuleAspect > &soccer_rule_aspect) |
return a reference to the SoccerRuleAspect node | |
static bool | GetActiveScene (const zeitgeist::Leaf &base, boost::shared_ptr< oxygen::Scene > &active_scene) |
returns a reference to the active scene from the SceneServer | |
static bool | GetBall (const zeitgeist::Leaf &base, boost::shared_ptr< Ball > &ball) |
returns a reference to the Ball node | |
static bool | GetBallBody (const zeitgeist::Leaf &base, boost::shared_ptr< oxygen::Body > &body) |
returns a reference to the Body node below the Ball | |
static bool | GetBallCollider (const zeitgeist::Leaf &base, boost::shared_ptr< oxygen::SphereCollider > &sphere) |
returns a reference to the Body SphereCollider node below the Ball | |
static salt::Vector3f | FlipView (const salt::Vector3f &pos, TTeamIndex ti) |
flips horizontal coordinates according to the side of the agent | |
static TTeamIndex | OpponentTeam (TTeamIndex ti) |
Get the team index of the opponent team. | |
static boost::shared_ptr< oxygen::ControlAspect > | GetControlAspect (const zeitgeist::Leaf &base, const std::string &name) |
returns a reference to a ControlAspect registered to the GameControlServer | |
template<typename TYPE> | |
static bool | GetSoccerVar (const zeitgeist::Leaf &base, const std::string &name, TYPE &value) |
looks up a ruby variable in the Soccer namespace | |
static std::string | PlayMode2Str (const TPlayMode mode) |
returns a string representing a play mode |
Definition at line 55 of file soccerbase.h.
|
Definition at line 58 of file soccerbase.h. |
|
Definition at line 61 of file soccerbase.h. |
|
Definition at line 63 of file soccerbase.h. |
|
flips horizontal coordinates according to the side of the agent
Definition at line 388 of file soccerbase.cpp. References TI_LEFT, TI_NONE, and TI_RIGHT. Referenced by VisionPerceptor::DynamicAxisPercept(), RestrictedVisionPerceptor::DynamicAxisPercept(), DriveEffector::PrePhysicsUpdateInternal(), BeamEffector::Realize(), VisionPerceptor::StaticAxisPercept(), and RestrictedVisionPerceptor::StaticAxisPercept(). |
|
returns a reference to the active scene from the SceneServer
Referenced by GetAgentStates(), VisionPerceptor::OnLink(), and RestrictedVisionPerceptor::OnLink(). |
|
returns a reference to the Body node below the given Transform node based on parameters team index and uniform number
|
|
returns a reference to the Body node below the given Transform node
Referenced by SoccerRuleAspect::CheckOffside(), SoccerRuleAspect::ClearPlayers(), TrainerCommandParser::ParsePlayerCommand(), and InitEffector::Realize(). |
|
returns a reference to the AgentState node below the given Transform node based on parameters team index and uniform number
|
|
returns a reference to the AgentState node below the given transform node
|
|
returns a reference to the AgentState node below the closest Transform parent
Referenced by SoccerRuleAspect::CheckBallLeftField(), SoccerRuleAspect::CheckOffside(), GetAgentStates(), VisionPerceptor::OnLink(), SayEffector::OnLink(), RestrictedVisionPerceptor::OnLink(), PanTiltEffector::OnLink(), HearPerceptor::OnLink(), GameStatePerceptor::OnLink(), DriveEffector::OnLink(), CatchEffector::OnLink(), BeamEffector::OnLink(), AgentStatePerceptor::OnLink(), TrainerCommandParser::ParsePlayerCommand(), and SoccerRuleAspect::UpdateOffside(). |
|
Definition at line 189 of file soccerbase.cpp. References GetActiveScene(), GetAgentState(), zeitgeist::Object::GetLog(), and TI_NONE. Referenced by SoccerRuleAspect::CheckOffside(), and SoccerRuleAspect::ClearPlayers(). Here is the call graph for this function: ![]() |
|
returns a reference to the Ball node
Referenced by KickEffector::OnLink(), and BallStateAspect::OnLink(). |
|
returns a reference to the Body node below the Ball
Referenced by SoccerRuleAspect::OnLink(), KickEffector::OnLink(), CatchEffector::OnLink(), and TrainerCommandParser::ParseBallCommand(). |
|
returns a reference to the Body SphereCollider node below the Ball
Referenced by KickEffector::OnLink(), and CatchEffector::OnLink(). |
|
returns a reference to the Body node below the closest transform parent
Referenced by PanTiltEffector::OnLink(), DriveEffector::OnLink(), and BeamEffector::OnLink(). |
|
returns a reference to a ControlAspect registered to the GameControlServer
Referenced by InitEffector::OnLink(). |
|
return a reference to the GameStateAspect node
Referenced by SexpMonitor::OnLink(), HearPerceptor::OnLink(), GameStatePerceptor::OnLink(), GameStateItem::OnLink(), BeamEffector::OnLink(), and TrainerCommandParser::ParsePredicate(). |
|
returns a reference to the SceneServer
|
|
return a reference to the SoccerRuleAspect node
Referenced by SayEffector::OnLink(), CatchEffector::OnLink(), and TrainerCommandParser::ParsePredicate(). |
|
looks up a ruby variable in the Soccer namespace
Definition at line 158 of file soccerbase.h. References zeitgeist::Object::GetCore(), zeitgeist::Object::GetLog(), and zeitgeist::Leaf::GetName(). Referenced by GameStatePerceptor::InsertSoccerParam(), GameStateAspect::OnLink(), CatchEffector::OnLink(), BeamEffector::OnLink(), and SoccerRuleAspect::UpdateCachedInternal(). Here is the call graph for this function: ![]() |
|
returns a reference to the closest parent supporting Transform
Referenced by SoccerRuleAspect::CheckOffside(), SoccerRuleAspect::ClearPlayers(), VisionPerceptor::OnLink(), RestrictedVisionPerceptor::OnLink(), PanTiltEffector::OnLink(), ObjectState::OnLink(), and DriveEffector::OnLink(). |
|
Get the team index of the opponent team.
Definition at line 407 of file soccerbase.cpp. References TI_LEFT, TI_NONE, and TI_RIGHT. Referenced by SoccerRuleAspect::CheckOffside(), SoccerRuleAspect::UpdateCornerKick(), SoccerRuleAspect::UpdateGoalKick(), SoccerRuleAspect::UpdateKickIn(), SoccerRuleAspect::UpdateKickOff(), and SoccerRuleAspect::UpdateOffside(). |
|
returns a string representing a play mode
Definition at line 421 of file soccerbase.cpp. References PM_BeforeKickOff, PM_CORNER_KICK_LEFT, PM_CORNER_KICK_RIGHT, PM_FREE_KICK_LEFT, PM_FREE_KICK_RIGHT, PM_GameOver, PM_GOAL_KICK_LEFT, PM_GOAL_KICK_RIGHT, PM_Goal_Left, PM_Goal_Right, PM_KickIn_Left, PM_KickIn_Right, PM_KickOff_Left, PM_KickOff_Right, PM_OFFSIDE_LEFT, PM_OFFSIDE_RIGHT, PM_PlayOn, STR_PM_BeforeKickOff, STR_PM_CORNER_KICK_LEFT, STR_PM_CORNER_KICK_RIGHT, STR_PM_FREE_KICK_LEFT, STR_PM_FREE_KICK_RIGHT, STR_PM_GameOver, STR_PM_GOAL_KICK_LEFT, STR_PM_GOAL_KICK_RIGHT, STR_PM_Goal_Left, STR_PM_Goal_Right, STR_PM_KickIn_Left, STR_PM_KickIn_Right, STR_PM_KickOff_Left, STR_PM_KickOff_Right, STR_PM_OFFSIDE_LEFT, STR_PM_OFFSIDE_RIGHT, STR_PM_PlayOn, and STR_PM_Unknown. Referenced by GameStateItem::GetInitialPredicates(), GameStatePerceptor::Percept(), and GameStateAspect::SetPlayMode(). |