Class M2Batch
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
flagsbytepriorityPlanesbyteshaderIdushortskinSectionIndexushortgeosetIndexushortcolorIndexushortmaterialIndexushortmaterialLayerushorttextureCountushorttextureComboIndexushorttextureCoordComboIndexushorttextureWeightComboIndexushorttextureTransformComboIndexushort
M2Batch(M2Batch)
Copy-construct: a deep copy of other (the C++ copy constructor).
public M2Batch(M2Batch other)
Parameters
otherM2Batch
Properties
ColorIndex
Into the model colors, -1 if none.
public ushort ColorIndex { get; set; }
Property Value
Flags
0x10 static texture, 0x40 transparency quirk, ...
public byte Flags { get; set; }
Property Value
GeosetIndex
BfA+: renamed flags2 (0x2 projected, 0x8 EDGF).
public ushort GeosetIndex { get; set; }
Property Value
MaterialIndex
Into the model materials.
public ushort MaterialIndex { get; set; }
Property Value
MaterialLayer
Capped at 7.
public ushort MaterialLayer { get; set; }
Property Value
PriorityPlane
Draw-order priority plane.
public sbyte PriorityPlane { get; set; }
Property Value
ShaderId
Pre-Cata: 0 on disk, computed at runtime.
public ushort ShaderId { get; set; }
Property Value
SkinSectionIndex
The submesh this batch renders.
public ushort SkinSectionIndex { get; set; }
Property Value
TextureComboIndex
Into the texture lookup.
public ushort TextureComboIndex { get; set; }
Property Value
TextureCoordComboIndex
Into the texture-mapping lookup.
public ushort TextureCoordComboIndex { get; set; }
Property Value
TextureCount
1..4 consecutive lookup entries.
public ushort TextureCount { get; set; }
Property Value
TextureTransformComboIndex
Into the UV-animation lookup.
public ushort TextureTransformComboIndex { get; set; }
Property Value
TextureWeightComboIndex
Into the transparency lookup.
public ushort TextureWeightComboIndex { 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()
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Reference-identity hash (the C++ type has no hash to mirror).
public override int GetHashCode()
Returns
Operators
operator ==(M2Batch?, M2Batch?)
public static bool operator ==(M2Batch? l, M2Batch? r)
Parameters
Returns
operator !=(M2Batch?, M2Batch?)
public static bool operator !=(M2Batch? l, M2Batch? r)