Struct DCM
- Namespace
- NominalSystems
- Assembly
- NominalSystems.Core.dll
Represents a 3D rotation, also known as a Direction Cosine Matrix (in DCM).
public struct DCM : IEnumerable<double>, IEnumerable
- Implements
Constructors
DCM()
Creates a identity/default DCM.
public DCM()
DCM(in DCM)
Creates a deep-copy from another DCM.
public DCM(in DCM other)
Parameters
other
DCMA DCM to copy.
DCM(in Vector3, in Vector3, in Vector3)
Creates and initializes DCM from direction/unit axes.
public DCM(in Vector3 right, in Vector3 forward, in Vector3 up)
Parameters
right
Vector3A right unit vector/axis.
forward
Vector3A forward unit vector/axis.
up
Vector3A up unit vector/axis.
DCM(in Vector3, in double)
Creates and initializes DCM from axis angle.
public DCM(in Vector3 axis, in double angle)
Parameters
Properties
Forward
A unit vector representing the 3D forward direction.
public readonly Vector3 Forward { get; }
Property Value
Inverse
A DCM representing the inverse of the current rotation.
public readonly DCM Inverse { get; }
Property Value
Right
A unit vector representing the 3D right direction.
public readonly Vector3 Right { get; }
Property Value
Up
A unit vector representing the 3D up direction.
public readonly Vector3 Up { get; }
Property Value
Methods
Equals(object)
public override readonly bool Equals(object obj)
Parameters
obj
object
Returns
Equals(object, in double)
public readonly bool Equals(object obj, in double precision)
Parameters
Returns
GetEnumerator()
public readonly IEnumerator<double> GetEnumerator()
Returns
GetHashCode()
public override readonly int GetHashCode()
Returns
Rotate(in Vector3, in double)
Rotates the DCM at the specified axis angle.
public void Rotate(in Vector3 axis, in double angle)
Parameters
ToString()
public override readonly string ToString()
Returns
ToString(string)
public readonly string ToString(string fmt)
Parameters
fmt
stringA numeric format string.
Returns
Operators
operator *(in DCM, in DCM)
Returns the multiplication of a matrix with another matrix.
public static DCM operator *(in DCM a, in DCM b)
Parameters
Returns
operator *(in DCM, in Vector3)
Returns the multiplication of a matrix with a column vector.
public static Vector3 operator *(in DCM a, in Vector3 b)