Table of Contents

Class M2Vertex

Namespace
WoWLib.Formats.M2.Root.Record
Assembly
WoWLib.dll

An M2 vertex: position, 4-bone weights/indices, normal and two texture coordinate sets.

public class M2Vertex : IDisposable
Inheritance
M2Vertex
Implements
Inherited Members

Constructors

M2Vertex()

public M2Vertex()

M2Vertex(C3Vector, byte[], byte[], C3Vector, FixedArray<C2Vector>)

public M2Vertex(C3Vector pos, byte[] boneWeights, byte[] boneIndices, C3Vector normal, FixedArray<C2Vector> texCoords)

Parameters

pos C3Vector
boneWeights byte[]
boneIndices byte[]
normal C3Vector
texCoords FixedArray<C2Vector>

M2Vertex(M2Vertex)

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

public M2Vertex(M2Vertex other)

Parameters

other M2Vertex

Properties

BoneIndices

The four influencing bone indices.

public FixedArray<byte> BoneIndices { get; set; }

Property Value

FixedArray<byte>

BoneWeights

Influence weights of the four bones; they sum to 255.

public FixedArray<byte> BoneWeights { get; set; }

Property Value

FixedArray<byte>

Normal

Normal in model space.

public C3Vector Normal { get; set; }

Property Value

C3Vector

Pos

Position in model space.

public C3Vector Pos { get; set; }

Property Value

C3Vector

TexCoords

Two UV sets; the shader picks which are used.

public FixedArray<C2Vector> TexCoords { get; set; }

Property Value

FixedArray<C2Vector>

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 ==(M2Vertex?, M2Vertex?)

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

Parameters

l M2Vertex
r M2Vertex

Returns

bool

operator !=(M2Vertex?, M2Vertex?)

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

Parameters

l M2Vertex
r M2Vertex

Returns

bool