Table of Contents

Class M2Batch

Namespace
WoWLib.Formats.M2.Skin
Assembly
WoWLib.dll

An M2 skin render batch (texture unit): submesh + material + the lookup bases the shaders consume.

public class M2Batch : IDisposable
Inheritance
M2Batch
Implements
Inherited Members

Constructors

M2Batch()

public M2Batch()

M2Batch(byte, sbyte, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort, ushort)

public M2Batch(byte flags, sbyte priorityPlane, ushort shaderId, ushort skinSectionIndex, ushort geosetIndex, ushort colorIndex, ushort materialIndex, ushort materialLayer, ushort textureCount, ushort textureComboIndex, ushort textureCoordComboIndex, ushort textureWeightComboIndex, ushort textureTransformComboIndex)

Parameters

flags byte
priorityPlane sbyte
shaderId ushort
skinSectionIndex ushort
geosetIndex ushort
colorIndex ushort
materialIndex ushort
materialLayer ushort
textureCount ushort
textureComboIndex ushort
textureCoordComboIndex ushort
textureWeightComboIndex ushort
textureTransformComboIndex ushort

M2Batch(M2Batch)

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

public M2Batch(M2Batch other)

Parameters

other M2Batch

Properties

ColorIndex

Into the model colors, -1 if none.

public ushort ColorIndex { get; set; }

Property Value

ushort

Flags

0x10 static texture, 0x40 transparency quirk, ...

public byte Flags { get; set; }

Property Value

byte

GeosetIndex

BfA+: renamed flags2 (0x2 projected, 0x8 EDGF).

public ushort GeosetIndex { get; set; }

Property Value

ushort

MaterialIndex

Into the model materials.

public ushort MaterialIndex { get; set; }

Property Value

ushort

MaterialLayer

Capped at 7.

public ushort MaterialLayer { get; set; }

Property Value

ushort

PriorityPlane

Draw-order priority plane.

public sbyte PriorityPlane { get; set; }

Property Value

sbyte

ShaderId

Pre-Cata: 0 on disk, computed at runtime.

public ushort ShaderId { get; set; }

Property Value

ushort

SkinSectionIndex

The submesh this batch renders.

public ushort SkinSectionIndex { get; set; }

Property Value

ushort

TextureComboIndex

Into the texture lookup.

public ushort TextureComboIndex { get; set; }

Property Value

ushort

TextureCoordComboIndex

Into the texture-mapping lookup.

public ushort TextureCoordComboIndex { get; set; }

Property Value

ushort

TextureCount

1..4 consecutive lookup entries.

public ushort TextureCount { get; set; }

Property Value

ushort

TextureTransformComboIndex

Into the UV-animation lookup.

public ushort TextureTransformComboIndex { get; set; }

Property Value

ushort

TextureWeightComboIndex

Into the transparency lookup.

public ushort TextureWeightComboIndex { get; set; }

Property Value

ushort

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

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

Operators

operator ==(M2Batch?, M2Batch?)

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

Parameters

l M2Batch
r M2Batch

Returns

bool

operator !=(M2Batch?, M2Batch?)

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

Parameters

l M2Batch
r M2Batch

Returns

bool