Table of Contents

Struct Transform

Namespace
NominalSystems
Assembly
NominalSystems.Core.dll

Represents a 3D cartesian transformation, with a position and rotation.


public struct Transform : IEnumerable<double>, IEnumerable
Implements

Constructors

Transform()

Creates a identity/default transform.

public Transform()

Transform(Transform)

Creates a deep-copy from another transform.

public Transform(Transform other)

Parameters

other Transform

A transform to copy.

Properties

Forward

A unit vector representing the 3D forward direction.

public readonly Vector3 Forward { get; }

Property Value

Vector3

Inverse

A transform representing the inverse of the current rotation and position.

public readonly Transform Inverse { get; }

Property Value

Transform

Position

A vector representing the 3D position of the transform.

public Vector3 Position { readonly get; set; }

Property Value

Vector3

Right

A unit vector representing the 3D right direction.

public readonly Vector3 Right { get; }

Property Value

Vector3

Rotation

A DCM representing the 3D rotation of the transform.

public DCM Rotation { readonly get; set; }

Property Value

DCM

Up

A unit vector representing the 3D up direction.

public readonly Vector3 Up { get; }

Property Value

Vector3

Methods

Equals(object)

public override readonly bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(object, in double)

public readonly bool Equals(object obj, in double precision)

Parameters

obj object

The object to compare.

precision double

The precision error.

Returns

bool

GetEnumerator()

public readonly IEnumerator<double> GetEnumerator()

Returns

IEnumerator<double>

GetHashCode()

public override readonly int GetHashCode()

Returns

int

Rotate(in Vector3, in double)

Rotates the transform at the specified axis angle.

public void Rotate(in Vector3 axis, in double angle)

Parameters

axis Vector3

A unit vector/axis.

angle double

A angle in radians.

ToString()

public override readonly string ToString()

Returns

string

ToString(string)

public readonly string ToString(string fmt)

Parameters

fmt string

A numeric format string.

Returns

string

Operators

operator *(in Transform, in Transform)

Returns the multiplication of a matrix with another matrix.

public static Transform operator *(in Transform a, in Transform b)

Parameters

a Transform
b Transform

Returns

Transform

operator *(in Transform, in Vector3)

Returns the multiplication of a matrix with a column vector.

public static Vector3 operator *(in Transform a, in Vector3 b)

Parameters

a Transform
b Vector3

Returns

Vector3