Table of Contents

Class M2Camera

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

One model camera. Abstract over the client version; construct a concrete version with M2Camera.ForVersion / for_version.

public class M2Camera : IDisposable
Inheritance
M2Camera
Implements
Derived
Inherited Members

Constructors

M2Camera()

public M2Camera()

M2Camera(M2Camera)

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

public M2Camera(M2Camera other)

Parameters

other M2Camera

Properties

FarClip

Far clip distance.

public float FarClip { get; set; }

Property Value

float

NearClip

Near clip distance.

public float NearClip { get; set; }

Property Value

float

PositionBase

Pivot point the position splines are relative to.

public C3Vector PositionBase { get; set; }

Property Value

C3Vector

Positions

Spline track moving the camera, one spline per segment.

public M2TrackSplineC3Vector Positions { get; set; }

Property Value

M2TrackSplineC3Vector

Roll

0 .. 2*pi.

public M2TrackSplineFloat Roll { get; set; }

Property Value

M2TrackSplineFloat

TargetPosition

Spline track moving the look-at target, one spline per segment.

public M2TrackSplineC3Vector TargetPosition { get; set; }

Property Value

M2TrackSplineC3Vector

TargetPositionBase

Pivot point the target splines are relative to.

public C3Vector TargetPositionBase { get; set; }

Property Value

C3Vector

Type

0 portrait, 1 character info, -1 flyby.

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.

ForVersion(ClientVersion)

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

Parameters

version ClientVersion

Returns

M2Camera

ForVersion(Expansion)

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

public static M2Camera ForVersion(Expansion era)

Parameters

era Expansion

Returns

M2Camera

GetHashCode()

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

public override int GetHashCode()

Returns

int

Operators

operator ==(M2Camera?, M2Camera?)

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

Parameters

l M2Camera
r M2Camera

Returns

bool

operator !=(M2Camera?, M2Camera?)

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

Parameters

l M2Camera
r M2Camera

Returns

bool