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
rightAxisAxis3dThe signed axis used as semantic right.
upAxisAxis3dThe signed axis used as semantic up.
forwardAxisAxis3dThe 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
Canonical
The FixedMathSharp canonical convention: +X right, +Y up, +Z forward.
public static CoordinateConvention3d Canonical { get; }
Property Value
Down
Gets the semantic down direction expressed in this convention's component basis.
public Vector3d Down { get; }
Property Value
Forward
Gets the semantic forward direction expressed in this convention's component basis.
public Vector3d Forward { get; }
Property Value
ForwardAxis
Gets the signed axis used as semantic forward in this convention.
public Axis3d ForwardAxis { get; }
Property Value
Left
Gets the semantic left direction expressed in this convention's component basis.
public Vector3d Left { get; }
Property Value
NegativeZForward
A convention with +X right, +Y up, and -Z forward.
public static CoordinateConvention3d NegativeZForward { get; }
Property Value
PositiveZForward
The FixedMathSharp canonical convention: +X right, +Y up, +Z forward.
public static CoordinateConvention3d PositiveZForward { get; }
Property Value
Right
Gets the semantic right direction expressed in this convention's component basis.
public Vector3d Right { get; }
Property Value
RightAxis
Gets the signed axis used as semantic right in this convention.
public Axis3d RightAxis { get; }
Property Value
Up
Gets the semantic up direction expressed in this convention's component basis.
public Vector3d Up { get; }
Property Value
UpAxis
Gets the signed axis used as semantic up in this convention.
public Axis3d UpAxis { get; }
Property Value
XForwardZUp
A convention with +Y right, +Z up, and +X forward.
public static CoordinateConvention3d XForwardZUp { get; }
Property Value
Methods
Equals(CoordinateConvention3d)
public bool Equals(CoordinateConvention3d other)
Parameters
otherCoordinateConvention3d
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
FromCanonicalDirection(Vector3d)
Converts a direction vector from FixedMathSharp's canonical convention into this convention.
public Vector3d FromCanonicalDirection(Vector3d canonicalDirection)
Parameters
canonicalDirectionVector3dThe direction vector expressed in FixedMathSharp's canonical convention.
Returns
- Vector3d
The same semantic direction expressed in this convention.
GetHashCode()
public override int GetHashCode()
Returns
ToCanonicalDirection(Vector3d)
Converts a direction vector from this convention into FixedMathSharp's canonical convention.
public Vector3d ToCanonicalDirection(Vector3d direction)
Parameters
directionVector3dThe 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
leftCoordinateConvention3drightCoordinateConvention3d
Returns
operator !=(CoordinateConvention3d, CoordinateConvention3d)
Determines whether two conventions are not equal.
public static bool operator !=(CoordinateConvention3d left, CoordinateConvention3d right)
Parameters
leftCoordinateConvention3drightCoordinateConvention3d