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
CellIduintThe packed identifier of the landblock cell the object is in. The high half is the landblock and the low half the cell inside it.
EastWestdoubleEast-west map coordinate, growing eastwards. One unit is 240 meters, the same units the in-game location readout uses.
NorthSouthdoubleNorth-south map coordinate, growing northwards, in the same 240-meter units as
EastWest.ElevationdoubleHeight above the cell floor, in the same 240-meter units as the horizontal coordinates; multiply by 240 for meters.
HeadingDegreesfloatThe direction the object faces, in degrees clockwise from north (0 to 360).
IsOutdoorboolTrue 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
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
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
HeadingDegrees
The direction the object faces, in degrees clockwise from north (0 to 360).
public float HeadingDegrees { get; init; }
Property Value
IsOutdoor
True when the cell is an outdoor landscape cell; false inside a dungeon or building interior.
public bool IsOutdoor { get; init; }
Property Value
NorthSouth
North-south map coordinate, growing northwards, in the same 240-meter units
as EastWest.
public double NorthSouth { get; init; }
Property Value
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
otherPluginNavigationPositionThe position to measure to.
Returns
- double
The distance in meters.