Table of Contents

Class SlVert

Namespace
WoWLib.Formats.ADT.Chunks
Assembly
WoWLib.dll

A legacy liquid vertex (MCLQ, 8 bytes). The first four bytes are flow / depth data for water and ocean or two u16 texture coordinates for magma / slime — the cell's liquid-type flags choose the reading (use as_magma()). The trailing float is the surface height in all readings.

public class SlVert : IDisposable
Inheritance
SlVert
Implements
Inherited Members

Constructors

SlVert()

public SlVert()

SlVert(byte, byte, byte, byte, float)

public SlVert(byte depth, byte flow0, byte flow1, byte filler, float height)

Parameters

depth byte
flow0 byte
flow1 byte
filler byte
height float

SlVert(SlVert)

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

public SlVert(SlVert other)

Parameters

other SlVert

Properties

Depth

Water: depth. Ocean: depth. Magma/slime: low byte of s.

public byte Depth { get; set; }

Property Value

byte

Filler

Filler. Magma/slime: high byte of t.

public byte Filler { get; set; }

Property Value

byte

Flow0

Water: flow0 percent. Ocean: foam. Magma/slime: high byte of s.

public byte Flow0 { get; set; }

Property Value

byte

Flow1

Water: flow1 percent. Ocean: wet. Magma/slime: low byte of t.

public byte Flow1 { get; set; }

Property Value

byte

Height

Liquid surface height at this vertex.

public float Height { get; set; }

Property Value

float

Methods

AsMagma()

Reinterpret this vertex under the magma/slime reading (u16 s, t). A pure byte reinterpretation; use it only for magma/slime cells.

public SmVert AsMagma()

Returns

SmVert

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()

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Reference-identity hash (the C++ type has no hash to mirror).

public override int GetHashCode()

Returns

int

SetMagma(SmVert)

Overwrite this vertex's bytes from a magma/slime reading.

public void SetMagma(SmVert magma)

Parameters

magma SmVert

Operators

operator ==(SlVert?, SlVert?)

public static bool operator ==(SlVert? l, SlVert? r)

Parameters

l SlVert
r SlVert

Returns

bool

operator !=(SlVert?, SlVert?)

public static bool operator !=(SlVert? l, SlVert? r)

Parameters

l SlVert
r SlVert

Returns

bool