Class MatrixBuilder
- Namespace
- SimulationFramework
- Assembly
- SimulationFramework.dll
Provides a mechanism to compose matrix transformations through chaining.
public class MatrixBuilder
- Inheritance
-
MatrixBuilder
- Inherited Members
Constructors
MatrixBuilder()
Creates a new instance of the MatrixBuilder class.
public MatrixBuilder()
Properties
InverseMatrix
The inverse of this builder's result transformation matrix.
public Matrix3x2 InverseMatrix { get; }
Property Value
Matrix
This builder's result transformation matrix.
public Matrix3x2 Matrix { get; }
Property Value
Methods
Multiply(Matrix3x2, Matrix3x2?)
Appends a matrix to the current matrix.
public MatrixBuilder Multiply(Matrix3x2 matrix, Matrix3x2? inverse = null)
Parameters
matrix
Matrix3x2The matrix to append.
inverse
Matrix3x2?The inverse of the matrix to append. If this value is null, the computed inverse of
matrix
is used.
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Reset()
Resets the current matrix and its inverse to Identity.
public MatrixBuilder Reset()
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Rotate(float)
Appends a rotation matrix to the current matrix.
public MatrixBuilder Rotate(float rotation)
Parameters
rotation
floatThe amount to rotate by.
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Rotate(float, Vector2)
Appends a rotation matrix around a center point to the current matrix.
public MatrixBuilder Rotate(float rotation, Vector2 centerPoint)
Parameters
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Scale(Vector2)
Appends a scaling matrix to the current matrix.
public MatrixBuilder Scale(Vector2 scale)
Parameters
scale
Vector2The amount to scale by.
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Scale(Vector2, Vector2)
Appends a scaling matrix to the current matrix.
public MatrixBuilder Scale(Vector2 scale, Vector2 centerPoint)
Parameters
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Scale(float)
Appends a scaling matrix to the current matrix.
public MatrixBuilder Scale(float scale)
Parameters
scale
floatThe amount to scale by.
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Scale(float, Vector2)
Appends a scaling matrix to the current matrix.
public MatrixBuilder Scale(float scale, Vector2 centerPoint)
Parameters
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Scale(float, float)
Appends a scaling matrix to the current matrix.
public MatrixBuilder Scale(float x, float y)
Parameters
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Scale(float, float, Vector2)
Appends a scaling matrix to the current matrix.
public MatrixBuilder Scale(float x, float y, Vector2 centerPoint)
Parameters
x
floatThe amount to scale by on the x-axis.
y
floatThe amount to scale by on the y-axis.
centerPoint
Vector2The center point of the scaling.
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Skew(float, float)
Appends a skew matrix to the current matrix.
public MatrixBuilder Skew(float radiansX, float radiansY)
Parameters
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Skew(float, float, Vector2)
Appends a skew matrix to the current matrix.
public MatrixBuilder Skew(float radiansX, float radiansY, Vector2 centerPoint)
Parameters
radiansX
floatThe angle to skew the X axis by.
radiansY
floatThe angle to skew the Y axis by.
centerPoint
Vector2The center point of the skew.
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Translate(Vector2)
Appends a translation matrix to the current matrix.
public MatrixBuilder Translate(Vector2 translation)
Parameters
translation
Vector2The amount to translate by.
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.
Translate(float, float)
Appends a translation matrix to the current matrix.
public MatrixBuilder Translate(float x, float y)
Parameters
Returns
- MatrixBuilder
This same instance so that methods calls can be chained.