Table of Contents

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

Matrix3x2

Matrix

This builder's result transformation matrix.

public Matrix3x2 Matrix { get; }

Property Value

Matrix3x2

Methods

Multiply(Matrix3x2, Matrix3x2?)

Appends a matrix to the current matrix.

public MatrixBuilder Multiply(Matrix3x2 matrix, Matrix3x2? inverse = null)

Parameters

matrix Matrix3x2

The 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 float

The 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

rotation float

The amount to rotate by.

centerPoint Vector2

The center point of the rotation.

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 Vector2

The 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

scale Vector2

The amount to scale by.

centerPoint Vector2

The center point of the scaling.

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 float

The 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

scale float

The amount to scale by.

centerPoint Vector2

The center point of the scaling.

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

x float

The amount to scale by on the x-axis.

y float

The amount to scale by on the y-axis.

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 float

The amount to scale by on the x-axis.

y float

The amount to scale by on the y-axis.

centerPoint Vector2

The 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

radiansX float

The angle to skew the X axis by.

radiansY float

The angle to skew the Y axis by.

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 float

The angle to skew the X axis by.

radiansY float

The angle to skew the Y axis by.

centerPoint Vector2

The 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 Vector2

The 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

x float

The amount to translate by on the x-axis.

y float

The amount to translate by on the y-axis.

Returns

MatrixBuilder

This same instance so that methods calls can be chained.