firevision::FieldLines Class Reference

This class acts as a container for lines on a soccer field. More...

#include <fvutils/draw/field_lines.h>

Inheritance diagram for firevision::FieldLines:

[legend]
List of all members.

Public Member Functions

virtual ~FieldLines ()
 Destructor.
float get_line_width () const
 Line width getter.
float get_field_length () const
 Field length getter.
float get_field_width () const
 Field width getter.
fawkes::cart_coord_2d_t get_field_offsets () const
 Offset getter.
const field_circles_tget_circles () const
 Get circles.
const std::string & get_name () const
 Returns the field name.

Protected Member Functions

 FieldLines (std::string field_name, float field_length, float field_width, float line_width)
 Creates a new FieldLines container.
virtual void init ()=0
 Initializes the field (creates all field lines).
void calc_offsets ()
 Calculates the field's offsets.

Protected Attributes

std::string _field_name
 The name of the field.
float _line_width
 The width of the field lines.
float _field_length
 The total length of the field (actually of the field lines).
float _field_width
 The total width of the field (actually of the field lines).
fawkes::cart_coord_2d_t _field_offsets
 The center offset (used to draw unsymmetrically fields - usually zero).
field_circles_t _field_circles
 A std::list of arcs and/or circles on the field.

Detailed Description

This class acts as a container for lines on a soccer field.

Definition at line 36 of file field_lines.h.


Constructor & Destructor Documentation

firevision::FieldLines::~FieldLines (  )  [virtual]

Destructor.

Definition at line 104 of file field_lines.cpp.

firevision::FieldLines::FieldLines ( std::string  field_name,
float  field_length,
float  field_width,
float  line_width 
) [protected]

Creates a new FieldLines container.

Parameters:
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_t::x.


Member Function Documentation

void firevision::FieldLines::calc_offsets (  )  [protected]

Calculates the field's offsets.

Definition at line 132 of file field_lines.cpp.

References _field_offsets, fawkes::cart_coord_2d_t::x, and fawkes::cart_coord_2d_t::y.

Referenced by firevision::FieldLines6x4::FieldLines6x4(), firevision::FieldLinesCityTower::FieldLinesCityTower(), and firevision::FieldLinesCityTowerSeminar::FieldLinesCityTowerSeminar().

const field_circles_t & firevision::FieldLines::get_circles (  )  const [inline]

Get circles.

Returns:
reference to a std::list of arcs and/or circles on the field
Author:
Christof Rath

Definition at line 45 of file field_lines.h.

Referenced by firevision::FieldDrawer::draw_lines(), and firevision::Field::print().

float firevision::FieldLines::get_field_length (  )  const [inline]

Field length getter.

Returns:
The length of the soccer field

Definition at line 42 of file field_lines.h.

Referenced by firevision::FieldDrawer::draw_field(), firevision::FieldDrawer::draw_line_points(), firevision::FieldDrawer::draw_lines(), firevision::Field::get_field_length(), and firevision::FieldDrawer::get_scale().

cart_coord_2d_t firevision::FieldLines::get_field_offsets (  )  const [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.

Returns:
The offest of the field's center.

Definition at line 44 of file field_lines.h.

Referenced by firevision::FieldDrawer::draw_field(), firevision::FieldDrawer::draw_line_points(), and firevision::FieldDrawer::draw_lines().

float firevision::FieldLines::get_field_width (  )  const [inline]

Field width getter.

Returns:
The width of the soccer field

Definition at line 43 of file field_lines.h.

Referenced by firevision::FieldDrawer::draw_field(), firevision::FieldDrawer::draw_line_points(), firevision::FieldDrawer::draw_lines(), firevision::Field::get_field_width(), and firevision::FieldDrawer::get_scale().

float firevision::FieldLines::get_line_width (  )  const

Line width getter.

Returns:
The width of a single field line

Definition at line 113 of file field_lines.cpp.

References _line_width.

const std::string & firevision::FieldLines::get_name (  )  const

Returns the field name.

Returns:
The field name

Definition at line 122 of file field_lines.cpp.

References _field_name.

void firevision::FieldLines::init (  )  [protected, pure virtual]

Initializes the field (creates all field lines).


Member Data Documentation

field_circles_t firevision::FieldLines::_field_circles [protected]

A std::list of arcs and/or circles on the field.

Definition at line 59 of file field_lines.h.

float firevision::FieldLines::_field_length [protected]

The total length of the field (actually of the field lines).

Definition at line 56 of file field_lines.h.

Referenced by FieldLines().

float firevision::FieldLines::_field_name [protected]

The name of the field.

Definition at line 54 of file field_lines.h.

Referenced by get_name().

fawkes::cart_coord_2d_t firevision::FieldLines::_field_offsets [protected]

The center offset (used to draw unsymmetrically fields - usually zero).

Definition at line 58 of file field_lines.h.

Referenced by calc_offsets(), and FieldLines().

float firevision::FieldLines::_field_width [protected]

The total width of the field (actually of the field lines).

Definition at line 57 of file field_lines.h.

Referenced by FieldLines().

float firevision::FieldLines::_line_width [protected]

The width of the field lines.

Definition at line 55 of file field_lines.h.

Referenced by FieldLines(), and get_line_width().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:31:44 2011 for Fawkes API by  doxygen 1.4.7