Skip to content

Converter

class Converter

Converts values from one cartesian coordinate system to another.

Functions

Name Description
Converter Constructs a converter from two cartesian coordinate systems.
Forward Converts a vector from the source coordinate system to the target coordinate system.
Forward Converts a quaternion from the source coordinate system to the target coordinate system.
Forward Converts a scalar from the source coordinate system to the target coordinate system.
Backward Converts a vector from the target coordinate system to the source coordinate system.
Backward Converts a quaternion from the target coordinate system to the source coordinate system.
Backward Converts a scalar from the target coordinate system to the source coordinate system.

Function Details

Backward

[[nodiscard]] AmVec3 Backward(const AmVec3& vector) const

Converts a vector from the target coordinate system to the source coordinate system.

Parameter vector
The vector to convert.
Return
A vector in the source coordinate system.

[[nodiscard]] AmQuat Backward(const AmQuat& quaternion) const

Converts a quaternion from the target coordinate system to the source coordinate system.

Parameter quaternion
The quaternion to convert.
Return
A quaternion in the source coordinate system.

[[nodiscard]] AmReal32 Backward(const AmReal32& scalar) const

Converts a scalar from the target coordinate system to the source coordinate system.

Parameter scalar
The scalar to convert.
Return
A scalar in the source coordinate system.

Converter

Converter(const CartesianCoordinateSystem& from, const CartesianCoordinateSystem& to)

Constructs a converter from two cartesian coordinate systems.

Parameter from
The source cartesian coordinate system.
Parameter to
The target cartesian coordinate system.

Forward

[[nodiscard]] AmVec3 Forward(const AmVec3& vector) const

Converts a vector from the source coordinate system to the target coordinate system.

Parameter vector
The vector to convert.
Return
A vector in the target coordinate system.

[[nodiscard]] AmQuat Forward(const AmQuat& quaternion) const

Converts a quaternion from the source coordinate system to the target coordinate system.

Parameter quaternion
The quaternion to convert.
Return
A quaternion in the target coordinate system.

[[nodiscard]] AmReal32 Forward(const AmReal32& scalar) const

Converts a scalar from the source coordinate system to the target coordinate system.

Parameter scalar
The scalar to convert.
Return
A scalar in the target coordinate system.