Monado OpenXR Runtime
xrt::auxiliary::math Namespace Reference

C++-only functionality in the Math helper library. More...

Data Structures

class  IntegerLowPassIIRFilter
 A very simple integer low-pass filter, using a "one-pole infinite impulse response" design (one-pole IIR), also known as an exponential filter. More...
 
class  LowPassIIRFilter
 A very simple low-pass filter, using a "one-pole infinite impulse response" design (one-pole IIR). More...
 
class  LowPassIIRVectorFilter
 A very simple low-pass filter, using a "one-pole infinite impulse response" design (one-pole IIR). More...
 
struct  Rational
 A rational (fractional) number type. More...
 

Functions

static Eigen::Map< const Eigen::Quaternionf > map_quat (const struct xrt_quat &q)
 Wrap an internal quaternion struct in an Eigen type, const overload. More...
 
static Eigen::Map< Eigen::Quaternionf > map_quat (struct xrt_quat &q)
 Wrap an internal quaternion struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< const Eigen::Vector3f > map_vec3 (const struct xrt_vec3 &v)
 Wrap an internal 3D vector struct in an Eigen type, const overload. More...
 
static Eigen::Map< Eigen::Vector3f > map_vec3 (struct xrt_vec3 &v)
 Wrap an internal 3D vector struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< const Eigen::Vector3d > map_vec3_f64 (const struct xrt_vec3_f64 &v)
 Wrap an internal 3D vector struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< Eigen::Vector3d > map_vec3_f64 (struct xrt_vec3_f64 &v)
 Wrap an internal 3D vector struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< const Eigen::Matrix3f > map_matrix_3x3 (const struct xrt_matrix_3x3 &m)
 Wrap an internal 3x3 matrix struct in an Eigen type, const overload. More...
 
static Eigen::Map< Eigen::Matrix3f > map_matrix_3x3 (struct xrt_matrix_3x3 &m)
 Wrap an internal 3x3 matrix struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< Eigen::Matrix3d > map_matrix_3x3_f64 (struct xrt_matrix_3x3_f64 &m)
 Wrap an internal 3x3 matrix struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< const Eigen::Matrix4f > map_matrix_4x4 (const struct xrt_matrix_4x4 &m)
 Wrap an internal 4x4 matrix struct in an Eigen type, const overload. More...
 
static Eigen::Map< Eigen::Matrix4f > map_matrix_4x4 (struct xrt_matrix_4x4 &m)
 Wrap an internal 4x4 matrix struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< const Eigen::Matrix4d > map_matrix_4x4_f64 (const struct xrt_matrix_4x4_f64 &m)
 Wrap an internal 4x4 matrix f64 struct in an Eigen type, const overload. More...
 
static Eigen::Map< Eigen::Matrix4d > map_matrix_4x4_f64 (struct xrt_matrix_4x4_f64 &m)
 Wrap an internal 4x4 matrix struct in an Eigen type, non-const overload. More...
 
static Eigen::Map< const Eigen::Quaternionf > orientation (const struct xrt_pose &pose)
 Return a Eigen type wrapping a pose's orientation (const). More...
 
static Eigen::Map< Eigen::Quaternionf > orientation (struct xrt_pose &pose)
 Return a Eigen type wrapping a pose's orientation. More...
 
static Eigen::Map< const Eigen::Vector3f > position (const struct xrt_pose &pose)
 Return a Eigen type wrapping a pose's position (const). More...
 
static Eigen::Map< Eigen::Vector3f > position (struct xrt_pose &pose)
 Return a Eigen type wrapping a pose's position. More...
 

Detailed Description

C++-only functionality in the Math helper library.

Function Documentation

◆ map_matrix_3x3() [1/2]

static Eigen::Map< const Eigen::Matrix3f > xrt::auxiliary::math::map_matrix_3x3 ( const struct xrt_matrix_3x3 m)
inlinestatic

Wrap an internal 3x3 matrix struct in an Eigen type, const overload.

Permits zero-overhead manipulation of xrt_matrix_3x3& by Eigen routines as if it were a Eigen::Matrix3f&.

Referenced by math_matrix_3x3_identity(), xrt_matrix_4x4::math_matrix_3x3_rotation_from_isometry(), and xrt_matrix_4x4::math_matrix_4x4_isometry_from_rt().

◆ map_matrix_3x3() [2/2]

static Eigen::Map< Eigen::Matrix3f > xrt::auxiliary::math::map_matrix_3x3 ( struct xrt_matrix_3x3 m)
inlinestatic

Wrap an internal 3x3 matrix struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_matrix_3x3& by Eigen routines as if it were a Eigen::Matrix3f&.

◆ map_matrix_3x3_f64()

