Class PluginDungeonFloorplan
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
One landblock's indoor cells seen from above, worked out from the cell geometry the game data carries: level faces are floor, standing faces are walls, and the doorways between cells are left open. Everything is in the landblock's own frame and in metres: x grows east and y grows north from the landblock's south-west corner, the frame the game's own cell positions use. The plan is built once and never changed, so it is safe to keep and to read from any thread.
public sealed record PluginDungeonFloorplan : IEquatable<PluginDungeonFloorplan>
- Inheritance
-
PluginDungeonFloorplan
- Implements
- Inherited Members
Constructors
PluginDungeonFloorplan(uint, IReadOnlyList<PluginDungeonLayer>, IReadOnlyList<PluginDungeonCell>, Vector3, Vector3)
One landblock's indoor cells seen from above, worked out from the cell geometry the game data carries: level faces are floor, standing faces are walls, and the doorways between cells are left open. Everything is in the landblock's own frame and in metres: x grows east and y grows north from the landblock's south-west corner, the frame the game's own cell positions use. The plan is built once and never changed, so it is safe to keep and to read from any thread.
public PluginDungeonFloorplan(uint LandblockId, IReadOnlyList<PluginDungeonLayer> Layers, IReadOnlyList<PluginDungeonCell> Cells, Vector3 BoundsMin, Vector3 BoundsMax)
Parameters
LandblockIduintThe landblock the plan is of, with a zero low half.
LayersIReadOnlyList<PluginDungeonLayer>The storeys, lowest first.
CellsIReadOnlyList<PluginDungeonCell>Every cell with geometry, in cell id order.
BoundsMinVector3The lowest corner of the box around every cell's geometry, in landblock-local metres.
BoundsMaxVector3The highest corner of that box.
Properties
BoundsMax
The highest corner of that box.
public Vector3 BoundsMax { get; init; }
Property Value
BoundsMin
The lowest corner of the box around every cell's geometry, in landblock-local metres.
public Vector3 BoundsMin { get; init; }
Property Value
Cells
Every cell with geometry, in cell id order.
public IReadOnlyList<PluginDungeonCell> Cells { get; init; }
Property Value
Empty
The plan of nothing: what comes back for a landblock the host does not know, a landblock with no indoor cells, or a host that cannot read the game data.
public static PluginDungeonFloorplan Empty { get; }
Property Value
IsEmpty
True when there is nothing to draw.
public bool IsEmpty { get; }
Property Value
LandblockId
The landblock the plan is of, with a zero low half.
public uint LandblockId { get; init; }
Property Value
Layers
The storeys, lowest first.
public IReadOnlyList<PluginDungeonLayer> Layers { get; init; }
Property Value
Methods
ToLandblockLocal(in PluginNavigationPosition)
A position in the plan's frame: metres east and north of the south-west corner of the position's own landblock, and metres up. Compare its landblock (CellId with a zero low half) with LandblockId before drawing it on this plan.
public static Vector3 ToLandblockLocal(in PluginNavigationPosition position)
Parameters
positionPluginNavigationPositionA position as the navigation surface reports it.