|
Thunderbots Project
|
#include <field_pitch_division.h>
Public Member Functions | |
| virtual const Rectangle & | getZone (ZoneEnum zone_id) const =0 |
| virtual ZoneEnum | getZoneId (const Point &position) const =0 |
| virtual const std::vector< ZoneEnum > & | getAllZoneIds () const =0 |
A FieldPitchDivision is abstraction around how we split up the field.
Pitch divisions with zones outside of the field may lead to undefined behaviour. Overlapping zones are supported, but not recommended.
|
pure virtual |
Returns all the zone enums in this field pitch division
Implemented in EighteenZonePitchDivision.
|
pure virtual |
Given a zone id, return the rectangular region on the field the zone id corresponds to. It is up to the implementation to define the mapping between the zone_id and the corresponding region.
NOTE: Since most soccer pitch divisions are indexed starting at 1, we define zone 0 to be the entire field.
| zone_id | The zone id |
Implemented in EighteenZonePitchDivision.
|
pure virtual |
Given a point, returns the Zone Id the point is located in.
| position | The position |
Implemented in EighteenZonePitchDivision.