![]() |
VR-Link C# API Documentation
|
Represents a 3x3 matrix containing 3D rotation and scale. More...
Inheritance diagram for makVrl.Matrix3:
Collaboration diagram for makVrl.Matrix3:Public Member Functions | |
| Matrix3 (Vector3f row0, Vector3f row1, Vector3f row2) | |
| Constructs a new instance. | |
| Matrix3 (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) | |
| Constructs a new instance. | |
| Matrix3 (Matrix4 matrix) | |
| Constructs a new instance. | |
| void | Invert () |
| Converts this instance into its inverse. | |
| void | Transpose () |
| Converts this instance into its transpose. | |
| Matrix3 | Normalized () |
| Returns a normalised copy of this instance. | |
| void | Normalize () |
| Divides each element in the Matrix by the Determinant. | |
| Matrix3 | Inverted () |
| Returns an inverted copy of this instance. | |
| Matrix3 | ClearScale () |
| Returns a copy of this Matrix3 without scale. | |
| Matrix3 | ClearRotation () |
| Returns a copy of this Matrix3 without rotation. | |
| Vector3f | ExtractScale () |
| Returns the scale component of this instance. | |
| Quaternion | ExtractRotation (bool row_normalise=true) |
| Returns the rotation component of this instance. | |
| override string | ToString () |
| Returns a System.String that represents the current Matrix3d. | |
| override int | GetHashCode () |
| Returns the hashcode for this instance. | |
| override bool | Equals (object obj) |
| Indicates whether this instance and a specified object are equal. | |
| bool | Equals (Matrix3 other) |
| Indicates whether the current matrix is equal to another matrix. | |
Static Public Member Functions | |
| static void | CreateFromAxisAngle (Vector3f axis, float angle, out Matrix3 result) |
| Build a rotation matrix from the specified axis/angle rotation. | |
| static Matrix3 | CreateFromAxisAngle (Vector3f axis, float angle) |
| Build a rotation matrix from the specified axis/angle rotation. | |
| static void | CreateFromQuaternion (ref Quaternion q, out Matrix3 result) |
| Build a rotation matrix from the specified quaternion. | |
| static Matrix3 | CreateFromQuaternion (Quaternion q) |
| Build a rotation matrix from the specified quaternion. | |
| static void | CreateRotationX (float angle, out Matrix3 result) |
| Builds a rotation matrix for a rotation around the x-axis. | |
| static Matrix3 | CreateRotationX (float angle) |
| Builds a rotation matrix for a rotation around the x-axis. | |
| static void | CreateRotationY (float angle, out Matrix3 result) |
| Builds a rotation matrix for a rotation around the y-axis. | |
| static Matrix3 | CreateRotationY (float angle) |
| Builds a rotation matrix for a rotation around the y-axis. | |
| static void | CreateRotationZ (float angle, out Matrix3 result) |
| Builds a rotation matrix for a rotation around the z-axis. | |
| static Matrix3 | CreateRotationZ (float angle) |
| Builds a rotation matrix for a rotation around the z-axis. | |
| static Matrix3 | CreateScale (float scale) |
| Creates a scale matrix. | |
| static Matrix3 | CreateScale (Vector3f scale) |
| Creates a scale matrix. | |
| static Matrix3 | CreateScale (float x, float y, float z) |
| Creates a scale matrix. | |
| static void | CreateScale (float scale, out Matrix3 result) |
| Creates a scale matrix. | |
| static void | CreateScale (ref Vector3f scale, out Matrix3 result) |
| Creates a scale matrix. | |
| static void | CreateScale (float x, float y, float z, out Matrix3 result) |
| Creates a scale matrix. | |
| static Matrix3 | Mult (Matrix3 left, Matrix3 right) |
| Multiplies two instances. | |
| static void | Mult (ref Matrix3 left, ref Matrix3 right, out Matrix3 result) |
| Multiplies two instances. | |
| static void | Invert (ref Matrix3 mat, out Matrix3 result) |
| Calculate the inverse of the given matrix | |
| static Matrix3 | Invert (Matrix3 mat) |
| Calculate the inverse of the given matrix | |
| static Matrix3 | Transpose (Matrix3 mat) |
| Calculate the transpose of the given matrix | |
| static void | Transpose (ref Matrix3 mat, out Matrix3 result) |
| Calculate the transpose of the given matrix | |
| static Matrix3 | operator* (Matrix3 left, Matrix3 right) |
| Matrix multiplication | |
| static bool | operator== (Matrix3 left, Matrix3 right) |
| Compares two instances for equality. | |
| static bool | operator!= (Matrix3 left, Matrix3 right) |
| Compares two instances for inequality. | |
Public Attributes | |
| Vector3f | Row0 |
| First row of the matrix. | |
| Vector3f | Row1 |
| Second row of the matrix. | |
| Vector3f | Row2 |
| Third row of the matrix. | |
Static Public Attributes | |
| static readonly Matrix3 | Identity = new Matrix3(Vector3f.UnitX, Vector3f.UnitY, Vector3f.UnitZ) |
| The identity matrix. | |
| static readonly Matrix3 | Zero = new Matrix3(Vector3f.Zero, Vector3f.Zero, Vector3f.Zero) |
| The zero matrix. | |
Properties | |
| float | Determinant [get] |
| Gets the determinant of this matrix. | |
| Vector3f | Column0 [get] |
| Gets the first column of this matrix. | |
| Vector3f | Column1 [get] |
| Gets the second column of this matrix. | |
| Vector3f | Column2 [get] |
| Gets the third column of this matrix. | |
| float | M11 [get, set] |
| Gets or sets the value at row 1, column 1 of this instance. | |
| float | M12 [get, set] |
| Gets or sets the value at row 1, column 2 of this instance. | |
| float | M13 [get, set] |
| Gets or sets the value at row 1, column 3 of this instance. | |
| float | M21 [get, set] |
| Gets or sets the value at row 2, column 1 of this instance. | |
| float | M22 [get, set] |
| Gets or sets the value at row 2, column 2 of this instance. | |
| float | M23 [get, set] |
| Gets or sets the value at row 2, column 3 of this instance. | |
| float | M31 [get, set] |
| Gets or sets the value at row 3, column 1 of this instance. | |
| float | M32 [get, set] |
| Gets or sets the value at row 3, column 2 of this instance. | |
| float | M33 [get, set] |
| Gets or sets the value at row 3, column 3 of this instance. | |
| Vector3f | Diagonal [get, set] |
| Gets or sets the values along the main diagonal of the matrix. | |
| float | Trace [get] |
| Gets the trace of the matrix, the sum of the values along the diagonal. | |
| float | this[int rowIndex, int columnIndex] [get, set] |
| Gets or sets the value at a specified row and column. | |
Represents a 3x3 matrix containing 3D rotation and scale.
Constructs a new instance.
| row0 | Top row of the matrix |
| row1 | Second row of the matrix |
| row2 | Bottom row of the matrix |
References makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
Referenced by makVrl.Matrix3.Transpose().
|
inline |
Constructs a new instance.
| m00 | First item of the first row of the matrix. |
| m01 | Second item of the first row of the matrix. |
| m02 | Third item of the first row of the matrix. |
| m10 | First item of the second row of the matrix. |
| m11 | Second item of the second row of the matrix. |
| m12 | Third item of the second row of the matrix. |
| m20 | First item of the third row of the matrix. |
| m21 | Second item of the third row of the matrix. |
| m22 | Third item of the third row of the matrix. |
References makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
|
inline |
Constructs a new instance.
| matrix | A Matrix4 to take the upper-left 3x3 from. |
References makVrl.Matrix3.Row0, makVrl.Matrix4.Row0, makVrl.Matrix3.Row1, makVrl.Matrix4.Row1, makVrl.Matrix3.Row2, makVrl.Matrix4.Row2, and makVrl.Vector4.Xyz.
|
inline |
Returns a copy of this Matrix3 without rotation.
References makVrl.Vector3f.Length, makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
|
inline |
Returns a copy of this Matrix3 without scale.
References makVrl.Vector3f.Normalized(), makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
|
inlinestatic |
Build a rotation matrix from the specified axis/angle rotation.
| axis | The axis to rotate about. |
| angle | Angle in radians to rotate counter-clockwise (looking in the direction of the given axis). |
| result | A matrix instance. |
References makVrl.Vector3f.Normalize(), makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
Referenced by makVrl.Matrix3.CreateFromAxisAngle(), and makVrl.Matrix3.CreateFromQuaternion().
Build a rotation matrix from the specified axis/angle rotation.
| axis | The axis to rotate about. |
| angle | Angle in radians to rotate counter-clockwise (looking in the direction of the given axis). |
References makVrl.Matrix3.CreateFromAxisAngle().
|
inlinestatic |
Build a rotation matrix from the specified quaternion.
| q | Quaternion to translate. |
| result | Matrix result. |
References makVrl.Matrix3.CreateFromAxisAngle().
Referenced by makVrl.Matrix3.CreateFromQuaternion().
|
inlinestatic |
Build a rotation matrix from the specified quaternion.
| q | Quaternion to translate. |
References makVrl.Matrix3.CreateFromQuaternion().
|
inlinestatic |
Builds a rotation matrix for a rotation around the x-axis.
| angle | The counter-clockwise angle in radians. |
| result | The resulting Matrix3 instance. |
References makVrl.Matrix3.Identity, makVrl.Matrix3.Row1, and makVrl.Vector3f.Y.
Referenced by makVrl.Matrix3.CreateRotationX().
|
inlinestatic |
Builds a rotation matrix for a rotation around the x-axis.
| angle | The counter-clockwise angle in radians. |
References makVrl.Matrix3.CreateRotationX().
|
inlinestatic |
Builds a rotation matrix for a rotation around the y-axis.
| angle | The counter-clockwise angle in radians. |
| result | The resulting Matrix3 instance. |
References makVrl.Matrix3.Identity, makVrl.Matrix3.Row0, and makVrl.Vector3f.X.
Referenced by makVrl.Matrix3.CreateRotationY().
|
inlinestatic |
Builds a rotation matrix for a rotation around the y-axis.
| angle | The counter-clockwise angle in radians. |
References makVrl.Matrix3.CreateRotationY().
|
inlinestatic |
Builds a rotation matrix for a rotation around the z-axis.
| angle | The counter-clockwise angle in radians. |
| result | The resulting Matrix3 instance. |
References makVrl.Matrix3.Identity, makVrl.Matrix3.Row0, and makVrl.Vector3f.X.
Referenced by makVrl.Matrix3.CreateRotationZ().
|
inlinestatic |
Builds a rotation matrix for a rotation around the z-axis.
| angle | The counter-clockwise angle in radians. |
References makVrl.Matrix3.CreateRotationZ().
|
inlinestatic |
Creates a scale matrix.
| scale | Single scale factor for the x, y, and z axes. |
Referenced by makVrl.Matrix3.CreateScale().
Creates a scale matrix.
| scale | Scale factors for the x, y, and z axes. |
References makVrl.Matrix3.CreateScale().
|
inlinestatic |
Creates a scale matrix.
| x | Scale factor for the x axis. |
| y | Scale factor for the y axis. |
| z | Scale factor for the z axis. |
References makVrl.Matrix3.CreateScale().
|
inlinestatic |
Creates a scale matrix.
| scale | Single scale factor for the x, y, and z axes. |
| result | A scale matrix. |
References makVrl.Matrix3.Identity, makVrl.Matrix3.Row0, and makVrl.Vector3f.X.
Creates a scale matrix.
| scale | Scale factors for the x, y, and z axes. |
| result | A scale matrix. |
References makVrl.Matrix3.Identity, makVrl.Matrix3.Row0, and makVrl.Vector3f.X.
|
inlinestatic |
Creates a scale matrix.
| x | Scale factor for the x axis. |
| y | Scale factor for the y axis. |
| z | Scale factor for the z axis. |
| result | A scale matrix. |
References makVrl.Matrix3.Identity, makVrl.Matrix3.Row0, and makVrl.Vector3f.X.
|
inline |
Indicates whether this instance and a specified object are equal.
| obj | The object to compare to. |
Referenced by makVrl.Matrix3.operator!=(), and makVrl.Matrix3.operator==().
|
inline |
Indicates whether the current matrix is equal to another matrix.
| other | A matrix to compare with this matrix. |
References makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
|
inline |
Returns the rotation component of this instance.
Quite slow.
| row_normalise | Whether the method should row-normalise (i.e. remove scale from) the Matrix. Pass false if you know it's already normalised. |
References makVrl.Quaternion.Normalize(), makVrl.Vector3f.Normalized(), makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, makVrl.Matrix3.Row2, makVrl.Quaternion.W, makVrl.Quaternion.X, makVrl.Quaternion.Y, and makVrl.Quaternion.Z.
|
inline |
Returns the scale component of this instance.
References makVrl.Vector3f.Length, makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
|
inline |
Returns the hashcode for this instance.
References makVrl.Vector3f.GetHashCode(), makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
|
inline |
Converts this instance into its inverse.
References makVrl.Matrix3.Invert().
Referenced by makVrl.Matrix3.Invert(), and makVrl.Matrix3.Inverted().
Calculate the inverse of the given matrix
| mat | The matrix to invert |
| result | The inverse of the given matrix if it has one, or the input if it is singular |
| InvalidOperationException | Thrown if the Matrix3 is singular. |
Calculate the inverse of the given matrix
| mat | The matrix to invert |
| InvalidOperationException | Thrown if the Matrix4 is singular. |
References makVrl.Matrix3.Invert().
|
inline |
Returns an inverted copy of this instance.
References makVrl.Matrix3.Determinant, and makVrl.Matrix3.Invert().
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
Referenced by makVrl.Matrix3.operator*().
|
inlinestatic |
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
| result | A new instance that is the result of the multiplication |
References makVrl.Matrix3.Row0, and makVrl.Vector3f.X.
|
inline |
Divides each element in the Matrix by the Determinant.
References makVrl.Matrix3.Determinant, makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
Referenced by makVrl.Matrix3.Normalized().
|
inline |
Returns a normalised copy of this instance.
References makVrl.Matrix3.Normalize().
Compares two instances for inequality.
| left | The first instance. |
| right | The second instance. |
References makVrl.Matrix3.Equals().
Matrix multiplication
| left | left-hand operand |
| right | right-hand operand |
References makVrl.Matrix3.Mult().
Compares two instances for equality.
| left | The first instance. |
| right | The second instance. |
References makVrl.Matrix3.Equals().
|
inline |
Returns a System.String that represents the current Matrix3d.
References makVrl.Matrix3.Row0, makVrl.Matrix3.Row1, and makVrl.Matrix3.Row2.
|
inline |
Converts this instance into its transpose.
References makVrl.Matrix3.Transpose().
Referenced by makVrl.Matrix3.Transpose().
Calculate the transpose of the given matrix
| mat | The matrix to transpose |
References makVrl.Matrix3.Column0, makVrl.Matrix3.Column1, makVrl.Matrix3.Column2, and makVrl.Matrix3.Matrix3().
Calculate the transpose of the given matrix
| mat | The matrix to transpose |
| result | The result of the calculation |
|
static |
The identity matrix.
Referenced by makVrl.Matrix3.CreateRotationX(), makVrl.Matrix3.CreateRotationY(), makVrl.Matrix3.CreateRotationZ(), and makVrl.Matrix3.CreateScale().
| Vector3f makVrl.Matrix3.Row0 |
First row of the matrix.
Referenced by makVrl.Matrix3.ClearRotation(), makVrl.Matrix3.ClearScale(), makVrl.Matrix3.CreateRotationY(), makVrl.Matrix3.CreateRotationZ(), makVrl.Matrix3.CreateScale(), makVrl.Matrix3.Equals(), makVrl.Matrix3.ExtractRotation(), makVrl.Matrix3.ExtractScale(), makVrl.Matrix3.GetHashCode(), makVrl.Matrix3.Matrix3(), makVrl.Matrix3.Mult(), makVrl.Matrix3.Normalize(), and makVrl.Matrix3.ToString().
| Vector3f makVrl.Matrix3.Row1 |
Second row of the matrix.
Referenced by makVrl.Matrix3.ClearRotation(), makVrl.Matrix3.ClearScale(), makVrl.Matrix3.CreateRotationX(), makVrl.Matrix3.Equals(), makVrl.Matrix3.ExtractRotation(), makVrl.Matrix3.ExtractScale(), makVrl.Matrix3.GetHashCode(), makVrl.Matrix3.Matrix3(), makVrl.Matrix3.Normalize(), and makVrl.Matrix3.ToString().
| Vector3f makVrl.Matrix3.Row2 |
Third row of the matrix.
Referenced by makVrl.Matrix3.ClearRotation(), makVrl.Matrix3.ClearScale(), makVrl.Matrix3.Equals(), makVrl.Matrix3.ExtractRotation(), makVrl.Matrix3.ExtractScale(), makVrl.Matrix3.GetHashCode(), makVrl.Matrix3.Matrix3(), makVrl.Matrix3.Normalize(), and makVrl.Matrix3.ToString().
|
static |
The zero matrix.
|
get |
Gets the first column of this matrix.
Referenced by makVrl.Matrix3.Transpose().
|
get |
Gets the second column of this matrix.
Referenced by makVrl.Matrix3.Transpose().
|
get |
Gets the third column of this matrix.
Referenced by makVrl.Matrix3.Transpose().
|
get |
Gets the determinant of this matrix.
Referenced by makVrl.Matrix3.Inverted(), and makVrl.Matrix3.Normalize().
|
getset |
Gets or sets the values along the main diagonal of the matrix.
|
getset |
Gets or sets the value at row 1, column 1 of this instance.
|
getset |
Gets or sets the value at row 1, column 2 of this instance.
|
getset |
Gets or sets the value at row 1, column 3 of this instance.
|
getset |
Gets or sets the value at row 2, column 1 of this instance.
|
getset |
Gets or sets the value at row 2, column 2 of this instance.
|
getset |
Gets or sets the value at row 2, column 3 of this instance.
|
getset |
Gets or sets the value at row 3, column 1 of this instance.
|
getset |
Gets or sets the value at row 3, column 2 of this instance.
|
getset |
Gets or sets the value at row 3, column 3 of this instance.
|
getset |
Gets or sets the value at a specified row and column.
|
get |
Gets the trace of the matrix, the sum of the values along the diagonal.