クラス rcsc::ActionEffector

manages action effect, command counter [詳細]

#include <action_effector.h>

すべてのメンバ一覧

Public メソッド

 ActionEffector (const PlayerAgent &agent)
 init member variables
 ~ActionEffector ()
 destruct dynamic allocated command objects
void reset ()
 reset all command effect. called just before action decision
void incCommandCount (const PlayerCommand::Type type)
 increment command count
void checkCommandCount (const BodySensor &sense)
 compare internal command count with sensed command count
std::ostream & makeCommand (std::ostream &to)
 make command string and update last action time
const PlayerBodyCommandbodyCommand () const
 get const pointer to the player's body command object
const PlayerTurnNeckCommandturnNeckCommand () const
 get const pointer to the player's turn_neck command object
const PlayerChangeViewCommandchangeViewCommand () const
 get const pointer to the player's change_view command object
const PlayerSayCommandsayCommand () const
 get const pointer to the player's say command object
const PlayerPointtoCommandpointtoCommand () const
 get const pointer to the player's pointto command object
const PlayerAttentiontoCommandattentiontoCommand () const
 get const pointer to the player's attentionto command object
void setKick (const double &power, const AngleDeg &rel_dir)
 create kick command and its effect with kick parameter
void setDash (const double &power)
 create dash command and its effect with dash parameter
void setTurn (const AngleDeg &moment)
 create turn command and its effect with turn parameter
void setCatch ()
 create catch command.
void setMove (const double &x, const double &y)
 create move command and its effect with move parameter
void setTackle (const double &power_or_dir)
 create tackle command and its effect with tackle parameter
void setTurnNeck (const AngleDeg &moment)
 create turn_neck command and its effect with turn_neck parameter
void setChangeView (const ViewWidth &width)
 create change_view command
void addSayMessage (const SayMessage *message)
 create say command add new say message
bool removeSayMessage (const char header)
 remove the registered say message if exist
void setPointto (const double &x, const double &y)
 create pointto command and its effect with pointto parameter
void setPointtoOff ()
 create pointto command by off mode
void setAttentionto (const SideID side, const int unum)
 create attentionto command
void setAttentiontoOff ()
 create attentionto command by off mode
const GameTimelastActionTime () const
 get last command composition time
PlayerCommand::Type lastBodyCommandType () const
 get last perfomed command type to update SelfObject
bool doneTurnNeck () const
 check if turn_neck is performed to update SelfObject
void getKickInfo (Vector2D *accel, Vector2D *accel_err) const
 get estimated kick action effect
void getTurnInfo (double *moment, double *err) const
 get estimated turn action effect
void getDashInfo (Vector2D *accel, double *power) const
 get estimated dash action effect
const Vector2DgetMovePos () const
 get move action effect
const GameTimegetCatchTime () const
 get last time catch action is performed
void getTackleInfo (double *power, double *dir) const
 get tackle action effect
const double & getTurnNeckMoment () const
 get turn_neck action effect
const std::string & getSayMessage () const
 get say action effect
int getSayMessageLength () const
 get the total length of current reserved messages
const std::vector< const SayMessage * > & sayMessageCont () const
 get the reserved say messages
const Vector2DgetPointtoPos () const
 get pointto action effect
AngleDeg queuedNextMyBody () const
 get estimated next body angle using queued action effect
Vector2D queuedNextMyPos () const
 get estimated next position using queued action effect
bool queuedNextBallKickable () const
 check if ball will be kickable in the next cycle
Vector2D queuedNextBallPos () const
 get estimated next ball position using queued action effect
Vector2D queuedNextBallVel () const
 get estimated next ball velocity using queued action effect
AngleDeg queuedNextAngleFromBody (const Vector2D &target) const
 get estimated next angle of target point relative to estimated body angle using queued action effect
ViewWidth queuedNextViewWidth () const
 get next view width using queued action effect


説明

manages action effect, command counter


コンストラクタとデストラクタ

