#include <body_sensor.h>
Public メソッド | |
BodySensor () | |
init member variables | |
void | parse (const char *msg, const double &version, const GameTime ¤t) |
analyze server message | |
void | parse1 (const char *msg, const double &version, const GameTime ¤t) |
analyze server message usind very ugly style but very fast | |
void | parse2 (const char *msg, const double &version, const GameTime ¤t) |
analyze server message using std::sscanf. | |
const GameTime & | time () const |
get last updated time | |
const ViewQuality & | viewQuality () const |
get analyzed view quality | |
const ViewWidth & | viewWidth () const |
get analyzed view width | |
const double & | stamina () const |
get analyzed stamina value | |
const double & | effort () const |
get analyzed effort | |
const double & | speedMag () const |
get analyzed speed value | |
const double & | speedDir () const |
get analyzed velocity direction relative to player's face direction | |
const double & | neckDir () const |
get analyzed neck angle | |
int | kickCount () const |
get analyzed kick count | |
int | dashCount () const |
get analyzed kick count | |
int | turnCount () const |
get analyzed turn count | |
int | sayCount () const |
get analyzed say count | |
int | turnNeckCount () const |
get analyzed turn_neck count | |
int | catchCount () const |
get analyzed catch count | |
int | moveCount () const |
get analyzed move count | |
int | changeViewCount () const |
get analyzed change_view count | |
int | armMovable () const |
get analyzed cycles till the arm is movable | |
int | armExpires () const |
get analyzed cycles till the arm stops pointing | |
const double & | pointtoDist () const |
get analyzed distance to the point that player is pointing | |
const double & | pointtoDir () const |
get analyzed direction relative to player's face | |
int | pointtoCount () const |
get analyzed pointto count | |
SideID | attentiontoSide () const |
get analyzed attended player's side | |
int | attentiontoUnum () const |
get analyzed attended player's uniform number | |
int | attentiontoCount () const |
get analyzed attentionto count | |
int | tackleExpires () const |
get analyzed cycles the current tackle will last for | |
int | tackleCount () const |
get analyzed tackle count | |
bool | noneCollided () const |
bool | ballCollided () const |
get the information wheter the agent collides with ball | |
bool | playerCollided () const |
get the information wheter the agent collides with player | |
bool | postCollided () const |
get the information wheter the agent collides with posts | |
std::ostream & | print (std::ostream &os) const |
put data to output stream | |
Public 変数 | |
GameTime | M_time |
updated game time | |
ViewQuality | M_view_quality |
sensed view quality | |
ViewWidth | M_view_width |
sensed view width | |
double | M_stamina |
sensed stamina value | |
double | M_effort |
sensed effort value | |
double | M_speed_mag |
sensed speed magnitude. this is quantized by 0.01. | |
double | M_speed_dir_relative |
speed dir. this is relative to face angle. | |
double | M_neck_relative |
neck angle. this is relative to body angle | |
int | M_kick_count |
sensed command count | |
int | M_dash_count |
sensed command count | |
int | M_turn_count |
sensed command count | |
int | M_say_count |
sensed command count | |
int | M_turn_neck_count |
sensed command count | |
int | M_catch_count |
sensed command count | |
int | M_move_count |
sensed command count | |
int | M_change_view_count |
sensed command count | |
int | M_arm_movable |
int | M_arm_expires |
double | M_pointto_dist |
double | M_pointto_dir |
int | M_pointto_count |
sensed command count | |
SideID | M_attentionto_side |
attended side | |
int | M_attentionto_unum |
attended player number | |
int | M_attentionto_count |
sensed command count | |
int | M_tackle_expires |
int | M_tackle_count |
sensed command count1 | |
bool | M_none_collided |
true if 'none' collides | |
bool | M_ball_collided |
ball collision info | |
bool | M_player_collided |
player collision info | |
bool | M_post_collided |
post collision info |
void rcsc::BodySensor::parse | ( | const char * | msg, | |
const double & | version, | |||
const GameTime & | current | |||
) | [inline] |
analyze server message
msg | raw server message | |
version | client version | |
current | current game time |
void rcsc::BodySensor::parse1 | ( | const char * | msg, | |
const double & | version, | |||
const GameTime & | current | |||
) |
analyze server message usind very ugly style but very fast
msg | server message | |
version | client version | |
current | current game time |
void rcsc::BodySensor::parse2 | ( | const char * | msg, | |
const double & | version, | |||
const GameTime & | current | |||
) |
analyze server message using std::sscanf.
msg | server message | |
version | client version | |
current | current game time |
const GameTime& rcsc::BodySensor::time | ( | ) | const [inline] |
get last updated time
const ViewQuality& rcsc::BodySensor::viewQuality | ( | ) | const [inline] |
get analyzed view quality
const ViewWidth& rcsc::BodySensor::viewWidth | ( | ) | const [inline] |
get analyzed view width
const double& rcsc::BodySensor::stamina | ( | ) | const [inline] |
get analyzed stamina value
const double& rcsc::BodySensor::effort | ( | ) | const [inline] |
get analyzed effort
const double& rcsc::BodySensor::speedMag | ( | ) | const [inline] |
get analyzed speed value
const double& rcsc::BodySensor::speedDir | ( | ) | const [inline] |
get analyzed velocity direction relative to player's face direction
const double& rcsc::BodySensor::neckDir | ( | ) | const [inline] |
get analyzed neck angle
int rcsc::BodySensor::kickCount | ( | ) | const [inline] |
get analyzed kick count
int rcsc::BodySensor::dashCount | ( | ) | const [inline] |
get analyzed kick count
int rcsc::BodySensor::turnCount | ( | ) | const [inline] |
get analyzed turn count
int rcsc::BodySensor::sayCount | ( | ) | const [inline] |
get analyzed say count
int rcsc::BodySensor::turnNeckCount | ( | ) | const [inline] |
get analyzed turn_neck count
int rcsc::BodySensor::catchCount | ( | ) | const [inline] |
get analyzed catch count
int rcsc::BodySensor::moveCount | ( | ) | const [inline] |
get analyzed move count
int rcsc::BodySensor::changeViewCount | ( | ) | const [inline] |
get analyzed change_view count
int rcsc::BodySensor::armMovable | ( | ) | const [inline] |
get analyzed cycles till the arm is movable
int rcsc::BodySensor::armExpires | ( | ) | const [inline] |
get analyzed cycles till the arm stops pointing
const double& rcsc::BodySensor::pointtoDist | ( | ) | const [inline] |
get analyzed distance to the point that player is pointing
const double& rcsc::BodySensor::pointtoDir | ( | ) | const [inline] |
get analyzed direction relative to player's face
int rcsc::BodySensor::pointtoCount | ( | ) | const [inline] |
get analyzed pointto count
SideID rcsc::BodySensor::attentiontoSide | ( | ) | const [inline] |
get analyzed attended player's side
int rcsc::BodySensor::attentiontoUnum | ( | ) | const [inline] |
get analyzed attended player's uniform number
int rcsc::BodySensor::attentiontoCount | ( | ) | const [inline] |
get analyzed attentionto count
int rcsc::BodySensor::tackleExpires | ( | ) | const [inline] |
get analyzed cycles the current tackle will last for
int rcsc::BodySensor::tackleCount | ( | ) | const [inline] |
get analyzed tackle count
bool rcsc::BodySensor::noneCollided | ( | ) | const [inline] |
get the information wheter the agent receive does not collide.
bool rcsc::BodySensor::ballCollided | ( | ) | const [inline] |
get the information wheter the agent collides with ball
bool rcsc::BodySensor::playerCollided | ( | ) | const [inline] |
get the information wheter the agent collides with player
bool rcsc::BodySensor::postCollided | ( | ) | const [inline] |
get the information wheter the agent collides with posts
std::ostream & rcsc::BodySensor::print | ( | std::ostream & | os | ) | const |
put data to output stream
os | reference to the output stream |
the number of cycles till the arm is movable. if 0, arm is movable now
the number of cycles till the arm stops pointing. if 0, player is not pointing.
the distance of the point the player is pointing to, relative to the player's position, accurate to 10cm
the direction of the point the player is pointing to, relative to the player's face angle, accurate to 0.1 deg.
the number of cycles the current tackle will last for. if 0, player is not tackling.