Table of Contents

Class WMOGroupBodyShadowlands

Namespace
WoWLib.Formats.WMO.Group
Assembly
WoWLib.dll

The MOGP payload for one client version: the group header and the geometry subchunks (triangles, vertices, normals, batches, BSP, liquid, lights). See https://wowdev.wiki/WMO.

public class WMOGroupBodyShadowlands : WMOGroupBody, IDisposable
Inheritance
WMOGroupBodyShadowlands
Implements
Inherited Members

Constructors

WMOGroupBodyShadowlands()

public WMOGroupBodyShadowlands()

WMOGroupBodyShadowlands(WMOGroupBodyShadowlands)

Copy-construct: a deep copy of other (the C++ copy constructor).

public WMOGroupBodyShadowlands(WMOGroupBodyShadowlands other)

Parameters

other WMOGroupBodyShadowlands

Properties

AmbientColorOverride

Ambient color override (MDAL, MoP+); a single color in practice, replacing the header ambient. wowdev dates it to WoD but flags that unverified — a 5.4.8 corpus sweep found 421 of these, while sampled Cata and WotLK groups carry none.

public Vector<CArgb> AmbientColorOverride { get; }

Property Value

Vector<CArgb>

AmbientVolumeRefs

Ambient volume references (MAVR, 9.0+) into the root's MAVD.

public Vector<ushort> AmbientVolumeRefs { get; }

Property Value

Vector<ushort>

BatchOverrides

Triangle-strip batch overrides (MORB, Cata+); same count as MOBA.

public Vector<RenderBatchOverride> BatchOverrides { get; }

Property Value

Vector<RenderBatchOverride>

Batches

Render batches (MOBA).

public Vector<WMOBatchLegionPlus> Batches { get; }

Property Value

Vector<WMOBatchLegionPlus>

BoxVolumeRefs

Box volume references (MBVR, 9.0+) into the root's MBVD.

public Vector<ushort> BoxVolumeRefs { get; }

Property Value

Vector<ushort>

BspFaceIndices

BSP face indices (MOBR).

public Vector<ushort> BspFaceIndices { get; }

Property Value

Vector<ushort>

BspNodes

Collision BSP nodes (MOBN).

public Vector<CAaBspNode> BspNodes { get; }

Property Value

Vector<CAaBspNode>

DoodadRefs

Doodad references into the root's MODD (MODR).

public Vector<ushort> DoodadRefs { get; }

Property Value

Vector<ushort>

FogVolumeRefs

Fog volume references (MFVR, 9.0+) into the root's MFOG and MFED.

public Vector<ushort> FogVolumeRefs { get; }

Property Value

Vector<ushort>

Header

The group header leading the MOGP payload.

public WMOGroupHeaderShadowlandsPlus Header { get; set; }

Property Value

WMOGroupHeaderShadowlandsPlus

Indices

Triangle vertex indices (MOVI), three per triangle.

public Vector<ushort> Indices { get; }

Property Value

Vector<ushort>

LargeIndices

32-bit triangle vertex indices (MOVX, ~9.0+; the large-mesh MOVI replacement).

public Vector<uint> LargeIndices { get; }

Property Value

Vector<uint>

LightRefs

Light references into the root's MOLT (MOLR).

public Vector<ushort> LightRefs { get; }

Property Value

Vector<ushort>

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

MliqData

NewLightRefs

New-light references (MNLR, 9.0+) into the root's MNLD.

public Vector<ushort> NewLightRefs { get; }

Property Value

Vector<ushort>

Normals

Normals (MONR).

public Vector<C3Vector> Normals { get; }

Property Value

Vector<C3Vector>

ParticulateRefs

Particulate volume references (MPVR, 8.3+) into the root's MPVD.

public Vector<ushort> ParticulateRefs { get; }

Property Value

Vector<ushort>

PointLightAnimSets

Point-light animation sets (MLSK, 8.1+): (first, count) ranges into MOP2.

public Vector<LightSet> PointLightAnimSets { get; }

Property Value

Vector<LightSet>

PointLightAnims

Animated point lights (MOP2, 8.1+).

public Vector<PointLightAnim> PointLightAnims { get; }

Property Value

Vector<PointLightAnim>

PointLightSets

