Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SoccerBase Class Reference

#include <soccerbase.h>

List of all members.

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


Detailed Description

Definition at line 55 of file soccerbase.h.


Member Typedef Documentation

typedef std::list<boost::shared_ptr<AgentState> > SoccerBase::TAgentStateList
 

Definition at line 58 of file soccerbase.h.


Constructor & Destructor Documentation

SoccerBase::SoccerBase  )  [inline]
 

Definition at line 61 of file soccerbase.h.

virtual SoccerBase::~SoccerBase  )  [inline, virtual]
 

Definition at line 63 of file soccerbase.h.


Member Function Documentation

salt::Vector3f SoccerBase::FlipView const salt::Vector3f pos,
TTeamIndex  ti
[static]
 

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().

static bool SoccerBase::GetActiveScene const zeitgeist::Leaf base,
boost::shared_ptr< oxygen::Scene > &  active_scene
[static]
 

returns a reference to the active scene from the SceneServer

Referenced by GetAgentStates(), VisionPerceptor::OnLink(), and RestrictedVisionPerceptor::OnLink().

static bool SoccerBase::GetAgentBody const zeitgeist::Leaf base,
TTeamIndex  idx,
int  unum,
boost::shared_ptr< oxygen::Body > &  agent_body
[static]
 

returns a reference to the Body node below the given Transform node based on parameters team index and uniform number

static bool SoccerBase::GetAgentBody const boost::shared_ptr< oxygen::Transform transform,
boost::shared_ptr< oxygen::Body > &  agent_body
[static]
 

returns a reference to the Body node below the given Transform node

Referenced by SoccerRuleAspect::CheckOffside(), SoccerRuleAspect::ClearPlayers(), TrainerCommandParser::ParsePlayerCommand(), and InitEffector::Realize().

static bool SoccerBase::GetAgentState const zeitgeist::Leaf base,
TTeamIndex  idx,
int  unum,
boost::shared_ptr< AgentState > &  agent_state
[static]
 

returns a reference to the AgentState node below the given Transform node based on parameters team index and uniform number

static bool SoccerBase::GetAgentState const boost::shared_ptr< oxygen::Transform transform,
boost::shared_ptr< AgentState > &  agentState
[static]
 

returns a reference to the AgentState node below the given transform node

static bool SoccerBase::GetAgentState const zeitgeist::Leaf base,
boost::shared_ptr< AgentState > &  agent_state
[static]
 

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().

bool SoccerBase::GetAgentStates const zeitgeist::Leaf base,
TAgentStateList agentStates,
TTeamIndex  idx = TI_NONE
[static]
 

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:

static bool SoccerBase::GetBall const zeitgeist::Leaf base,
boost::shared_ptr< Ball > &  ball
[static]
 

returns a reference to the Ball node

Referenced by KickEffector::OnLink(), and BallStateAspect::OnLink().

static bool SoccerBase::GetBallBody const zeitgeist::Leaf base,
boost::shared_ptr< oxygen::Body > &  body
[static]
 

returns a reference to the Body node below the Ball

Referenced by SoccerRuleAspect::OnLink(), KickEffector::OnLink(), CatchEffector::OnLink(), and TrainerCommandParser::ParseBallCommand().

static bool SoccerBase::GetBallCollider const zeitgeist::Leaf base,
boost::shared_ptr< oxygen::SphereCollider > &  sphere
[static]
 

returns a reference to the Body SphereCollider node below the Ball

Referenced by KickEffector::OnLink(), and CatchEffector::OnLink().

static bool SoccerBase::GetBody const zeitgeist::Leaf base,
boost::shared_ptr< oxygen::Body > &  body
[static]
 

returns a reference to the Body node below the closest transform parent

Referenced by PanTiltEffector::OnLink(), DriveEffector::OnLink(), and BeamEffector::OnLink().

static boost::shared_ptr<oxygen::ControlAspect> SoccerBase::GetControlAspect const zeitgeist::Leaf base,
const std::string &  name
[static]
 

returns a reference to a ControlAspect registered to the GameControlServer

Referenced by InitEffector::OnLink().

static bool SoccerBase::GetGameState const zeitgeist::Leaf base,
boost::shared_ptr< GameStateAspect > &  game_state
[static]
 

return a reference to the GameStateAspect node

Referenced by SexpMonitor::OnLink(), HearPerceptor::OnLink(), GameStatePerceptor::OnLink(), GameStateItem::OnLink(), BeamEffector::OnLink(), and TrainerCommandParser::ParsePredicate().

static bool SoccerBase::GetSceneServer const zeitgeist::Leaf base,
boost::shared_ptr< oxygen::SceneServer > &  scene_server
[static]
 

returns a reference to the SceneServer

static bool SoccerBase::GetSoccerRuleAspect const zeitgeist::Leaf base,
boost::shared_ptr< SoccerRuleAspect > &  soccer_rule_aspect
[static]
 

return a reference to the SoccerRuleAspect node

Referenced by SayEffector::OnLink(), CatchEffector::OnLink(), and TrainerCommandParser::ParsePredicate().

template<typename TYPE>
static bool SoccerBase::GetSoccerVar const zeitgeist::Leaf base,
const std::string &  name,
TYPE &  value
[inline, static]
 

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:

static bool SoccerBase::GetTransformParent const zeitgeist::Leaf base,
boost::shared_ptr< oxygen::Transform > &  transform_parent
[static]
 

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().

TTeamIndex SoccerBase::OpponentTeam TTeamIndex  ti  )  [static]
 

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().

string SoccerBase::PlayMode2Str const TPlayMode  mode  )  [static]
 

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().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:40:29 2006 for rcssserver3d by  doxygen 1.4.4