32#ifndef RCSC_PLAYER_VIEW_AREA_H
33#define RCSC_PLAYER_VIEW_AREA_H
61 : M_view_width( -1.0 )
73 : M_view_width( -1.0 )
91 : M_view_width( view_width )
143 return M_view_width > 0.0;
153 const double & dir_thr,
154 const double & visible_dist2 )
const
162 if ( rpos.
r2() < visible_dist2 )
167 return ( rpos.
th() - M_angle ).abs() < M_view_width*0.5 - dir_thr;
degree wrapper class Header File.
degree wrapper class
Definition: angle_deg.h:45
game time object
Definition: game_time.h:43
2D point vector class
Definition: vector_2d.h:46
AngleDeg th() const
get the angle of vector.
Definition: vector_2d.h:192
double r2() const
get the squared length of vector.
Definition: vector_2d.h:137
player's view area.
Definition: view_area.h:48
bool contains(const Vector2D &point, const double &dir_thr, const double &visible_dist2) const
check if point is contained by this view area or not
Definition: view_area.h:152
const GameTime & time() const
get the game time when this information is generated
Definition: view_area.h:132
ViewArea(const GameTime &t)
construct invalid object
Definition: view_area.h:72
const Vector2D & origin() const
get player's global position when see message is received.
Definition: view_area.h:112
ViewArea()
construct invalid object
Definition: view_area.h:60
const AngleDeg & angle() const
get player's head angle when see message is received.
Definition: view_area.h:122
ViewArea(const double &view_width, const Vector2D &origin, const AngleDeg &angle, const GameTime &t)
construct with all variables
Definition: view_area.h:87
const double & viewWidth() const
get the width of view area
Definition: view_area.h:102
bool isValid() const
check if this object is valid or not
Definition: view_area.h:141
game time depending on RCSSServer2D Header File
2d vector class Header File.
std::deque< ViewArea > ViewAreaCont
typedef of the ViewArea container
Definition: view_area.h:172