rcsc::ActionEffector::ActionEffector ( const PlayerAgent agent  )  [explicit]

init member variables

引数:
agent const reference to the PlayerAgent instance


関数

void rcsc::ActionEffector::incCommandCount ( const PlayerCommand::Type  type  ) 

increment command count

引数:
type target command type

void rcsc::ActionEffector::checkCommandCount ( const BodySensor sense  ) 

compare internal command count with sensed command count

引数:
sense analyzed sense_body info
This method is called when sense_body received. This method MUST be called before WorldModel update

std::ostream & rcsc::ActionEffector::makeCommand ( std::ostream &  to  ) 

make command string and update last action time

引数:
to reference to the output stream
戻り値:
reference to the output stream
After command string composition, all command objects are deleted.

const PlayerBodyCommand* rcsc::ActionEffector::bodyCommand (  )  const [inline]

get const pointer to the player's body command object

戻り値:
const pointer to the body command object

const PlayerTurnNeckCommand* rcsc::ActionEffector::turnNeckCommand (  )  const [inline]

get const pointer to the player's turn_neck command object

戻り値:
const pointer to the turn_neck command object

const PlayerChangeViewCommand* rcsc::ActionEffector::changeViewCommand (  )  const [inline]

get const pointer to the player's change_view command object

戻り値:
const pointer to the change_view command object

const PlayerSayCommand* rcsc::ActionEffector::sayCommand (  )  const [inline]

get const pointer to the player's say command object

戻り値:
const pointer to the say command object

const PlayerPointtoCommand* rcsc::ActionEffector::pointtoCommand (  )  const [inline]

get const pointer to the player's pointto command object

戻り値:
const pointer to the pointto command object

const PlayerAttentiontoCommand* rcsc::ActionEffector::attentiontoCommand (  )  const [inline]

get const pointer to the player's attentionto command object

戻り値:
const pointer to the attentionto command object

void rcsc::ActionEffector::setKick ( const double &  power,
const AngleDeg rel_dir 
)

create kick command and its effect with kick parameter

引数:
power kick power for command argument
rel_dir kick direction relative to body angle for command argument
power is normalized by server parameter

void rcsc::ActionEffector::setDash ( const double &  power  ) 

create dash command and its effect with dash parameter

引数:
power dash power for command argument
power is normalized by server parameter useless dash power is reduceed automatically.

void rcsc::ActionEffector::setTurn ( const AngleDeg moment  ) 

create turn command and its effect with turn parameter

引数:
moment turn moment that player wants to perform
command argument, moment is calculated using current player's speed and its inertia moment parameter. command argument moment is normalized by server parameter.

void rcsc::ActionEffector::setCatch (  ) 

create catch command.

command argumment, catch direction is calculated in this method. catch direction is calculated using diagonal line direction

void rcsc::ActionEffector::setMove ( const double &  x,
const double &  y 
)

create move command and its effect with move parameter

引数:
x move target point x
y move target point y

void rcsc::ActionEffector::setTackle ( const double &  power_or_dir  ) 

create tackle command and its effect with tackle parameter

引数:
power_or_dir tackle power or directin for command argument
power is normalized by server parameter

void rcsc::ActionEffector::setTurnNeck ( const AngleDeg moment  ) 

create turn_neck command and its effect with turn_neck parameter

引数:
moment turn_neck moment that player wants to perform
command argument moment is normalized by server parameter.

void rcsc::ActionEffector::setChangeView ( const ViewWidth width  ) 

create change_view command

引数:
width view width that player wants.
ViewQuality should not be changed by user

void rcsc::ActionEffector::addSayMessage ( const SayMessage message  ) 

create say command add new say message

引数:
message say message object. this must be a dynamically allocated object.

bool rcsc::ActionEffector::removeSayMessage ( const char  header  ) 

remove the registered say message if exist

引数:
header message header character
戻り値:
true if removed

