Struct Matrix2D
A 2x3 transformation matrix used for 2D operations.
Inherited Members
Namespace: Unity.VectorGraphics
Assembly: solution.dll
Syntax
public struct Matrix2D
Constructors
Name | Description |
---|---|
Matrix2D(Vector2, Vector2, Vector2) | Initializes a Matrix2D with column vectors |
Fields
Name | Description |
---|---|
m00 | The matrix member at (0,0) |
m01 | The matrix member at (0,1) |
m02 | The matrix member at (0,2) |
m10 | The matrix member at (1,0) |
m11 | The matrix member at (1,1) |
m12 | The matrix member at (1,2) |
Properties
Name | Description |
---|---|
this[int] | Access element at sequential index (0..5 inclusive). |
this[int, int] | Access element at [row, column]. |
identity | Returns the identity matrix (read-only). |
zero | Returns a matrix with all elements set to zero (read-only). |
Methods
Name | Description |
---|---|
Equals(object) | Checks if two matrices are equal. |
GetColumn(int) | Gets a column of the matrix. |
GetHashCode() | Gets a hashcode of the matrix. |
GetRow(int) | Gets a row of the matrix. |
Inverse() | Computes the inverse of the matrix. |
MultiplyPoint(Vector2) | Transforms a position by this matrix (effectively by 2x3). |
MultiplyVector(Vector2) | Transforms a direction by this matrix. |
RotateLH(float) | Creates a left-hand side rotation matrix. |
RotateRH(float) | Creates a right-hand side rotation matrix. |
Scale(Vector2) | Creates a scaling matrix. |
SetColumn(int, Vector2) | Sets a column of the matrix. |
SetRow(int, Vector3) | Sets a row of the matrix. |
SkewX(float) | Creates a skew matrix on X. |
SkewY(float) | Creates a skew matrix on U. |
ToString() | Returns a string representation of the matrix. |
ToString(string) | Returns a string representation of the matrix using a format. |
Translate(Vector2) | Creates a translation matrix. |
Operators
Name | Description |
---|---|
operator ==(Matrix2D, Matrix2D) | Checks if two matrices are equal. |
operator !=(Matrix2D, Matrix2D) | Checks if two matrices are not equal. |
operator *(Matrix2D, Matrix2D) | Multiplies two matrices. |
operator *(Matrix2D, Vector2) | Transforms a Vector2 by a matrix. |