Struct PluginIndoorCell
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
One indoor cell exactly as the game data authors it: which environment piece it is built from and how that piece is placed in the landblock. It is the raw placement, not a drawing: a plugin that draws dungeons from its own tiles, one per environment piece, places each tile with this.
public readonly record struct PluginIndoorCell : IEquatable<PluginIndoorCell>
- Implements
- Inherited Members
Constructors
PluginIndoorCell(uint, uint, uint, Vector3, Quaternion, bool)
One indoor cell exactly as the game data authors it: which environment piece it is built from and how that piece is placed in the landblock. It is the raw placement, not a drawing: a plugin that draws dungeons from its own tiles, one per environment piece, places each tile with this.
public PluginIndoorCell(uint CellId, uint EnvironmentId, uint CellStructure, Vector3 Origin, Quaternion Orientation, bool SeesOutside)
Parameters
CellIduintThe full cell id, landblock in the high half.
EnvironmentIduintThe environment piece the cell is built from, as the cell stores it: the low sixteen bits of the environment file's id. Zero for a cell that names none.
CellStructureuintWhich of that environment piece's structures the cell uses.
OriginVector3Where the piece's own origin sits, in landblock-local metres (x east and y north from the landblock's south-west corner, z up), exactly as stored.
OrientationQuaternionHow the piece is turned, exactly as stored. The data stores the four components in the order W, X, Y, Z; a piece turned only about the vertical axis by an angle a has W = cos(a/2) and Z = sin(a/2), with a positive a turning east towards north. Identity for a cell that stores no placement.
SeesOutsideboolTrue for a cell that sees the landscape, as a building's rooms do; false for a sealed dungeon's cell, the same answer IsSealedDungeon(uint) gives in reverse.
Properties
CellId
The full cell id, landblock in the high half.
public uint CellId { get; init; }
Property Value
CellStructure
Which of that environment piece's structures the cell uses.
public uint CellStructure { get; init; }
Property Value
EnvironmentId
The environment piece the cell is built from, as the cell stores it: the low sixteen bits of the environment file's id. Zero for a cell that names none.
public uint EnvironmentId { get; init; }
Property Value
Orientation
How the piece is turned, exactly as stored. The data stores the four components in the order W, X, Y, Z; a piece turned only about the vertical axis by an angle a has W = cos(a/2) and Z = sin(a/2), with a positive a turning east towards north. Identity for a cell that stores no placement.
public Quaternion Orientation { get; init; }
Property Value
Origin
Where the piece's own origin sits, in landblock-local metres (x east and y north from the landblock's south-west corner, z up), exactly as stored.
public Vector3 Origin { get; init; }
Property Value
SeesOutside
True for a cell that sees the landscape, as a building's rooms do; false for a sealed dungeon's cell, the same answer IsSealedDungeon(uint) gives in reverse.
public bool SeesOutside { get; init; }
Property Value
YawDegrees
The turn about the vertical axis Orientation describes, in degrees from 0 up to 360, counted from east towards north. For the quarter turns dungeon pieces are laid at this is 0, 90, 180 or 270 to within rounding; a piece also tilted about another axis reads only its turn about the vertical.
public float YawDegrees { get; }