Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

Matrix2D

struct in Unity.VectorGraphics

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A 2x3 transformation matrix used for 2D operations.

Static Properties

Property Description
identityReturns the identity matrix (read-only).
zeroReturns a matrix with all elements set to zero (read-only).

Properties

Property Description
m00The matrix member at (0,0)
m01The matrix member at (0,1)
m02The matrix member at (0,2)
m10The matrix member at (1,0)
m11The matrix member at (1,1)
m12The matrix member at (1,2)
this[int,int]Access element at [row, column].

Constructors

Constructor Description
Matrix2DInitializes a Matrix2D with column vectors

Public Methods

Method Description
EqualsChecks if two matrices are equal.
GetColumnGets a column of the matrix.
GetHashCodeGets a hashcode of the matrix.
GetRowGets a row of the matrix.
InverseComputes the inverse of the matrix.
MultiplyPointTransforms a position by this matrix (effectively by 2x3).
MultiplyVectorTransforms a direction by this matrix.
SetColumnSets a column of the matrix.
SetRowSets a row of the matrix.
ToStringReturns a string representation of the matrix.

Static Methods

Method Description
RotateLHCreates a left-hand side rotation matrix.
RotateRHCreates a right-hand side rotation matrix.
ScaleCreates a scaling matrix.
SkewXCreates a skew matrix on X.
SkewYCreates a skew matrix on U.
TranslateCreates a translation matrix.

Operators

Operator Description
operator !=Checks if two matrices are not equal.
operator *Multiplies two matrices.
operator ==Checks if two matrices are equal.