static Eigen::Map< Eigen::Matrix3d > xrt::auxiliary::math::map_matrix_3x3_f64 ( struct xrt_matrix_3x3_f64 m)
inlinestatic

Wrap an internal 3x3 matrix struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_matrix_3x3& by Eigen routines as if it were a Eigen::Matrix3_f64&.

Referenced by math_matrix_3x3_f64_identity().

◆ map_matrix_4x4() [1/2]

static Eigen::Map< const Eigen::Matrix4f > xrt::auxiliary::math::map_matrix_4x4 ( const struct xrt_matrix_4x4 m)
inlinestatic

◆ map_matrix_4x4() [2/2]

static Eigen::Map< Eigen::Matrix4f > xrt::auxiliary::math::map_matrix_4x4 ( struct xrt_matrix_4x4 m)
inlinestatic

Wrap an internal 4x4 matrix struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_matrix_4x4& by Eigen routines as if it were a Eigen::Matrix4f&.

◆ map_matrix_4x4_f64() [1/2]

static Eigen::Map< const Eigen::Matrix4d > xrt::auxiliary::math::map_matrix_4x4_f64 ( const struct xrt_matrix_4x4_f64 m)
inlinestatic

Wrap an internal 4x4 matrix f64 struct in an Eigen type, const overload.

Permits zero-overhead manipulation of const xrt_matrix_4x4_f64& by Eigen routines as if it were a const Eigen::Matrix4d&.

Referenced by xrt_matrix_4x4_f64::m_mat4_f64_identity(), xrt_matrix_4x4_f64::m_mat4_f64_invert(), xrt_matrix_4x4_f64::m_mat4_f64_multiply(), and xrt_matrix_4x4_f64::m_mat4_f64_orientation().

◆ map_matrix_4x4_f64() [2/2]

static Eigen::Map< Eigen::Matrix4d > xrt::auxiliary::math::map_matrix_4x4_f64 ( struct xrt_matrix_4x4_f64 m)
inlinestatic

Wrap an internal 4x4 matrix struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_matrix_4x4_f64& by Eigen routines as if it were a Eigen::Matrix4d&.

◆ map_quat() [1/2]

static Eigen::Map< const Eigen::Quaternionf > xrt::auxiliary::math::map_quat ( const struct xrt_quat q)
inlinestatic

◆ map_quat() [2/2]

static Eigen::Map< Eigen::Quaternionf > xrt::auxiliary::math::map_quat ( struct xrt_quat q)
inlinestatic

Wrap an internal quaternion struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_quat& by Eigen routines as if it were a Eigen::Quaternionf&.

◆ map_vec3() [1/2]

◆ map_vec3() [2/2]

static Eigen::Map< Eigen::Vector3f > xrt::auxiliary::math::map_vec3 ( struct xrt_vec3 v)
inlinestatic

Wrap an internal 3D vector struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_vec3& by Eigen routines as if it were a Eigen::Vector3f&.

◆ map_vec3_f64() [1/2]

static Eigen::Map< const Eigen::Vector3d > xrt::auxiliary::math::map_vec3_f64 ( const struct xrt_vec3_f64 v)
inlinestatic

Wrap an internal 3D vector struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_vec3& by Eigen routines as if it were a const Eigen::Vector3_f64&.

Referenced by math_matrix_3x3_f64_transform_vec3_f64(), xrt_vec3_f64::math_vec3_f64_cross(), and xrt_vec3_f64::math_vec3_f64_normalize().

◆ map_vec3_f64() [2/2]

static Eigen::Map< Eigen::Vector3d > xrt::auxiliary::math::map_vec3_f64 ( struct xrt_vec3_f64 v)
inlinestatic

Wrap an internal 3D vector struct in an Eigen type, non-const overload.

Permits zero-overhead manipulation of xrt_vec3& by Eigen routines as if it were a Eigen::Vector3_f64&.

◆ orientation() [1/2]

static Eigen::Map< const Eigen::Quaternionf > xrt::auxiliary::math::orientation ( const struct xrt_pose pose)
inlinestatic

◆ orientation() [2/2]

static Eigen::Map< Eigen::Quaternionf > xrt::auxiliary::math::orientation ( struct xrt_pose pose)
inlinestatic

Return a Eigen type wrapping a pose's orientation.

References map_quat().

◆ position() [1/2]

static Eigen::Map< const Eigen::Vector3f > xrt::auxiliary::math::position ( const struct xrt_pose pose)
inlinestatic

◆ position() [2/2]

static Eigen::Map< Eigen::Vector3f > xrt::auxiliary::math::position ( struct xrt_pose pose)
inlinestatic

Return a Eigen type wrapping a pose's position.

References map_vec3().