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

player's view area. More...

#include <view_area.h>

Public Member Functions

 ViewArea ()
 construct invalid object
 
 ViewArea (const GameTime &t)
 construct invalid object More...
 
 ViewArea (const double &view_width, const Vector2D &origin, const AngleDeg &angle, const GameTime &t)
 construct with all variables More...
 
const double & viewWidth () const
 get the width of view area More...
 
const Vector2Dorigin () const
 get player's global position when see message is received. More...
 
const AngleDegangle () const
 get player's head angle when see message is received. More...
 
const GameTimetime () const
 get the game time when this information is generated More...
 
bool isValid () const
 check if this object is valid or not More...
 
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 More...
 

Detailed Description

player's view area.

Constructor & Destructor Documentation

◆ ViewArea() [1/2]

rcsc::ViewArea::ViewArea ( const GameTime t)
inlineexplicit

construct invalid object

Parameters
tgame time

◆ ViewArea() [2/2]

rcsc::ViewArea::ViewArea ( const double &  view_width,
const Vector2D origin,
const AngleDeg angle,
const GameTime t 
)
inline

construct with all variables

Parameters
view_widththe width of player's view area
originthe origin point of this view area
anglethe angle from origin point of this view area
ttime of this view area

Member Function Documentation

◆ angle()

const AngleDeg & rcsc::ViewArea::angle ( ) const
inline

get player's head angle when see message is received.

Returns
player's head angle when see message is received.

◆ contains()

bool rcsc::ViewArea::contains ( const Vector2D point,
const double &  dir_thr,
const double &  visible_dist2 
) const
inline

check if point is contained by this view area or not

Parameters
pointchecked point
dir_thrangle threshold value
visible_dist2squared visible distance value

◆ isValid()

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

check if this object is valid or not

Returns
the validity of the object

◆ origin()

const Vector2D & rcsc::ViewArea::origin ( ) const
inline

get player's global position when see message is received.

Returns
origin point (player's global position when see message is received.)

◆ time()

const GameTime & rcsc::ViewArea::time ( ) const
inline

get the game time when this information is generated

Returns
game time

◆ viewWidth()

const double & rcsc::ViewArea::viewWidth ( ) const
inline

get the width of view area

Returns
the width of view area (degree)

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