Represents 2x2 column major matrix, which can be used for 2D scaling and rotation. Each cell can be individually accessed as a field (M<row><column>). More...
Public Member Functions | |
FPVector2 | MultiplyVector (FPVector2 v) |
Transforms a direction by this matrix. More... | |
Static Public Member Functions | |
static FPMatrix2x2 | FromColumns (FP m00, FP m10, FP m01, FP m11) |
Create from columns - first two values set the first colunn, second two values - second column. More... | |
static FPMatrix2x2 | FromColumns (FPVector2 column0, FPVector2 column1) |
Create from columns - first vector set the first column, second vector set second column. More... | |
static FPMatrix2x2 | FromRows (FP m00, FP m01, FP m10, FP m11) |
Create from columns - first two values set the first row, second two values - second row. More... | |
static FPMatrix2x2 | FromRows (FPVector2 row0, FPVector2 row1) |
Create from rows - first vector set the first row, second vector set the second row. More... | |
static FPMatrix2x2 | operator* (FP a, FPMatrix2x2 m) |
Multiplies a matrix by a factor. More... | |
static FPMatrix2x2 | operator* (FPMatrix2x2 a, FPMatrix2x2 b) |
Multiplies two matrices. More... | |
static FPVector2 | operator* (FPMatrix2x2 m, FPVector2 vector) |
Multiplies a vector by a matrix. More... | |
static FPMatrix2x2 | operator+ (FPMatrix2x2 a, FPMatrix2x2 b) |
Adds two matrices. More... | |
static FPMatrix2x2 | operator- (FPMatrix2x2 a, FPMatrix2x2 b) |
Subtracts two matrices. More... | |
static FPMatrix2x2 | Rotate (FP rotation) |
Creates a rotation matrix. More... | |
static FPMatrix2x2 | Scale (FPVector2 scale) |
Creates a scaling matrix. More... | |
Public Attributes | |
bool | IsIdentity |
Returns true if this matrix is equal to the Identity matrix More... | |
Static Public Attributes | |
static FPMatrix2x2 | Zero => new FPMatrix2x2() |
Matrix with 0s in every cell. More... | |
Properties | |
FP | Determinant [get] |
Calculates determinant of this matrix. More... | |
static FPMatrix2x2 | Identity [get] |
Matrix with 1s in the main diagonal and 0s in all other cells. More... | |
FPMatrix2x2 | Inverted [get] |
Creates inverted matrix. Matrix with determinant 0 can not be inverted and result with Zero. More... | |
FPVector2 | LossyScale [get] |
Attempts to get a scale value from the matrix. More... | |
FP | this[int index] [get, set] |
Gets or sets cell M<index%4><index/4> More... | |
Represents 2x2 column major matrix, which can be used for 2D scaling and rotation. Each cell can be individually accessed as a field (M<row><column>).
|
inlinestatic |
Create from columns - first two values set the first row, second two values - second row.
|
inlinestatic |
Create from rows - first vector set the first row, second vector set the second row.
|
inlinestatic |
Create from columns - first two values set the first colunn, second two values - second column.
|
inlinestatic |
Create from columns - first vector set the first column, second vector set second column.
|
inlinestatic |
Creates a rotation matrix.
rotation | Rotation in radians. |
|
static |
Creates a scaling matrix.
Transforms a direction by this matrix.
|
inlinestatic |
Adds two matrices.
|
inlinestatic |
Subtracts two matrices.
|
inlinestatic |
Multiplies two matrices.
|
inlinestatic |
Multiplies a vector by a matrix.
|
inlinestatic |
Multiplies a matrix by a factor.
|
static |
Matrix with 0s in every cell.
bool Photon.Deterministic.FPMatrix2x2.IsIdentity |
Returns true if this matrix is equal to the Identity matrix
|
staticget |
Matrix with 1s in the main diagonal and 0s in all other cells.
|
getset |
Gets or sets cell M<index%4><index/4>
index |
|
get |
Attempts to get a scale value from the matrix.
|
get |
Creates inverted matrix. Matrix with determinant 0 can not be inverted and result with Zero.
|
get |
Calculates determinant of this matrix.