Thunderbots Project
Loading...
Searching...
No Matches
EighteenZonePitchDivision Class Reference
Inheritance diagram for EighteenZonePitchDivision:
Collaboration diagram for EighteenZonePitchDivision:

Public Member Functions

 EighteenZonePitchDivision (const Field &field)
 
const RectanglegetZone (EighteenZoneId zone_id) const override
 
const std::vector< EighteenZoneId > & getAllZoneIds () const override
 
EighteenZoneId getZoneId (const Point &position) const override
 

Constructor & Destructor Documentation

◆ EighteenZonePitchDivision()

EighteenZonePitchDivision ( const Field field)

The field is divided into 18 equally sized rectangles.

Parameters
fieldThe field to divide up into 18 zones (see ascii art above)

Member Function Documentation

◆ getAllZoneIds()

const std::vector< EighteenZoneId > & getAllZoneIds ( ) const
overridevirtual

Returns all the zone enums in this field pitch division

Returns
A vector of all the zone ids

Implements FieldPitchDivision< EighteenZoneId >.

◆ getZone()

const Rectangle & getZone ( EighteenZoneId  zone_id) const
overridevirtual

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.

Parameters
zone_idThe zone id
Returns
The rectangle on the field corresponding to the zone

Implements FieldPitchDivision< EighteenZoneId >.

◆ getZoneId()

EighteenZoneId getZoneId ( const Point position) const
overridevirtual

Given a point, returns the Zone Id the point is located in.

Parameters
positionThe position
Returns
the Zone Id of the zone the position is in

Implements FieldPitchDivision< EighteenZoneId >.


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