![]() |
VR-Link C# API Documentation
|
Represents a 3x3 matrix containing 3D rotation and scale with double-precision components. More...
Inheritance diagram for makVrl.Matrix3d:
Collaboration diagram for makVrl.Matrix3d:Public Member Functions | |
| Matrix3d (Vector3d row0, Vector3d row1, Vector3d row2) | |
| Constructs a new instance. | |
| Matrix3d (double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) | |
| Constructs a new instance. | |
| Matrix3d (Matrix4d matrix) | |
| Constructs a new instance. | |
| void | Invert () |
| Converts this instance into its inverse. | |
| void | Transpose () |
| Converts this instance into its transpose. | |
| Matrix3d | Normalized () |
| Returns a normalised copy of this instance. | |
| void | Normalize () |
| Divides each element in the Matrix by the Determinant. | |
| Matrix3d | Inverted () |
| Returns an inverted copy of this instance. | |
| Matrix3d | ClearScale () |
| Returns a copy of this Matrix3 without scale. | |
| Matrix3d | ClearRotation () |
| Returns a copy of this Matrix3 without rotation. | |
| Vector3d | ExtractScale () |
| Returns the scale component of this instance. | |
| Quaterniond | 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 (Matrix3d other) |
| Indicates whether the current matrix is equal to another matrix. | |
Static Public Member Functions | |
| static void | CreateFromAxisAngle (Vector3f axis, double angle, out Matrix3d result) |
| Build a rotation matrix from the specified axis/angle rotation. | |
| static Matrix3d | CreateFromAxisAngle (Vector3f axis, double angle) |
| Build a rotation matrix from the specified axis/angle rotation. | |
| static void | CreateFromQuaternion (ref Quaterniond q, out Matrix3d result) |
| Build a rotation matrix from the specified quaternion. | |
| static Matrix3d | CreateFromQuaternion (Quaterniond q) |
| Build a rotation matrix from the specified quaternion. | |
| static void | CreateRotationX (double angle, out Matrix3d result) |
| Builds a rotation matrix for a rotation around the x-axis. | |
| static Matrix3d | CreateRotationX (double angle) |
| Builds a rotation matrix for a rotation around the x-axis. | |
| static void | CreateRotationY (double angle, out Matrix3d result) |
| Builds a rotation matrix for a rotation around the y-axis. | |
| static Matrix3d | CreateRotationY (double angle) |
| Builds a rotation matrix for a rotation around the y-axis. | |
| static void | CreateRotationZ (double angle, out Matrix3d result) |
| Builds a rotation matrix for a rotation around the z-axis. | |
| static Matrix3d | CreateRotationZ (double angle) |
| Builds a rotation matrix for a rotation around the z-axis. | |
| static Matrix3d | CreateScale (double scale) |
| Creates a scale matrix. | |
| static Matrix3d | CreateScale (Vector3d scale) |
| Creates a scale matrix. | |
| static Matrix3d | CreateScale (double x, double y, double z) |
| Creates a scale matrix. | |
| static void | CreateScale (double scale, out Matrix3d result) |
| Creates a scale matrix. | |
| static void | CreateScale (ref Vector3d scale, out Matrix3d result) |
| Creates a scale matrix. | |
| static void | CreateScale (double x, double y, double z, out Matrix3d result) |
| Creates a scale matrix. | |
| static Matrix3d | Add (Matrix3d left, Matrix3d right) |
| Adds two instances. | |
| static void | Add (ref Matrix3d left, ref Matrix3d right, out Matrix3d result) |
| Adds two instances. | |
| static Matrix3d | Subtract (Matrix3d left, Matrix3d right) |
| Subtracts one instance from another. | |
| static void | Subtract (ref Matrix3d left, ref Matrix3d right, out Matrix3d result) |
| Subtracts one instance from another. | |
| static Matrix3d | Mult (Matrix3d left, Matrix3d right) |
| Multiplies two instances. | |
| static void | Mult (ref Matrix3d left, ref Matrix3d right, out Matrix3d result) |
| Multiplies two instances. | |
| static Matrix3d | Mult (ref Matrix3d left, ref double right, out Matrix3d result) |
| static void | Invert (ref Matrix3d mat, out Matrix3d result) |
| Calculate the inverse of the given matrix | |
| static Matrix3d | Invert (Matrix3d mat) |
| Calculate the inverse of the given matrix | |
| static Matrix3d | Transpose (Matrix3d mat) |
| Calculate the transpose of the given matrix | |
| static void | Transpose (ref Matrix3d mat, out Matrix3d result) |
| Calculate the transpose of the given matrix | |
| static Vector3d | PreMultiplyTransform (Vector3d vec, Matrix3d mat) |
| static void | PreMultiplyTransform (ref Vector3d vec, ref Matrix3d mat, out Vector3d result) |
| static Vector3d | PostMultiplyTransform (Vector3d vec, Matrix3d mat) |
| static void | PostMultiplyTransform (ref Vector3d vec, ref Matrix3d mat, out Vector3d result) |
| static Vector3f | PostMultiplyTransform (Vector3f vec, Matrix3d mat) |
| static void | PostMultiplyTransform (ref Vector3f vec, ref Matrix3d mat, out Vector3f result) |
| static Matrix3d | operator* (Matrix3d left, Matrix3d right) |
| Matrix multiplication | |
| static Matrix3d | operator* (Matrix3d left, double right) |
| static Matrix3d | operator+ (Matrix3d left, Matrix3d right) |
| Matrix addition | |
| static Matrix3d | operator- (Matrix3d left, Matrix3d right) |
| Matrix subtraction | |
| static bool | operator== (Matrix3d left, Matrix3d right) |
| Compares two instances for equality. | |
| static bool | operator!= (Matrix3d left, Matrix3d right) |
| Compares two instances for inequality. | |
Public Attributes | |
| Vector3d | Row0 |
| First row of the matrix. | |
| Vector3d | Row1 |
| Second row of the matrix. | |
| Vector3d | Row2 |
| Third row of the matrix. | |
Static Public Attributes | |
| static Matrix3d | Identity = new Matrix3d(Vector3d.UnitX, Vector3d.UnitY, Vector3d.UnitZ) |
| The identity matrix. | |
| static readonly Matrix3d | Zero |
Properties | |
| double | Determinant [get] |
| Gets the determinant of this matrix. | |
| Vector3d | Column0 [get] |
| Gets the first column of this matrix. | |
| Vector3d | Column1 [get] |
| Gets the second column of this matrix. | |
| Vector3d | Column2 [get] |
| Gets the third column of this matrix. | |
| double | M11 [get, set] |
| Gets or sets the value at row 1, column 1 of this instance. | |
| double | M12 [get, set] |
| Gets or sets the value at row 1, column 2 of this instance. | |
| double | M13 [get, set] |
| Gets or sets the value at row 1, column 3 of this instance. | |
| double | M21 [get, set] |
| Gets or sets the value at row 2, column 1 of this instance. | |
| double | M22 [get, set] |
| Gets or sets the value at row 2, column 2 of this instance. | |
| double | M23 [get, set] |
| Gets or sets the value at row 2, column 3 of this instance. | |
| double | M31 [get, set] |
| Gets or sets the value at row 3, column 1 of this instance. | |
| double | M32 [get, set] |
| Gets or sets the value at row 3, column 2 of this instance. | |
| double | M33 [get, set] |
| Gets or sets the value at row 3, column 3 of this instance. | |
| Vector3d | Diagonal [get, set] |
| Gets or sets the values along the main diagonal of the matrix. | |
| double | Trace [get] |
| Gets the trace of the matrix, the sum of the values along the diagonal. | |
| double | 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 with double-precision components.
Constructs a new instance.
| row0 | Top row of the matrix |
| row1 | Second row of the matrix |
| row2 | Bottom row of the matrix |
References makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.Row2.
Referenced by makVrl.Matrix3d.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.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.Row2.
|
inline |
Constructs a new instance.
| matrix | A Matrix4d to take the upper-left 3x3 from. |
References makVrl.Matrix3d.Row0, makVrl.Matrix4d.Row0, makVrl.Matrix3d.Row1, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Matrix3d.Row2, and makVrl.Vector4d.Xyz.
Adds two instances.
| left | The left operand of the addition. |
| right | The right operand of the addition. |
Referenced by makVrl.Matrix3d.operator+().
|
inlinestatic |
Adds two instances.
| left | The left operand of the addition. |
| right | The right operand of the addition. |
| result | A new instance that is the result of the addition. |
References makVrl.Matrix3d.Row0.
|
inline |
Returns a copy of this Matrix3 without rotation.
References makVrl.Vector3d.Length, makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.Row2.
|
inline |
Returns a copy of this Matrix3 without scale.
References makVrl.Vector3d.Normalized(), makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.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.Matrix3d.CreateFromAxisAngle(), makVrl.Matrix3d.CreateFromQuaternion(), and makVrl.DeadReckoner.deadReckonOrientation().
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.Matrix3d.CreateFromAxisAngle().
|
inlinestatic |
Build a rotation matrix from the specified quaternion.
| q | Quaternion to translate. |
| result | Matrix result. |
References makVrl.Matrix3d.CreateFromAxisAngle().
Referenced by makVrl.Matrix3d.CreateFromQuaternion().
|
inlinestatic |
Build a rotation matrix from the specified quaternion.
| q | Quaternion to translate. |
References makVrl.Matrix3d.CreateFromQuaternion().
|
inlinestatic |
Builds a rotation matrix for a rotation around the x-axis.
| angle | The counter-clockwise angle in radians. |
| result | The resulting Matrix3d instance. |
References makVrl.Matrix3d.Identity, makVrl.Matrix3d.Row1, and makVrl.Vector3d.Y.
Referenced by makVrl.Matrix3d.CreateRotationX().
|
inlinestatic |
Builds a rotation matrix for a rotation around the x-axis.
| angle | The counter-clockwise angle in radians. |
References makVrl.Matrix3d.CreateRotationX().
|
inlinestatic |
Builds a rotation matrix for a rotation around the y-axis.
| angle | The counter-clockwise angle in radians. |
| result | The resulting Matrix3d instance. |
References makVrl.Matrix3d.Identity, makVrl.Matrix3d.Row0, and makVrl.Vector3d.X.
Referenced by makVrl.Matrix3d.CreateRotationY().
|
inlinestatic |
Builds a rotation matrix for a rotation around the y-axis.
| angle | The counter-clockwise angle in radians. |
References makVrl.Matrix3d.CreateRotationY().
|
inlinestatic |
Builds a rotation matrix for a rotation around the z-axis.
| angle | The counter-clockwise angle in radians. |
| result | The resulting Matrix3d instance. |
References makVrl.Matrix3d.Identity, makVrl.Matrix3d.Row0, and makVrl.Vector3d.X.
Referenced by makVrl.Matrix3d.CreateRotationZ().
|
inlinestatic |
Builds a rotation matrix for a rotation around the z-axis.
| angle | The counter-clockwise angle in radians. |
References makVrl.Matrix3d.CreateRotationZ().
|
inlinestatic |
Creates a scale matrix.
| scale | Single scale factor for the x, y, and z axes. |
Referenced by makVrl.Matrix3d.CreateScale().
Creates a scale matrix.
| scale | Scale factors for the x, y, and z axes. |
References makVrl.Matrix3d.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.Matrix3d.CreateScale().
|
inlinestatic |
Creates a scale matrix.
| scale | Single scale factor for the x, y, and z axes. |
| result | A scale matrix. |
References makVrl.Matrix3d.Identity, makVrl.Matrix3d.Row0, and makVrl.Vector3d.X.
Creates a scale matrix.
| scale | Scale factors for the x, y, and z axes. |
| result | A scale matrix. |
References makVrl.Matrix3d.Identity, makVrl.Matrix3d.Row0, and makVrl.Vector3d.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.Matrix3d.Identity, makVrl.Matrix3d.Row0, and makVrl.Vector3d.X.
|
inline |
Indicates whether this instance and a specified object are equal.
| obj | The object to compare to. |
Referenced by makVrl.Matrix3d.operator!=(), and makVrl.Matrix3d.operator==().
|
inline |
Indicates whether the current matrix is equal to another matrix.
| other | A matrix to compare with this matrix. |
References makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.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.Quaterniond.Normalize(), makVrl.Vector3d.Normalized(), makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, makVrl.Matrix3d.Row2, makVrl.Quaterniond.W, makVrl.Quaterniond.X, makVrl.Quaterniond.Y, and makVrl.Quaterniond.Z.
|
inline |
Returns the scale component of this instance.
References makVrl.Vector3d.Length, makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.Row2.
|
inline |
Returns the hashcode for this instance.
References makVrl.Vector3d.GetHashCode(), makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.Row2.
|
inline |
Converts this instance into its inverse.
References makVrl.Matrix3d.Invert().
Referenced by makVrl.Matrix3d.Invert(), and makVrl.Matrix3d.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 Matrix3d is singular. |
Calculate the inverse of the given matrix
| mat | The matrix to invert |
| InvalidOperationException | Thrown if the Matrix4 is singular. |
References makVrl.Matrix3d.Invert().
|
inline |
Returns an inverted copy of this instance.
References makVrl.Matrix3d.Determinant, and makVrl.Matrix3d.Invert().
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
Referenced by makVrl.Matrix3d.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.Matrix3d.Row0, and makVrl.Vector3d.X.
|
inlinestatic |
References makVrl.Matrix3d.Row0, and makVrl.Vector3d.X.
|
inline |
Divides each element in the Matrix by the Determinant.
References makVrl.Matrix3d.Determinant, makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.Row2.
Referenced by makVrl.Matrix3d.Normalized().
|
inline |
Returns a normalised copy of this instance.
References makVrl.Matrix3d.Normalize().
Compares two instances for inequality.
| left | The first instance. |
| right | The second instance. |
References makVrl.Matrix3d.Equals().
Matrix multiplication
| left | left-hand operand |
| right | right-hand operand |
References makVrl.Matrix3d.Mult().
References makVrl.Matrix3d.Mult().
Matrix addition
| left | left-hand operand |
| right | right-hand operand |
References makVrl.Matrix3d.Add().
Matrix subtraction
| left | left-hand operand |
| right | right-hand operand |
References makVrl.Matrix3d.Subtract().
Compares two instances for equality.
| left | The first instance. |
| right | The second instance. |
References makVrl.Matrix3d.Equals().
|
inlinestatic |
References makVrl.Matrix3d.PostMultiplyTransform().
|
inlinestatic |
|
inlinestatic |
Subtracts one instance from another.
| left | The left operand of the subraction. |
| right | The right operand of the subraction. |
Referenced by makVrl.Matrix3d.operator-().
|
inlinestatic |
Subtracts one instance from another.
| left | The left operand of the subraction. |
| right | The right operand of the subraction. |
| result | A new instance that is the result of the subraction. |
References makVrl.Matrix3d.Row0.
|
inline |
Returns a System.String that represents the current Matrix3d.
References makVrl.Matrix3d.Row0, makVrl.Matrix3d.Row1, and makVrl.Matrix3d.Row2.
|
inline |
Converts this instance into its transpose.
References makVrl.Matrix3d.Transpose().
Referenced by makVrl.Smoother.initSmoothOriParams(), makVrl.CoordinateTransform.inverse(), makVrl.TopographicCoord.latlon_to_geocToTopo(), and makVrl.Matrix3d.Transpose().
Calculate the transpose of the given matrix
| mat | The matrix to transpose |
References makVrl.Matrix3d.Column0, makVrl.Matrix3d.Column1, makVrl.Matrix3d.Column2, and makVrl.Matrix3d.Matrix3d().
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.Matrix3d.CreateRotationX(), makVrl.Matrix3d.CreateRotationY(), makVrl.Matrix3d.CreateRotationZ(), makVrl.Matrix3d.CreateScale(), and makVrl.TaitBryan.eulerToEuler().
| Vector3d makVrl.Matrix3d.Row0 |
First row of the matrix.
Referenced by makVrl.Matrix3d.Add(), makVrl.Matrix3d.ClearRotation(), makVrl.Matrix3d.ClearScale(), makVrl.Matrix3d.CreateRotationY(), makVrl.Matrix3d.CreateRotationZ(), makVrl.Matrix3d.CreateScale(), makVrl.Matrix3d.Equals(), makVrl.Matrix3d.ExtractRotation(), makVrl.Matrix3d.ExtractScale(), makVrl.Matrix3d.GetHashCode(), makVrl.Matrix3d.Matrix3d(), makVrl.Matrix3d.Mult(), makVrl.Matrix3d.Normalize(), makVrl.Matrix3d.Subtract(), and makVrl.Matrix3d.ToString().
| Vector3d makVrl.Matrix3d.Row1 |
Second row of the matrix.
Referenced by makVrl.Matrix3d.ClearRotation(), makVrl.Matrix3d.ClearScale(), makVrl.Matrix3d.CreateRotationX(), makVrl.Matrix3d.Equals(), makVrl.Matrix3d.ExtractRotation(), makVrl.Matrix3d.ExtractScale(), makVrl.Matrix3d.GetHashCode(), makVrl.Matrix3d.Matrix3d(), makVrl.Matrix3d.Normalize(), and makVrl.Matrix3d.ToString().
| Vector3d makVrl.Matrix3d.Row2 |
Third row of the matrix.
Referenced by makVrl.Matrix3d.ClearRotation(), makVrl.Matrix3d.ClearScale(), makVrl.Matrix3d.Equals(), makVrl.Matrix3d.ExtractRotation(), makVrl.Matrix3d.ExtractScale(), makVrl.Matrix3d.GetHashCode(), makVrl.Matrix3d.Matrix3d(), makVrl.Matrix3d.Normalize(), and makVrl.Matrix3d.ToString().
|
static |
Referenced by makVrl.Smoother.resetOriSmoother().
|
get |
Gets the first column of this matrix.
Referenced by makVrl.Matrix3d.Transpose().
|
get |
Gets the second column of this matrix.
Referenced by makVrl.Matrix3d.Transpose().
|
get |
Gets the third column of this matrix.
Referenced by makVrl.Matrix3d.Transpose().
|
get |
Gets the determinant of this matrix.
Referenced by makVrl.Matrix3d.Inverted(), and makVrl.Matrix3d.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.