Point-light sets (MLSP, 8.1+): (first, count) ranges into MOLP per doodad set.

public Vector<LightSet> PointLightSets { get; }

Property Value

Vector<LightSet>

PointLights

Point lights (MOLP, Legion+).

public Vector<PointLight> PointLights { get; }

Property Value

Vector<PointLight>

Polys

Per-triangle material info (MOPY).

public Vector<SmoPoly> Polys { get; }

Property Value

Vector<SmoPoly>

PrepassBatches

Prepass batches (MOPB, Legion+); undocumented 24-byte records, kept opaque.

public ChunkBlob PrepassBatches { get; set; }

Property Value

ChunkBlob

ShadowBatches

Shadow batches (MOBS, Cata+).

public Vector<ShadowBatch> ShadowBatches { get; }

Property Value

Vector<ShadowBatch>

SpotLightSets

Spot-light sets (MLSS, 8.1+): (first, count) ranges into MOLS per doodad set.

public Vector<LightSet> SpotLightSets { get; }

Property Value

Vector<LightSet>

SpotLights

Spot lights (MOLS, Legion+); undocumented 56-byte records, kept opaque.

public ChunkBlob SpotLights { get; set; }

Property Value

ChunkBlob

Tangents

Tangent arrays (MOTA, Cata+); offset-based layout, kept opaque.

public ChunkBlob Tangents { get; set; }

Property Value

ChunkBlob

TerrainCutPlanes

Terrain-cutting planes (MOPL, WoD+); requires the can_cut_terrain flag, at most 32.

public Vector<C4Plane> TerrainCutPlanes { get; }

Property Value

Vector<C4Plane>

TransBatchIndices

Triangle-strip indices (MORI).

public Vector<ushort> TransBatchIndices { get; }

Property Value

Vector<ushort>

Vertices

Vertices (MOVT).

public Vector<C3Vector> Vertices { get; }

Property Value

Vector<C3Vector>

Methods

AppendTexcoordSet(Vector<C2Vector>)

Fill the next free texture-coordinate slot (MOTV).

public void AppendTexcoordSet(Vector<C2Vector> coords)

Parameters

coords Vector<C2Vector>

the coordinates, one per vertex

AppendVertexColorLayer(Vector<CImVector>)

Fill the next free vertex-color layer slot (MOCV).

public void AppendVertexColorLayer(Vector<CImVector> colors)

Parameters

colors Vector<CImVector>

the colors, one per vertex

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 override void Dispose()

EnsureValid()

Validate and raise on the first error instead of returning a report — the assert-style face of validate().

public void EnsureValid()

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

data byte[]

the file bytes

SetTexcoordSet(ulong, Vector<C2Vector>)

Replace one filled texture-coordinate set (MOTV).

public void SetTexcoordSet(ulong set, Vector<C2Vector> coords)

Parameters

set ulong

the filled-set index

coords Vector<C2Vector>

the coordinates, one per vertex

SetVertexColorLayer(ulong, Vector<CImVector>)

Replace one filled vertex-color layer (MOCV).

public void SetVertexColorLayer(ulong layer, Vector<CImVector> colors)

Parameters

layer ulong

the filled-layer index

colors Vector<CImVector>

the colors, one per vertex

TexcoordSet(ulong)

One filled texture-coordinate set (MOTV), as a live zero-copy view.

public Vector<C2Vector>? TexcoordSet(ulong set)

Parameters

set ulong

the filled-set index

Returns

Vector<C2Vector>

the set's coordinates, live; None/null when set is out of range

TexcoordSetCount()

The number of filled texture-coordinate sets (MOTV), 0 to 4.

public ulong TexcoordSetCount()

Returns

ulong

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

ValidationReport

every violated contract, in member order

VertexColorLayer(ulong)

One filled vertex-color layer (MOCV), as a live zero-copy view.

public Vector<CImVector>? VertexColorLayer(ulong layer)

Parameters

layer ulong

the filled-layer index

Returns

Vector<CImVector>

the layer's colors, live; None/null when layer is out of range

VertexColorLayerCount()

The number of filled vertex-color layers (MOCV), 0 to 2.

public ulong VertexColorLayerCount()

Returns

ulong

Write()

Serialize this entity.

public byte[] Write()

Returns

byte[]

the file bytes