Represents 3x3 column major matrix. Each cell can be individually accessed as a field (M<row><column>), with indexing indexing property[row, column] or with indexing property[index]. More...
Public Member Functions | |
override Int32 | GetHashCode () |
Calculates the hash code for the current FPMatrix3x3 instance. More... | |
override String | ToString () |
Converts the FPMatrix3x3 to a string representation. The returned string has the format "(({0}, {1}, {2}), ({3}, {4}, {5}), ({6}, {7}, {8}))", where {0} to {8} are the formatted string representations of the matrix elements. More... | |
Static Public Member Functions | |
static FPMatrix3x3 | FromColumns (FP m00, FP m10, FP m20, FP m01, FP m11, FP m21, FP m02, FP m12, FP m22) |
Create from columns - first three values set the first column, second three values - second column etc. More... | |
static FPMatrix3x3 | FromColumns (FPVector3 column0, FPVector3 column1, FPVector3 column2) |
Create from columns - the first vector set the first column, second vector - second column etc. More... | |
static FPMatrix3x3 | FromRows (FP m00, FP m01, FP m02, FP m10, FP m11, FP m12, FP m20, FP m21, FP m22) |
Create from rows - first three values set the first row, second three values - second row etc. More... | |
static FPMatrix3x3 | FromRows (FPVector3 row0, FPVector3 row1, FPVector3 row2) |
Create from rows - the first vector set the first row, second vector - second row etc. More... | |
static FPMatrix3x3 | InverseRotateScale (FPQuaternion q, FPVector3 s) |
Creates an inverse rotation and scaling matrix. This is significantly faster than inverting a RotateScale matrix. Rotation is expected to be normalized. More... | |
static FPMatrix3x3 | operator* (FP a, FPMatrix3x3 m) |
Multiplies a matrix by a factor. More... | |
static FPMatrix3x3 | operator* (FPMatrix3x3 a, FPMatrix3x3 b) |
Multiplies two matrices. More... | |
static FPVector3 | operator* (FPMatrix3x3 m, FPVector3 vector) |
Multiplies a vector by a matrix. More... | |
static FPMatrix3x3 | operator+ (FPMatrix3x3 a, FPMatrix3x3 b) |
Adds two matrices. More... | |
static FPMatrix3x3 | operator- (FPMatrix3x3 a, FPMatrix3x3 b) |
Subtracts two matrices. More... | |
static FPMatrix3x3 | Rotate (FPQuaternion q) |
Creates a rotation matrix. Rotation is expected to be normalized. More... | |
static FPMatrix3x3 | RotateScale (FPQuaternion q, FPVector3 s) |
Creates a rotation and scaling matrix. Rotation is expected to be normalized. More... | |
static FPMatrix3x3 | Scale (FPVector3 scale) |
Creates a scaling matrix. More... | |
static void | Serialize (void *ptr, IDeterministicFrameSerializer serializer) |
Serializes an instance of FPMatrix3x3 using the given IDeterministicFrameSerializer. More... | |
Public Attributes | |
bool | IsIdentity |
Returns true if this matrix is equal to the Identity matrix More... | |
FP | M00 |
First row, first column More... | |
FP | M01 |
First row, second column More... | |
FP | M02 |
First row, third column More... | |
FP | M10 |
Second row, first column More... | |
FP | M11 |
Second row, second column More... | |
FP | M12 |
Second row, third column More... | |
FP | M20 |
Third row, first column More... | |
FP | M21 |
Third row, second column More... | |
FP | M22 |
Third row, third column More... | |
FPMatrix3x3 | Transposed => FromColumns(M00, M01, M02, M10, M11, M12, M20, M21, M22) |
Creates transposed matrix. More... | |
Static Public Attributes | |
const int | SIZE = FP.SIZE * 9 |
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 FPMatrix3x3 | Zero => new FPMatrix3x3() |
Matrix with 0s in every cell. More... | |
Properties | |
FP | Determinant [get] |
Calculates determinant of this matrix. More... | |
static FPMatrix3x3 | Identity [get] |
Matrix with 1s in the main diagonal and 0s in all other cells. More... | |
FPMatrix3x3 | Inverted [get] |
Creates inverted matrix. Matrix with determinant 0 can not be inverted and result with Zero. More... | |
FPVector3 | LossyScale [get] |
Attempts to get a scale value from the matrix. More... | |
FPQuaternion | Rotation [get] |
Attempts to get a rotation quaternion from this matrix. More... | |
FP | this[int index] [get, set] |
Gets or sets cell M<index%4><index/4> More... | |
FP | this[int row, int column] [get, set] |
Gets or sets cell M<row><column>. More... | |
Represents 3x3 column major matrix. Each cell can be individually accessed as a field (M<row><column>), with indexing indexing property[row, column] or with indexing property[index].
|
inlinestatic |
Create from rows - first three values set the first row, second three values - second row etc.
|
inlinestatic |
Create from rows - the first vector set the first row, second vector - second row etc.
|
inlinestatic |
Create from columns - first three values set the first column, second three values - second column etc.
|
inlinestatic |
Create from columns - the first vector set the first column, second vector - second column etc.
|
static |
Creates a scaling matrix.
scale |
|
inlinestatic |
Serializes an instance of FPMatrix3x3 using the given IDeterministicFrameSerializer.
ptr | A pointer to the instance of FPMatrix3x3 to be serialized. |
serializer | The IDeterministicFrameSerializer used for serialization. |
|
inline |
Converts the FPMatrix3x3 to a string representation. The returned string has the format "(({0}, {1}, {2}), ({3}, {4}, {5}), ({6}, {7}, {8}))", where {0} to {8} are the formatted string representations of the matrix elements.
|
inline |
Calculates the hash code for the current FPMatrix3x3 instance.
|
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.
|
inlinestatic |
Creates a rotation matrix. Rotation is expected to be normalized.
|
inlinestatic |
Creates a rotation and scaling matrix. Rotation is expected to be normalized.
|
inlinestatic |
Creates an inverse rotation and scaling matrix. This is significantly faster than inverting a RotateScale matrix. Rotation is expected to be normalized.
|
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.FPMatrix3x3.M00 |
First row, first column
FP Photon.Deterministic.FPMatrix3x3.M10 |
Second row, first column
FP Photon.Deterministic.FPMatrix3x3.M20 |
Third row, first column
FP Photon.Deterministic.FPMatrix3x3.M01 |
First row, second column
FP Photon.Deterministic.FPMatrix3x3.M11 |
Second row, second column
FP Photon.Deterministic.FPMatrix3x3.M21 |
Third row, second column
FP Photon.Deterministic.FPMatrix3x3.M02 |
First row, third column
FP Photon.Deterministic.FPMatrix3x3.M12 |
Second row, third column
FP Photon.Deterministic.FPMatrix3x3.M22 |
Third row, third column
FPMatrix3x3 Photon.Deterministic.FPMatrix3x3.Transposed => FromColumns(M00, M01, M02, M10, M11, M12, M20, M21, M22) |
Creates transposed matrix.
bool Photon.Deterministic.FPMatrix3x3.IsIdentity |
|
staticget |
Matrix with 1s in the main diagonal and 0s in all other cells.
|
getset |
Gets or sets cell M<row><column>.
row | |
column |
|
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.
|
get |
Attempts to get a rotation quaternion from this matrix.