Create a new zone from a JSON stringified definition.
NB: the y coordinates of the elements in the JSON are in display coordinates so they are inverted in this constructor to be correctly adapted to our coordinate system.
the stringified definition of the array of objects composing the zone
Check if the given coordinates are inside this zone
Invert the current zone, this is the same of Zone.specular, but the change will be performed on the actual zone.
Create a specular zone, may be useful in tracking rules, the result is cached.
a zone that is the specular of the givne one
Create a new ellipse zone in percentage of the field size, the origin (0, 0) is the top left corner kick.
x coordinate of the center
y coordinate of the center
radius on the X axis (field length) in percent
a new zone created with the ellipse
Create a new rectangular zone in percentage of the field size, the origin (0, 0) is the top left corner kick.
x coordinate of the left top corner
y coordinate of the left top corner
width in percent of the field length
height in percent of the field width
a new zone created with the rectangle
A Zone object to be used to find where a given player is