void rcsc::ActionEffector::setPointto ( const double &  x,
const double &  y 
)

create pointto command and its effect with pointto parameter

引数:
x target point x
y target point y

void rcsc::ActionEffector::setAttentionto ( const SideID  side,
const int  unum 
)

create attentionto command

引数:
side target player's side
unum target player's uniform number

const GameTime& rcsc::ActionEffector::lastActionTime (  )  const [inline]

get last command composition time

戻り値:
const reference to the game time

PlayerCommand::Type rcsc::ActionEffector::lastBodyCommandType (  )  const [inline]

get last perfomed command type to update SelfObject

戻り値:
command type Id

bool rcsc::ActionEffector::doneTurnNeck (  )  const [inline]

check if turn_neck is performed to update SelfObject

戻り値:
true if turn_neck is performed in previous cycle

void rcsc::ActionEffector::getKickInfo ( Vector2D accel,
Vector2D accel_err 
) const [inline]

get estimated kick action effect

引数:
accel variable pointer to store the estimated ball accel
accel_err variable pointer to store the estimated ball accel error

void rcsc::ActionEffector::getTurnInfo ( double *  moment,
double *  err 
) const [inline]

get estimated turn action effect

引数:
moment variable pointer to store the estimated actual turned moment
err variable pointer to store the estimated turned moment error

void rcsc::ActionEffector::getDashInfo ( Vector2D accel,
double *  power 
) const [inline]

get estimated dash action effect

引数:
accel variable pointer to store the estimated dash accel
power variable pointer to store the used dash power

const Vector2D& rcsc::ActionEffector::getMovePos (  )  const [inline]

get move action effect

戻り値:
moved position

const GameTime& rcsc::ActionEffector::getCatchTime (  )  const [inline]

get last time catch action is performed

戻り値:
game time object

void rcsc::ActionEffector::getTackleInfo ( double *  power,
double *  dir 
) const [inline]

get tackle action effect

引数:
power variable pointer to store the used tackle power
dir variable pointer to store the tackle direction

const double& rcsc::ActionEffector::getTurnNeckMoment (  )  const [inline]

get turn_neck action effect

戻り値:
performed turn_neck moment

const std::string& rcsc::ActionEffector::getSayMessage (  )  const [inline]

get say action effect

戻り値:
say message string

int rcsc::ActionEffector::getSayMessageLength (  )  const

get the total length of current reserved messages

戻り値:
the total length of current reserved messages

const std::vector< const SayMessage * >& rcsc::ActionEffector::sayMessageCont (  )  const [inline]

get the reserved say messages

戻り値:
const reference to the say message builder container

const Vector2D& rcsc::ActionEffector::getPointtoPos (  )  const [inline]

get pointto action effect

戻り値:
estimated pointed position

AngleDeg rcsc::ActionEffector::queuedNextMyBody (  )  const

get estimated next body angle using queued action effect

戻り値:
estimated body angle

Vector2D rcsc::ActionEffector::queuedNextMyPos (  )  const

get estimated next position using queued action effect

戻り値:
estimated global position

bool rcsc::ActionEffector::queuedNextBallKickable (  )  const

check if ball will be kickable in the next cycle

戻り値:
true if ball will be kickable

Vector2D rcsc::ActionEffector::queuedNextBallPos (  )  const

get estimated next ball position using queued action effect

戻り値:
estimated ball position

Vector2D rcsc::ActionEffector::queuedNextBallVel (  )  const

get estimated next ball velocity using queued action effect

戻り値:
estimated ball velocity

AngleDeg rcsc::ActionEffector::queuedNextAngleFromBody ( const Vector2D target  )  const

get estimated next angle of target point relative to estimated body angle using queued action effect

戻り値:
angle relative to estimated body angle

ViewWidth rcsc::ActionEffector::queuedNextViewWidth (  )  const

get next view width using queued action effect

戻り値:
queued view width


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:26 2008に生成されました。  doxygen 1.5.0