Class: MapSystemUtils
Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:6
Utility methods related to MapSystem.
Constructors
Constructor
new MapSystemUtils():
MapSystemUtils
Returns
MapSystemUtils
Methods
nominalToTrueRelativeX()
static
nominalToTrueRelativeX(nominalRelX
,width
,deadZone
):number
Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:16
Converts a nominal relative projected x coordinate to a true relative projected x coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.
Parameters
Parameter | Type | Description |
---|---|---|
nominalRelX | number | A nominal relative projected x coordinate. |
width | number | The width of the map's projected window, in pixels. |
deadZone | ReadonlyFloat64Array | The map's dead zone, as [left, top, right, bottom] in pixels. |
Returns
number
The true relative projected x coordinate that is equivalent to the specified nominal coordinate.
nominalToTrueRelativeXY()
static
nominalToTrueRelativeXY(nominal
,size
,deadZone
,out
):Float64Array
Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:43
Converts nominal relative projected coordinates to true relative projected coordinates. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.
Parameters
Parameter | Type | Description |
---|---|---|
nominal | ReadonlyFloat64Array | Nominal relative projected coordinates. |
size | ReadonlyFloat64Array | The size of the map's projected window, as [width, height] in pixels. |
deadZone | ReadonlyFloat64Array | The map's dead zone, as [left, top, right, bottom] in pixels. |
out | Float64Array | The vector to which to write the result. |
Returns
Float64Array
The true relative projected coordinates that are equivalent to the specified nominal coordinates.
nominalToTrueRelativeY()
static
nominalToTrueRelativeY(nominalRelY
,height
,deadZone
):number
Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:29
Converts a nominal relative projected y coordinate to a true relative projected y coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.
Parameters
Parameter | Type | Description |
---|---|---|
nominalRelY | number | A nominal relative projected y coordinate. |
height | number | The height of the map's projected window, in pixels. |
deadZone | ReadonlyFloat64Array | The map's dead zone, as [left, top, right, bottom] in pixels. |
Returns
number
The true relative projected y coordinate that is equivalent to the specified nominal coordinate.
trueToNominalRelativeX()
static
trueToNominalRelativeX(trueRelX
,width
,deadZone
):number
Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:65
Converts a true relative projected x coordinate to a nominal relative projected x coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.
Parameters
Parameter | Type | Description |
---|---|---|
trueRelX | number | A true relative projected x coordinate. |
width | number | The width of the map's projected window, in pixels. |
deadZone | ReadonlyFloat64Array | The map's dead zone, as [left, top, right, bottom] in pixels. |
Returns
number
The nominal relative projected x coordinate that is equivalent to the specified true coordinate.
trueToNominalRelativeXY()
static
trueToNominalRelativeXY(nominal
,size
,deadZone
,out
):Float64Array
Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:92
Converts true relative projected coordinates to nominal relative projected coordinates. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.
Parameters
Parameter | Type | Description |
---|---|---|
nominal | ReadonlyFloat64Array | True relative projected coordinates. |
size | ReadonlyFloat64Array | The size of the map's projected window, as [width, height] in pixels. |
deadZone | ReadonlyFloat64Array | The map's dead zone, as [left, top, right, bottom] in pixels. |
out | Float64Array | The vector to which to write the result. |
Returns
Float64Array
The nominal relative projected coordinates that are equivalent to the specified true coordinates.
trueToNominalRelativeY()
static
trueToNominalRelativeY(trueRelY
,height
,deadZone
):number
Defined in: src/sdk/components/mapsystem/MapSystemUtils.ts:78
Converts a true relative projected y coordinate to a nominal relative projected y coordinate. Nominal relative coordinates are expressed relative to the map's projected width and height, excluding dead zones. True relative coordinates are expressed relative to the map's projected width and height, including dead zones.
Parameters
Parameter | Type | Description |
---|---|---|
trueRelY | number | A true relative projected y coordinate. |
height | number | The height of the map's projected window, in pixels. |
deadZone | ReadonlyFloat64Array | The map's dead zone, as [left, top, right, bottom] in pixels. |
Returns
number
The nominal relative projected y coordinate that is equivalent to the specified true coordinate.