Table of Contents

Class SmoMaterial

Namespace
WoWLib.Formats.WMO.Root.Chunks
Assembly
WoWLib.dll

One MOMT material, 64 bytes. The layout is stable across v17; what changed in 8.1 is the meaning of the texture fields - MOTX byte offsets before (and in the fallback mode signalled by MOTX's presence), FileDataIDs after.

public class SmoMaterial : IDisposable
Inheritance
SmoMaterial
Implements
Inherited Members

Constructors

SmoMaterial()

public SmoMaterial()

SmoMaterial(MaterialFlags, uint, uint, uint, CImVector, CImVector, uint, CImVector, uint, uint, uint, uint, uint[])

public SmoMaterial(MaterialFlags flags, uint shader, uint blendMode, uint texture1, CImVector sidnColor, CImVector frameSidnColor, uint texture2, CImVector diffColor, uint groundType, uint texture3, uint color2, uint flags2, uint[] runTimeData)

Parameters

flags MaterialFlags
shader uint
blendMode uint
texture1 uint
sidnColor CImVector
frameSidnColor CImVector
texture2 uint
diffColor CImVector
groundType uint
texture3 uint
color2 uint
flags2 uint
runTimeData uint[]

SmoMaterial(SmoMaterial)

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

public SmoMaterial(SmoMaterial other)

Parameters

other SmoMaterial

Properties

BlendMode

Blending mode (EGxBlend).

public uint BlendMode { get; set; }

Property Value

uint

Color2

Extra color slot (a texture FileDataID for shader 23).

public uint Color2 { get; set; }

Property Value

uint

DiffColor

Diffuse color.

public CImVector DiffColor { get; set; }

Property Value

CImVector

Flags

Render flags; MaterialFlags bits.

public MaterialFlags Flags { get; set; }

Property Value

MaterialFlags

Flags2

Extra flags slot (a texture FileDataID for shader 23).

public uint Flags2 { get; set; }

Property Value

uint

FrameSidnColor

Runtime sidn slot; zero on disk.

public CImVector FrameSidnColor { get; set; }

Property Value

CImVector

GroundType

Foreign key into TerrainType.

public uint GroundType { get; set; }

Property Value

uint

RunTimeData

Nulled on load; shader-23 texture FileDataIDs.

public FixedArray<uint> RunTimeData { get; set; }

Property Value

FixedArray<uint>

Shader

Index into the client's WMO shader table.

public uint Shader { get; set; }

Property Value

uint

SidnColor

Self-illuminated (night glow) color.

public CImVector SidnColor { get; set; }

Property Value

CImVector

Texture1

First texture: MOTX offset or FileDataID.

public uint Texture1 { get; set; }

Property Value

uint

Texture2

Second texture: MOTX offset or FileDataID.

public uint Texture2 { get; set; }

Property Value

uint

Texture3

Third texture: MOTX offset or FileDataID.

public uint Texture3 { 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()