Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
coordinate_system.h File Reference

Go to the source code of this file.

Classes

struct  momentum::CoordinateSystem
 A 3D coordinate system defined by its up axis, handedness, and length unit. More...

Namespaces

namespace  momentum

Enumerations

enum class  momentum::UpAxis { momentum::X = 0 , momentum::Y , momentum::Z }
 Specifies which axis points "up" in a 3D coordinate system. More...
enum class  momentum::Handedness { momentum::Left = 0 , momentum::Right }
 Specifies the handedness (chirality) of a coordinate system. More...
enum class  momentum::LengthUnit { momentum::Meter = 0 , momentum::Decimeter , momentum::Centimeter , momentum::Millimeter }
 Specifies the unit of length measurement. More...

Functions

template<typename T>
T momentum::scaleFactor (const CoordinateSystem &from, const CoordinateSystem &to)
 Returns the length scale factor when converting a length from from's unit to to's unit.
template<typename T>
Vector3< T > momentum::changeVector (const Vector3< T > &v, const CoordinateSystem &from, const CoordinateSystem &to)
 Converts a 3D position vector between coordinate systems.
template<typename T>
Quaternion< T > momentum::changeQuaternion (const Quaternion< T > &q, const CoordinateSystem &from, const CoordinateSystem &to)
 Converts a quaternion rotation between coordinate systems.
template<typename T>
Matrix3< T > momentum::changeRotationMatrix (const Matrix3< T > &m, const CoordinateSystem &from, const CoordinateSystem &to)
 Converts a 3x3 rotation matrix between coordinate systems.
template<typename T>
Vector3< T > momentum::toMomentumVector (const Vector3< T > &v, const CoordinateSystem &from)
 Converts a position vector from from into Momentum's canonical coordinate system.
template<typename T>
Vector3< T > momentum::fromMomentumVector (const Vector3< T > &v, const CoordinateSystem &to)
 Converts a position vector from Momentum's canonical coordinate system into to.
template<typename T>
Quaternion< T > momentum::toMomentumQuaternion (const Quaternion< T > &q, const CoordinateSystem &from)
 Converts a quaternion rotation from from into Momentum's canonical coordinate system.
template<typename T>
Quaternion< T > momentum::fromMomentumQuaternion (const Quaternion< T > &q, const CoordinateSystem &to)
 Converts a quaternion rotation from Momentum's canonical coordinate system into to.
template<typename T>
Matrix3< T > momentum::toMomentumRotationMatrix (const Matrix3< T > &m, const CoordinateSystem &from)
 Converts a 3x3 rotation matrix from from into Momentum's canonical coordinate system.
template<typename T>
Matrix3< T > momentum::fromMomentumRotationMatrix (const Matrix3< T > &m, const CoordinateSystem &to)
 Converts a 3x3 rotation matrix from Momentum's canonical coordinate system into to.

Variables

constexpr CoordinateSystem momentum::kMomentumCoordinateSystem
 Momentum's canonical coordinate system: Y-up, right-handed, centimeters.