Table of Contents

Struct PluginNavigationPosition

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

Where something stands in the world: the cell it occupies plus its position on the global map grid.

public readonly record struct PluginNavigationPosition : IEquatable<PluginNavigationPosition>
Implements
Inherited Members

Constructors

PluginNavigationPosition(uint, double, double, double, float, bool)

Where something stands in the world: the cell it occupies plus its position on the global map grid.

public PluginNavigationPosition(uint CellId, double EastWest, double NorthSouth, double Elevation, float HeadingDegrees, bool IsOutdoor)

Parameters

CellId uint

The packed identifier of the landblock cell the object is in. The high half is the landblock and the low half the cell inside it.

EastWest double

East-west map coordinate, growing eastwards. One unit is 240 meters, the same units the in-game location readout uses.

NorthSouth double

North-south map coordinate, growing northwards, in the same 240-meter units as EastWest.

Elevation double

Height above the cell floor, in the same 240-meter units as the horizontal coordinates; multiply by 240 for meters.

HeadingDegrees float

The direction the object faces, in degrees clockwise from north (0 to 360).

IsOutdoor bool

True when the cell is an outdoor landscape cell; false inside a dungeon or building interior.

Properties

CellId

The packed identifier of the landblock cell the object is in. The high half is the landblock and the low half the cell inside it.

public uint CellId { get; init; }

Property Value

uint

EastWest

East-west map coordinate, growing eastwards. One unit is 240 meters, the same units the in-game location readout uses.

public double EastWest { get; init; }

Property Value

double

Elevation

Height above the cell floor, in the same 240-meter units as the horizontal coordinates; multiply by 240 for meters.

public double Elevation { get; init; }

Property Value

double

HeadingDegrees

The direction the object faces, in degrees clockwise from north (0 to 360).

public float HeadingDegrees { get; init; }

Property Value

float

IsOutdoor

True when the cell is an outdoor landscape cell; false inside a dungeon or building interior.

public bool IsOutdoor { get; init; }

Property Value

bool

NorthSouth

North-south map coordinate, growing northwards, in the same 240-meter units as EastWest.

public double NorthSouth { get; init; }

Property Value

double

Methods

HorizontalDistanceMeters(in PluginNavigationPosition)

The flat ground distance in meters between this position and other, ignoring any difference in elevation.

public double HorizontalDistanceMeters(in PluginNavigationPosition other)

Parameters

other PluginNavigationPosition

The position to measure to.

Returns

double

The distance in meters.