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 Current { get; }

Property Value

Mat4d

ID

ID. The ID equals to the count of manipulation.

public int ID { get; }

Property Value

int

Last

Top matrix.

public Mat4d Last { get; }

Property Value

Mat4d

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)

Set the top matrix to mat.

public void Load(Mat4d mat)

Parameters

mat Mat4d

matrix

LoadIdt()

Set the top matrix to identity.

public void LoadIdt()

Mul(Mat4d)

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

public void Mul(Mat4d mat)

Parameters

mat Mat4d

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)

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

public void PushMul(Mat4d mat)

Parameters

mat Mat4d

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, double)

Rotate the top matrix.

public void Rotate(Vec3d axis, double rad)

Parameters

axis Vec3d

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)

Translate the top matrix.

public void Trans(Vec3d v)

Parameters

v Vec3d

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