Table of Contents

Class M2Texture

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

A texture definition: type 0 references the filename (TXID FileDataIDs replace it in 8.0+); non-zero types are runtime component slots (skin, hair, monster skins, ...).

public class M2Texture : IDisposable
Inheritance
M2Texture
Implements
Inherited Members

Constructors

M2Texture()

public M2Texture()

M2Texture(uint, uint, string)

public M2Texture(uint type, uint flags, string filename)

Parameters

type uint
flags uint
filename string

M2Texture(M2Texture)

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

public M2Texture(M2Texture other)

Parameters

other M2Texture

Properties

Filename

For type 0; the serializer writes the NUL inside the count.

public string Filename { get; set; }

Property Value

string

Flags

0x1 wrap X, 0x2 wrap Y.

public uint Flags { get; set; }

Property Value

uint

Type

0 = filename-referenced, else a component slot.

public uint Type { get; set; }

Property Value

uint

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

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

Parameters

l M2Texture
r M2Texture

Returns

bool

operator !=(M2Texture?, M2Texture?)

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

Parameters

l M2Texture
r M2Texture

Returns

bool