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 | |
override Int32 | GetHashCode () |
Calculates the hash code for the FPMatrix2x2 object. More... | |
FPVector2 | MultiplyVector (FPVector2 v) |
Transforms a direction by this matrix. More... | |
override String | ToString () |
Returns a string representation of the current FPMatrix2x2 object. 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... | |
static unsafe void | Serialize (void *ptr, IDeterministicFrameSerializer serializer) |
Serializes the FPMatrix2x2 instance into a byte stream using the specified serializer. More... | |
Public Attributes | |
bool | IsIdentity |
Returns true if this matrix is equal to the Identity matrix More... | |
FP | M00 |
The value of the element at the first row and first column of a 2x2 matrix. More... | |
FP | M01 |
The value of the element at the first row and second column of a 2x2 matrix. More... | |
FP | M10 |
The value of the element at the second row and second column of a 2x2 matrix. More... | |
FP | M11 |
The value of the element at the second row and first column of a 2x2 matrix. More... | |
Static Public Attributes | |
const int | SIZE = FP.SIZE * 4 |
The size of the struct in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed. More... | |
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 |
Serializes the FPMatrix2x2 instance into a byte stream using the specified serializer.
ptr | A pointer to the FPMatrix2x2 instance. |
serializer | The serializer used to write the data. |
|
inline |
Returns a string representation of the current FPMatrix2x2 object.
|
inline |
Calculates the hash code for the FPMatrix2x2 object.
|
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 |
The size of the struct in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed.
|
static |
Matrix with 0s in every cell.
FP Photon.Deterministic.FPMatrix2x2.M00 |
The value of the element at the first row and first column of a 2x2 matrix.
FP Photon.Deterministic.FPMatrix2x2.M10 |
The value of the element at the second row and second column of a 2x2 matrix.
FP Photon.Deterministic.FPMatrix2x2.M01 |
The value of the element at the first row and second column of a 2x2 matrix.
FP Photon.Deterministic.FPMatrix2x2.M11 |
The value of the element at the second row and first column of a 2x2 matrix.
bool Photon.Deterministic.FPMatrix2x2.IsIdentity |
|
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.