Table of Contents

Class M2CompBone

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

One skeleton bone. Abstract over the client version; construct a concrete version with M2CompBone.ForVersion / for_version.

public class M2CompBone : IDisposable
Inheritance
M2CompBone
Implements
Derived
Inherited Members

Constructors

M2CompBone()

public M2CompBone()

M2CompBone(M2CompBone)

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

public M2CompBone(M2CompBone other)

Parameters

other M2CompBone

Properties

Flags

See BoneFlags.

public BoneFlags Flags { get; set; }

Property Value

BoneFlags

KeyBoneId

Key-bone-lookup back reference, -1 if none.

public int KeyBoneId { get; set; }

Property Value

int

ParentBone

Parent bone index, -1 for roots.

public short ParentBone { get; set; }

Property Value

short

Pivot

The bone's pivot point.

public C3Vector Pivot { get; set; }

Property Value

C3Vector

Scale

Scale keyframes.

public M2TrackC3Vector Scale { get; set; }

Property Value

M2TrackC3Vector

SubmeshId

Mesh part id.

public ushort SubmeshId { get; set; }

Property Value

ushort

Translation

Translation keyframes, relative to the parent bone.

public M2TrackC3Vector Translation { get; set; }

Property Value

M2TrackC3Vector

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.

ForVersion(ClientVersion)

A fresh M2CompBone 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 M2CompBone ForVersion(ClientVersion version)

Parameters

version ClientVersion

Returns

M2CompBone

ForVersion(Expansion)

A fresh M2CompBone for the given era, as the family base — the dynamic twin of the typed Era factories.

public static M2CompBone ForVersion(Expansion era)

Parameters

era Expansion

Returns

M2CompBone

GetHashCode()

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

public override int GetHashCode()

Returns

int

Operators

operator ==(M2CompBone?, M2CompBone?)

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

Parameters

l M2CompBone
r M2CompBone

Returns

bool

operator !=(M2CompBone?, M2CompBone?)

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

Parameters

l M2CompBone
r M2CompBone

Returns

bool