Class Matrix2D
Hierarchy
- Matrix2D
Index
Constructors
Properties
Methods
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 ToRefSearch playground for invertToRef
multiply ToRefSearch playground for multiplyToRef
transform CoordinatesSearch playground for transformCoordinates
Static Compose ToRefSearch 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 Rotation ToRefSearch 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 ToRefSearch 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 ToRefSearch 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