Class Matrix2D
Hierarchy
- Matrix2D
Index
Constructors
constructor
Creates a new matrix
Parameters
m00: number
defines value for (0, 0)
m01: number
defines value for (0, 1)
m10: number
defines value for (1, 0)
m11: number
defines value for (1, 1)
m20: number
defines value for (2, 0)
m21: number
defines value for (2, 1)
Returns Matrix2D
Properties
mSearch playground for m
Gets the internal array of 6 floats used to store matrix data
Methods
determinantSearch playground for determinant
Gets matrix determinant
Returns number
the determinant
from ValuesSearch playground for fromValues
Fills the matrix from direct values
Parameters
m00: number
defines value for (0, 0)
m01: number
defines value for (0, 1)
m10: number
defines value for (1, 0)
m11: number
defines value for (1, 1)
m20: number
defines value for (2, 0)
m21: number
defines value for (2, 1)
Returns Matrix2D
the current modified matrix
invert To RefSearch playground for invertToRef
multiply To RefSearch playground for multiplyToRef
transform CoordinatesSearch playground for transformCoordinates
Static Compose To RefSearch playground for ComposeToRef
Composes a matrix from translation, rotation, scaling and parent matrix and stores it in a target matrix
Parameters
tx: number
defines the x coordinate of the translation
ty: number
defines the y coordinate of the translation
angle: number
defines the rotation angle
scaleX: number
defines the x coordinate of the scaling
scaleY: number
defines the y coordinate of the scaling
parentMatrix: Nullable<Matrix2D>
defines the parent matrix to multiply by (can be null)
result: Matrix2D
defines the target matrix
Returns void
Static IdentitySearch playground for Identity
Creates an identity matrix
Returns Matrix2D
a new matrix
Static Identity To RefSearch playground for IdentityToRef
Creates an identity matrix and stores it in a target matrix
Parameters
result: Matrix2D
defines the target matrix
Returns void
Static Rotation To RefSearch playground for RotationToRef
Creates a rotation matrix and stores it in a target matrix
Parameters
angle: number
defines the rotation angle
result: Matrix2D
defines the target matrix
Returns void
Static Scaling To RefSearch playground for ScalingToRef
Creates a scaling matrix and stores it in a target matrix
Parameters
x: number
defines the x coordinate of the scaling
y: number
defines the y coordinate of the scaling
result: Matrix2D
defines the target matrix
Returns void
Static Translation To RefSearch playground for TranslationToRef
Creates a translation matrix and stores it in a target matrix
Parameters
x: number
defines the x coordinate of the translation
y: number
defines the y coordinate of the translation
result: Matrix2D
defines the target matrix
Returns void
Class used to provide 2D matrix features