Monado OpenXR Runtime
Loading...
Searching...
No Matches
m_quatexpmap.hpp File Reference

Base implementations for math library. More...

#include "math/m_api.h"
#include "math/m_eigen_interop.hpp"
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <assert.h>
#include <cmath>
Include dependency graph for m_quatexpmap.hpp:

Go to the source code of this file.

Data Structures

struct  xrt::auxiliary::math::FourthRootMachineEps< double >
 
struct  xrt::auxiliary::math::FourthRootMachineEps< float >
 

Namespaces

namespace  xrt::auxiliary::math
 C++-only functionality in the Math helper library.
 

Functions

template<typename Scalar >
Scalar xrt::auxiliary::math::sinc_sq (Scalar theta_sq)
 Computes the "historical" (un-normalized) sinc(Theta), using theta^2 to allow us to handle sqrt(0) better for differentiation.
 
template<typename Scalar >
Scalar xrt::auxiliary::math::cos_sq (Scalar theta_sq)
 Computes cos(theta) given theta^2, staying differentiable at theta = 0.
 
template<typename Derived >
Eigen::Quaternion< typename Derived::Scalar > xrt::auxiliary::math::quat_exp (Eigen::MatrixBase< Derived > const &vec)
 Fully-templated free function for quaternion exponentiation.
 
template<typename Derived >
Eigen::Quaternion< typename Derived::Scalar > xrt::auxiliary::math::quat_exp_so3 (Eigen::MatrixBase< Derived > const &vec)
 Fully-templated free function for quaternion exponentiation, SO(3) version as described by Grassia.
 
template<typename Scalar >
Scalar xrt::auxiliary::math::cscTaylorExpansion (Scalar theta)
 Taylor series expansion of theta over sin(theta), also known as cosecant, for use near 0 when you want continuity and validity at 0.
 
template<typename Scalar >
Eigen::Matrix< Scalar, 3, 1 > xrt::auxiliary::math::quat_ln (Eigen::Quaternion< Scalar > const &quat)
 Fully-templated free function for quaternion log map.
 
template<typename Scalar >
Eigen::Matrix< Scalar, 3, 1 > xrt::auxiliary::math::quat_ln_so3 (const Eigen::Quaternion< Scalar > &quat)
 Fully-templated free function for the quaternion log map, SO(3) version as described by Grassia.
 

Variables

constexpr double xrt::auxiliary::math::quat_small_sqr_vecnorm = 1.e-8
 Squared vector norm below which the quat maps switch to a series expansion, i.e.
 

Detailed Description

Base implementations for math library.

Author
Rylie Pavlik rylie.nosp@m..pav.nosp@m.lik@c.nosp@m.olla.nosp@m.bora..nosp@m.com
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com

Based in part on inc/osvr/Util/EigenQuatExponentialMap.h in OSVR-Core