Class WDTOcclusion
A _occ.wdt occlusion satellite (WoD+), abstract over the client version: per-tile low-resolution heightmaps the renderer occludes against. Construct a concrete version with WDTOcclusion.for_version(expansion). See https://wowdev.wiki/WDT.
public class WDTOcclusion : IDisposable
- Inheritance
-
WDTOcclusion
- Implements
- Derived
- Inherited Members
Constructors
WDTOcclusion()
public WDTOcclusion()
WDTOcclusion(WDTOcclusion)
Copy-construct: a deep copy of other (the C++ copy constructor).
public WDTOcclusion(WDTOcclusion other)
Parameters
otherWDTOcclusion
Properties
Heights
The packed heightmap block (MAOH): the tiles' interleaved 17x17 + 16x16 int16 grids back to back, addressed by the index records' offsets (same layout as the WDL MARE payload). Empty for WMO-only maps.
public Vector<short> Heights { get; }
Property Value
Indices
The tile index (MAOI): one record per tile with occlusion data, locating its heightmap inside heights. Empty for WMO-only maps.
public Vector<OcclusionIndex> Indices { get; }
Property Value
Mver
The file format version; 18 like the main WDT.
public uint Mver { get; set; }
Property Value
Methods
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 WDTOcclusion 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 WDTOcclusion ForVersion(ClientVersion version)
Parameters
versionClientVersion
Returns
ForVersion(Expansion)
A fresh WDTOcclusion for the given era, as the family base — the dynamic twin of the typed Era factories.
public static WDTOcclusion 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[]
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
Write()
Serialize this entity.
public byte[] Write()
Returns
- byte[]