Class MatStack
Stack-based Matrix.
public class MatStack
- Inheritance
-
MatStack
- Inherited Members
- Extension Methods
Properties
Current
Equal to Last.
public Mat4d Current { get; }
Property Value
ID
ID. The ID equals to the count of manipulation.
public int ID { get; }
Property Value
Last
Top matrix.
public Mat4d Last { get; }
Property Value
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
Mat4dmatrix
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
Mat4dthe 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
AxisAngle4daxis angle
Rotate(Vec3d, double)
Rotate the top matrix.
public void Rotate(Vec3d axis, double rad)
Parameters
Scale(double)
Multiply the scale matrix to the top level matrix.
public void Scale(double s)
Parameters
s
doublescale
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
Trans(Vec3d)
Translate the top matrix.
public void Trans(Vec3d v)
Parameters
v
Vec3dtranslation
Trans(double, double, double)
Translate the top matrix.
public void Trans(double x, double y, double z)