Table of Contents

Struct CoordinateConvention3d

Namespace
FixedMathSharp
Assembly
FixedMathSharp.dll

Describes a stateless 3D direction convention relative to FixedMathSharp's canonical basis.

public readonly struct CoordinateConvention3d : IEquatable<CoordinateConvention3d>
Implements
Inherited Members

Remarks

FixedMathSharp's canonical 3D basis is +X right, +Y up, and +Z forward. This type maps direction vector components between another explicit right/up/forward axis basis and the FixedMathSharp canonical basis. Matrix storage, transform APIs, clip-space depth, units, and origins remain adapter-level concerns.

Constructors

CoordinateConvention3d(Axis3d, Axis3d, Axis3d)

Initializes a new convention with the specified semantic right, up, and forward axes.

public CoordinateConvention3d(Axis3d rightAxis, Axis3d upAxis, Axis3d forwardAxis)

Parameters

rightAxis Axis3d

The signed axis used as semantic right.

upAxis Axis3d

The signed axis used as semantic up.

forwardAxis Axis3d

The signed axis used as semantic forward.

Exceptions

ArgumentOutOfRangeException

Thrown when any axis is not a defined Axis3d value.

ArgumentException

Thrown when two semantic axes use the same absolute axis.

Properties

Backward

Gets the semantic backward direction expressed in this convention's component basis.

public Vector3d Backward { get; }

Property Value

Vector3d

Canonical

The FixedMathSharp canonical convention: +X right, +Y up, +Z forward.

public static CoordinateConvention3d Canonical { get; }

Property Value

CoordinateConvention3d

Down

Gets the semantic down direction expressed in this convention's component basis.

public Vector3d Down { get; }

Property Value

Vector3d

Forward

Gets the semantic forward direction expressed in this convention's component basis.

public Vector3d Forward { get; }

Property Value

Vector3d

ForwardAxis

Gets the signed axis used as semantic forward in this convention.

public Axis3d ForwardAxis { get; }

Property Value

Axis3d

Left

Gets the semantic left direction expressed in this convention's component basis.

public Vector3d Left { get; }

Property Value

Vector3d

NegativeZForward

A convention with +X right, +Y up, and -Z forward.

public static CoordinateConvention3d NegativeZForward { get; }

Property Value

CoordinateConvention3d

PositiveZForward

The FixedMathSharp canonical convention: +X right, +Y up, +Z forward.

public static CoordinateConvention3d PositiveZForward { get; }

Property Value

CoordinateConvention3d

Right

Gets the semantic right direction expressed in this convention's component basis.

public Vector3d Right { get; }

Property Value

Vector3d

RightAxis

Gets the signed axis used as semantic right in this convention.

public Axis3d RightAxis { get; }

Property Value

Axis3d

Up

Gets the semantic up direction expressed in this convention's component basis.

public Vector3d Up { get; }

Property Value

Vector3d

UpAxis

Gets the signed axis used as semantic up in this convention.

public Axis3d UpAxis { get; }

Property Value

Axis3d

XForwardZUp

A convention with +Y right, +Z up, and +X forward.

public static CoordinateConvention3d XForwardZUp { get; }

Property Value

CoordinateConvention3d

Methods

Equals(CoordinateConvention3d)

public bool Equals(CoordinateConvention3d other)

Parameters

other CoordinateConvention3d

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

FromCanonicalDirection(Vector3d)

Converts a direction vector from FixedMathSharp's canonical convention into this convention.

public Vector3d FromCanonicalDirection(Vector3d canonicalDirection)

Parameters

canonicalDirection Vector3d

The direction vector expressed in FixedMathSharp's canonical convention.

Returns

Vector3d

The same semantic direction expressed in this convention.

GetHashCode()

public override int GetHashCode()

Returns

int

ToCanonicalDirection(Vector3d)

Converts a direction vector from this convention into FixedMathSharp's canonical convention.

public Vector3d ToCanonicalDirection(Vector3d direction)

Parameters

direction Vector3d

The direction vector expressed in this convention.

Returns

Vector3d

The same semantic direction expressed in the canonical +Z-forward convention.

Operators

operator ==(CoordinateConvention3d, CoordinateConvention3d)

Determines whether two conventions are equal.

public static bool operator ==(CoordinateConvention3d left, CoordinateConvention3d right)

Parameters

left CoordinateConvention3d
right CoordinateConvention3d

Returns

bool

operator !=(CoordinateConvention3d, CoordinateConvention3d)

Determines whether two conventions are not equal.

public static bool operator !=(CoordinateConvention3d left, CoordinateConvention3d right)

Parameters

left CoordinateConvention3d
right CoordinateConvention3d

Returns

bool