Fawkes API
Fawkes Development Version
|
This class acts as a container for lines on a soccer field. More...
#include <>>
Public Member Functions | |
virtual | ~FieldLines () |
Destructor. More... | |
float | get_line_width () const |
Line width getter. More... | |
float | get_field_length () const |
Field length getter. More... | |
float | get_field_width () const |
Field width getter. More... | |
fawkes::cart_coord_2d_t | get_field_offsets () const |
Offset getter. More... | |
const field_circles_t & | get_circles () const |
Get circles. More... | |
const std::string & | get_name () const |
Returns the field name. More... | |
Protected Member Functions | |
FieldLines (std::string field_name, float field_length, float field_width, float line_width) | |
Creates a new FieldLines container. More... | |
virtual void | init ()=0 |
Initializes the field (creates all field lines) More... | |
void | calc_offsets () |
Calculates the field's offsets. More... | |
Protected Attributes | |
std::string | _field_name |
The name of the field. More... | |
float | _line_width |
The width of the field lines. More... | |
float | _field_length |
The total length of the field (actually of the field lines) More... | |
float | _field_width |
The total width of the field (actually of the field lines) More... | |
fawkes::cart_coord_2d_t | _field_offsets |
The center offset (used to draw unsymmetrically fields - usually zero) More... | |
field_circles_t | _field_circles |
A std::list of arcs and/or circles on the field. More... | |
This class acts as a container for lines on a soccer field.
Definition at line 36 of file field_lines.h.
|
virtual |
Destructor.
Definition at line 104 of file field_lines.cpp.
|
protected |
Creates a new FieldLines container.
field_name | The name of the field |
field_length | Length of the soccer field [m] |
field_width | Width of the soccer field [m] |
line_width | Width of a single line [m] |
Definition at line 91 of file field_lines.cpp.
References _field_length, _field_offsets, _field_width, _line_width, and fawkes::cart_coord_2d_struct::x.
Referenced by get_circles().
|
protected |
Calculates the field's offsets.
Definition at line 132 of file field_lines.cpp.
References _field_offsets, fawkes::cart_coord_2d_struct::x, and fawkes::cart_coord_2d_struct::y.
Referenced by firevision::FieldLines6x4::FieldLines6x4(), firevision::FieldLinesCityTower::FieldLinesCityTower(), firevision::FieldLinesCityTowerSeminar::FieldLinesCityTowerSeminar(), and get_circles().
|
inline |
Get circles.
Definition at line 45 of file field_lines.h.
References _field_circles, calc_offsets(), FieldLines(), get_name(), and init().
Referenced by firevision::FieldDrawer::draw_lines().
|
inline |
Field length getter.
Definition at line 42 of file field_lines.h.
References _field_length.
Referenced by firevision::FieldDrawer::draw_field(), firevision::FieldDrawer::draw_line_points(), firevision::FieldDrawer::draw_lines(), and firevision::FieldDrawer::get_scale().
|
inline |
Offset getter.
The field's offset (x,y) is usually zero as the soccer field is symetrically. But in some cases only a part of the field is used and then we need the offset to place the field at the center of a debug image.
Definition at line 44 of file field_lines.h.
References _field_offsets.
Referenced by firevision::FieldDrawer::draw_field(), firevision::FieldDrawer::draw_line_points(), and firevision::FieldDrawer::draw_lines().
|
inline |
Field width getter.
Definition at line 43 of file field_lines.h.
References _field_width.
Referenced by firevision::FieldDrawer::draw_field(), firevision::FieldDrawer::draw_line_points(), firevision::FieldDrawer::draw_lines(), and firevision::FieldDrawer::get_scale().
float firevision::FieldLines::get_line_width | ( | ) | const |
Line width getter.
Definition at line 113 of file field_lines.cpp.
References _line_width.
const std::string & firevision::FieldLines::get_name | ( | void | ) | const |
Returns the field name.
Definition at line 122 of file field_lines.cpp.
References _field_name.
Referenced by get_circles().
|
protectedpure virtual |
Initializes the field (creates all field lines)
Referenced by get_circles().
|
protected |
A std::list of arcs and/or circles on the field.
Definition at line 59 of file field_lines.h.
Referenced by firevision::FieldLines6x4::FieldLines6x4(), firevision::FieldLinesCityTower::FieldLinesCityTower(), firevision::FieldLinesCityTowerSeminar::FieldLinesCityTowerSeminar(), and get_circles().
|
protected |
The total length of the field (actually of the field lines)
Definition at line 56 of file field_lines.h.
Referenced by FieldLines(), and get_field_length().
|
protected |
|
protected |
The center offset (used to draw unsymmetrically fields - usually zero)
Definition at line 58 of file field_lines.h.
Referenced by calc_offsets(), FieldLines(), and get_field_offsets().
|
protected |
The total width of the field (actually of the field lines)
Definition at line 57 of file field_lines.h.
Referenced by FieldLines(), and get_field_width().
|
protected |
The width of the field lines.
Definition at line 55 of file field_lines.h.
Referenced by FieldLines(), and get_line_width().