get

operator fun get(tag: String, default: Zone = defaultZone): Zone

Gets a zone by its tag, or returns a default if none are found

Return

A non-null zone with given tag

Parameters

tag

The tag to search by

default

The default value if no zone is found


operator fun get(position: Translation2d, default: Zone = defaultZone): Zone

Gets the zone that the given position is inside. If multiple zones overlap, the first one found will be returned. If the position is not inside a zone, the default will be returned.

Return

The zone the position is inside, or null if it is not inside a zone

Parameters

position

The position on the field

default

The default zone if no zone is found


operator fun get(pose: Pose2d, default: Zone = defaultZone): Zone

Gets the zone that the given position is inside. If multiple zones overlap, the first one found will be returned. If the position is not inside a zone, the default value will be returned.

Return

The zone the position is inside, or null if it is not inside a zone

Parameters

pose

The position on the field

default

The default zone if no zone is found


open operator override fun get(index: Int): Zone