Class WMOGroupBody
The MOGP container payload, abstract over the client version. Construct a concrete version with WMOGroupBody.for_version(expansion).
public class WMOGroupBody : IDisposable
- Inheritance
-
WMOGroupBody
- Implements
- Derived
- Inherited Members
Constructors
WMOGroupBody()
public WMOGroupBody()
WMOGroupBody(WMOGroupBody)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WMOGroupBody(WMOGroupBody other)
Parameters
otherWMOGroupBody
Properties
Batches
Render batches (MOBA).
public FamilyVector<WMOBatch> Batches { get; }
Property Value
BspFaceIndices
BSP face indices (MOBR).
public Vector<ushort> BspFaceIndices { get; }
Property Value
BspNodes
Collision BSP nodes (MOBN).
public Vector<CAaBspNode> BspNodes { get; }
Property Value
DoodadRefs
Doodad references into the root's MODD (MODR).
public Vector<ushort> DoodadRefs { get; }
Property Value
Header
The group header leading the MOGP payload.
public WMOGroupHeader Header { get; set; }
Property Value
Indices
Triangle vertex indices (MOVI), three per triangle.
public Vector<ushort> Indices { get; }
Property Value
LightRefs
Light references into the root's MOLT (MOLR).
public Vector<ushort> LightRefs { get; }
Property Value
Liquid
Liquid data (MLIQ): a vertex grid and tile-flag grid with a base position and material id.
public MliqData Liquid { get; set; }
Property Value
Normals
Normals (MONR).
public Vector<C3Vector> Normals { get; }
Property Value
Polys
Per-triangle material info (MOPY).
public Vector<SmoPoly> Polys { get; }
Property Value
TransBatchIndices
Triangle-strip indices (MORI).
public Vector<ushort> TransBatchIndices { get; }
Property Value
Vertices
Vertices (MOVT).
public Vector<C3Vector> Vertices { get; }
Property Value
Methods
AppendTexcoordSet(Vector<C2Vector>)
Fill the next free texture-coordinate slot (MOTV).
public void AppendTexcoordSet(Vector<C2Vector> coords)
Parameters
AppendVertexColorLayer(Vector<CImVector>)
Fill the next free vertex-color layer slot (MOCV).
public void AppendVertexColorLayer(Vector<CImVector> colors)
Parameters
ClearTexcoordSets()
Empty every texture-coordinate slot (MOTV).
public void ClearTexcoordSets()
ClearVertexColorLayers()
Empty every vertex-color layer slot (MOCV).
public void ClearVertexColorLayers()
Dispose()
Release the native object now. Optional: the finalizer releases it on
collection anyway - dispose (or using) when you want native memory back
promptly.
public virtual void Dispose()
EnsureValid()
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
public void EnsureValid()
ForVersion(ClientVersion)
A fresh WMOGroupBody for an exact client version — the only axis that can name a Classic client, whose files follow the engine its build was cut on rather than its 1.15 / 4.4 version number.
public static WMOGroupBody ForVersion(ClientVersion version)
Parameters
versionClientVersion
Returns
ForVersion(Expansion)
A fresh WMOGroupBody for the given era, as the family base — the dynamic twin of the typed Era factories.
public static WMOGroupBody ForVersion(Expansion era)
Parameters
eraExpansion
Returns
Read(byte[])
Deserialize file bytes into this entity, replacing its contents. Unmodeled chunks are preserved so an unmodified entity rewrites byte-for-byte.
public void Read(byte[] data)
Parameters
databyte[]
SetTexcoordSet(ulong, Vector<C2Vector>)
Replace one filled texture-coordinate set (MOTV).
public void SetTexcoordSet(ulong set, Vector<C2Vector> coords)
Parameters
SetVertexColorLayer(ulong, Vector<CImVector>)
Replace one filled vertex-color layer (MOCV).
public void SetVertexColorLayer(ulong layer, Vector<CImVector> colors)
Parameters
TexcoordSet(ulong)
One filled texture-coordinate set (MOTV), as a live zero-copy view.
public Vector<C2Vector>? TexcoordSet(ulong set)
Parameters
setulong
Returns
TexcoordSetCount()
The number of filled texture-coordinate sets (MOTV), 0 to 4.
public ulong TexcoordSetCount()
Returns
Validate()
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-chunk counts, index ranges, flag/presence coherence — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
public ValidationReport Validate()
Returns
VertexColorLayer(ulong)
One filled vertex-color layer (MOCV), as a live zero-copy view.
public Vector<CImVector>? VertexColorLayer(ulong layer)
Parameters
layerulong
Returns
VertexColorLayerCount()
The number of filled vertex-color layers (MOCV), 0 to 2.
public ulong VertexColorLayerCount()
Returns
Write()
Serialize this entity.
public byte[] Write()
Returns
- byte[]