|
Monado OpenXR Runtime
|
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>
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. | |
Base implementations for math library.
Based in part on inc/osvr/Util/EigenQuatExponentialMap.h in OSVR-Core