LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Types | Public Member Functions | List of all members
rcsc::PlayerState Class Reference

player state data More...

#include <player_state.h>

Public Types

typedef std::vector< const PlayerState * > Cont
 container type of the const PlayerState pointer
 

Public Member Functions

 PlayerState ()
 inititialize all value with 0 or invalid values
 
bool isValid () const
 check if this player is valid or not. More...
 
SideID side () const
 get side info More...
 
int unum () const
 get player's uniform number More...
 
bool goalie () const
 check if this player is goalie More...
 
const PlayerTypeplayerType () const
 get the pointer to player type object More...
 
const Vector2Dpos () const
 get player's position More...
 
const Vector2Dvel () const
 get player's velocity More...
 
const AngleDegbody () const
 get player's body angle More...
 
const AngleDegface () const
 get player's global face angle More...
 
Card card () const
 get current card status. More...
 
void setTeam (const SideID side, const int unum, const bool goalie)
 set team data with seen information More...
 
void setPlayerType (const int type)
 set player type by giving type id More...
 
void setPlayerType (const PlayerType *type)
 set player type More...
 
void setPos (const double x, const double y)
 set position with seen information More...
 
void setVel (const double vx, const double vy)
 set velocity with seen information More...
 
void setAngle (const double b, const double n)
 set body and neck angle with seen information More...
 
void setCard (const Card card)
 set card status
 

Detailed Description

player state data

Member Function Documentation

◆ body()

const AngleDeg & rcsc::PlayerState::body ( ) const
inline

get player's body angle

Returns
const reference to the body angle variable

◆ card()

Card rcsc::PlayerState::card ( ) const
inline

get current card status.

Returns
card type

◆ face()

const AngleDeg & rcsc::PlayerState::face ( ) const
inline

get player's global face angle

Returns
const reference to the face angle variable

◆ goalie()

bool rcsc::PlayerState::goalie ( ) const
inline

check if this player is goalie

Returns
if goalie, true

◆ isValid()

bool rcsc::PlayerState::isValid ( ) const
inline

check if this player is valid or not.

Returns
checked result.

◆ playerType()

const PlayerType * rcsc::PlayerState::playerType ( ) const
inline

get the pointer to player type object

Returns
const pointer

◆ pos()

const Vector2D & rcsc::PlayerState::pos ( ) const
inline

get player's position

Returns
const reference to the position variable

◆ setAngle()

void rcsc::PlayerState::setAngle ( const double  b,
const double  n 
)
inline

set body and neck angle with seen information

Parameters
bseen body angle
nseen neck angle relative to body

◆ setPlayerType() [1/2]

void rcsc::PlayerState::setPlayerType ( const int  type)

set player type by giving type id

Parameters
typeplayer type id

◆ setPlayerType() [2/2]

void rcsc::PlayerState::setPlayerType ( const PlayerType type)
inline

set player type

Parameters
typepointer to the player type instance

◆ setPos()

void rcsc::PlayerState::setPos ( const double  x,
const double  y 
)
inline

set position with seen information

Parameters
xseen x
yseen y

◆ setTeam()

void rcsc::PlayerState::setTeam ( const SideID  side,
const int  unum,
const bool  goalie 
)
inline

set team data with seen information

Parameters
sideside ID
unumuniform number
goaliegoalie flag

◆ setVel()

void rcsc::PlayerState::setVel ( const double  vx,
const double  vy 
)
inline

set velocity with seen information

Parameters
vxseen velocity x
vyseen velocity y

◆ side()

SideID rcsc::PlayerState::side ( ) const
inline

get side info

Returns
side ID

◆ unum()

int rcsc::PlayerState::unum ( ) const
inline

get player's uniform number

Returns
uniform number

◆ vel()

const Vector2D & rcsc::PlayerState::vel ( ) const
inline

get player's velocity

Returns
const reference to the velocity variable

The documentation for this class was generated from the following file: