Table of Contents

Class MatStack

Namespace
Hi.Disp
Assembly
HiDisp.dll

Stack-based Matrix.

public class MatStack
Inheritance
MatStack
Inherited Members
Extension Methods

Properties

Current

Equal to Last.

public mat4d_t Current { get; }

Property Value

mat4d_t

ID

ID. The ID equals to the count of manipulation.

public int ID { get; }

Property Value

int

Last

Top matrix.

public mat4d_t Last { get; }

Property Value

mat4d_t

Methods

~MatStack()

protected ~MatStack()

GenPush()

Generates a disposable object that pushes the matrix stack on creation and pops it on disposal.

public MatStack.ItemDisposable GenPush()

Returns

MatStack.ItemDisposable

A disposable object that manages the push/pop operations.

Load(mat4d_t)

Set the top matrix to mat.

public void Load(mat4d_t mat)

Parameters

mat mat4d_t

matrix

LoadIdt()

Set the top matrix to identity.

public void LoadIdt()

Mul(mat4d_t)

Multiply the matrix to the top level matrix. Which is Last() = mat * Last();

public void Mul(mat4d_t mat)

Parameters

mat mat4d_t

Pop()

Pop top matrix.

public void Pop()
See Also

Push()

Copy and push the top matrix to the stack.

public void Push()
See Also

PushMul(mat4d_t)

Call Push() and then call Mul(mat4d_t) with mat.

public void PushMul(mat4d_t mat)

Parameters

mat mat4d_t

the pushed and multiplied matrix

Reset()

Reset/Clean matrix stack.

public void Reset()

Rotate(AxisAngle4d)

Rotate the top matrix.

public void Rotate(AxisAngle4d aa)

Parameters

aa AxisAngle4d

axis angle

Rotate(vec3d_t, double)

Rotate the top matrix.

public void Rotate(vec3d_t axis, double rad)

Parameters

axis vec3d_t

rotation axis

rad double

angle in radian

Scale(double)

Multiply the scale matrix to the top level matrix.

public void Scale(double s)

Parameters

s double

scale

Scale(double, double, double)

Multiply the scale matrix by three axises to the top level matrix.

public void Scale(double x, double y, double z)

Parameters

x double

x-axis scale

y double

y-axis scale

z double

z-axis scale

Trans(vec3d_t)

Translate the top matrix.

public void Trans(vec3d_t v)

Parameters

v vec3d_t

translation

Trans(double, double, double)

Translate the top matrix.

public void Trans(double x, double y, double z)

Parameters

x double

x

y double

y

z double

z