Table of Contents

Class SmMapObjDef

Namespace
WoWLib.Formats.Common
Assembly
WoWLib.dll

A WMO placement (the 64-byte MODF record of WDT, WDL and ADT): which object, where, and how it is instanced.

public class SmMapObjDef : IDisposable
Inheritance
SmMapObjDef
Implements
Inherited Members

Constructors

SmMapObjDef()

public SmMapObjDef()

SmMapObjDef(uint, uint, C3Vector, C3Vector, CAaBox, MapObjDefFlags, ushort, ushort, ushort)

public SmMapObjDef(uint nameId, uint uniqueId, C3Vector position, C3Vector rotation, CAaBox extents, MapObjDefFlags flags, ushort doodadSet, ushort nameSet, ushort scale)

Parameters

nameId uint
uniqueId uint
position C3Vector
rotation C3Vector
extents CAaBox
flags MapObjDefFlags
doodadSet ushort
nameSet ushort
scale ushort

SmMapObjDef(SmMapObjDef)

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

public SmMapObjDef(SmMapObjDef other)

Parameters

other SmMapObjDef

Properties

DoodadSet

The WMO doodad set shown by this instance (MODS index, or MWDR when use_sets_from_mwds is set).

public ushort DoodadSet { get; set; }

Property Value

ushort

Extents

The transformed object's bounding box (position plus the rotated extents); culling and collision use it.

public CAaBox Extents { get; set; }

Property Value

CAaBox

Flags

Flags; MapObjDefFlags bits.

public MapObjDefFlags Flags { get; set; }

Property Value

MapObjDefFlags

NameId

The object: an MWID/MWMO name-table reference, or a FileDataID when flags has EntryIsFdid (Legion+). The WDT global-WMO record ignores it and uses the MWMO content.

public uint NameId { get; set; }

Property Value

uint

NameSet

The WMO name set (renames the same model per instance).

public ushort NameSet { get; set; }

Property Value

ushort

Position

Position, in the map's placement coordinate system.

public C3Vector Position { get; set; }

Property Value

C3Vector

Rotation

Rotation as Euler angles, degrees.

public C3Vector Rotation { get; set; }

Property Value

C3Vector

Scale

Scale, 1024 = 1.0, engaged by the has_scale flag (Legion+); padding in older clients.

public ushort Scale { get; set; }

Property Value

ushort

UniqueId

Unique instance id across the whole map (WDT global-WMO records leave it unused).

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