Positioner (Class)

Namespace: Wrld.Space.Positioners

A Positioner represents a single point on the map.

Fields

Name Type Description
OnPositionerPositionChangedDelegate Action This delegate is called when this Positioner’s position is changed or updated.

Methods

bool TryGetECEFLocation (ref DoubleVector3)

Try to get the location of this Positioner, in ECEF space.

Returns: True if the Positioner’s ECEF location could be determined, false otherwise.

Argument Type Description
out_positionerECEFLocation ref DoubleVector3 The ECEF location of this Positioner. The value is only valid if the returned result is true.

bool TryGetScreenPoint (ref Vector3)

Try to get the on-screen position of this Positioner.

Returns: True if the Positioner’s screen point could be determined, false otherwise.

Argument Type Description
out_screenPoint ref Vector3 The screen point of this Positioner. The value is only valid if the returned result is true.

void SetLocation (double, double)

Set the location of this Positioner, at the specified latitude and longitude.

Argument Type Description
latitudeDegrees double The desired latitude, in degrees.
longitudeDegrees double The desired longitude, in degrees.

void SetPosition (LatLong)

Set the location of this Positioner, at the specified latitude and longitude.

Argument Type Description
position LatLong The desired position in LatLong form.

LatLong GetPosition ()

Get the target latitude and longitude of this Positioner. Note: This is not the same as TryGetLatLongAltitude.

Returns: The target position in LatLong form.

void SetElevation (double)

Set the elevation of this Positioner, in meters. The behaviour of this depends on the ElevationMode.

Argument Type Description
elevation double The desired elevation, in meters.

double GetElevation ()

Get the elevation of this Positioner, in meters.

Returns: The elevation of this Positioner, in meters.

void SetElevationMode (ElevationMode)

Set the ElevationMode of this Positioner. See the ElevationMode documentation for more details.

Argument Type Description
elevationMode ElevationMode The desired ElevationMode of this positioner.

ElevationMode GetElevationMode ()

Get the ElevationMode of this Positioner.

Returns: The ElevationMode of this Positioner.

void SetIndoorMap (String, int)

Sets the Indoor Map of this Positioner. If this is unset, the Positioner will be outside instead.

Argument Type Description
indoorMapId String The Indoor Map id string for the desired Indoor Map. See the IndoorMapApi documentation for more details.
indoorMapFloorId int The floor of the Indoor Map that this Positioner should be placed upon.

String GetIndoorMapId ()

Get the Indoor Map Id string of this Positioner.

Returns: The Indoor Map Id, as a string.

int GetIndoorMapFloorId ()

Get the Indoor Map Floor Id of this Positioner.

Returns: The Indoor Map Floor Id of this Positioner.

bool TryGetLatLongAltitude (ref LatLongAltitude)

Try to get the transformed position as a LatLongAltitude of this Positioner. This can be used with SpacesApi.GeographicToWorldPoint to calculate a Vector3 translation for this Positioner. It is recommended to use a GeographicTransform for placing GameObjects on the map, however.

Returns: Whether or not this function was successful.

Argument Type Description
out_latLongAlt ref LatLongAltitude The LatLongAltitude that represents the Positioner’s position with the desired elevation and ElevationMode applied. The value is only valid if this function returns true.

bool IsBehindGlobeHorizon ()

Returns true if the screen projection of this Positioner would appear beyond the horizon for the current viewpoint. For example, when viewing the map zoomed out so that the entire globe is visible, calling this method on a Positioner that is located on the opposite side of the Earth from the camera would return true.

Returns: Whether or not this Positioner is beyond the horizon.

void Discard ()

Destroys the Positioner.

Properties

int Id

Uniquely identifies this object instance.

int Id { get; private set; }