supereight
Namespaces | Functions
math_util.hpp File Reference
#include <Eigen/Dense>
#include <vector>
#include "impl/math_util_impl.hpp"

Go to the source code of this file.

Namespaces

 se
 Helper wrapper to allocate and de-allocate octants in the octree.
 
 se::math
 

Functions

template<typename T >
constexpr bool se::math::is_power_of_two (T)
 
template<>
constexpr bool se::math::is_power_of_two< unsigned > (const unsigned x)
 
constexpr int se::math::log2_const (int n)
 
static unsigned se::math::power_two_up (const float x)
 
template<typename T >
static T se::math::fracf (const T &v)
 
template<typename T >
static T se::math::floorf (const T &v)
 
template<typename T >
static T se::math::fabs (const T &v)
 
template<typename Scalar >
static constexpr Scalar se::math::sq (Scalar a)
 
template<typename Scalar >
static constexpr Scalar se::math::cu (Scalar a)
 
template<typename Scalar >
static bool se::math::in (const Scalar v, const Scalar a, const Scalar b)
 
static Eigen::Vector3f se::math::to_translation (const Eigen::Matrix4f &T)
 
static Eigen::Matrix3f se::math::to_rotation (const Eigen::Matrix4f &T)
 
static Eigen::Matrix4f se::math::to_transformation (const Eigen::Vector3f &t)
 
static Eigen::Matrix4f se::math::to_transformation (const Eigen::Matrix3f &R)
 
static Eigen::Matrix4f se::math::to_transformation (const Eigen::Matrix3f &R, const Eigen::Vector3f &t)
 
static Eigen::Vector3f se::math::to_inverse_translation (const Eigen::Matrix4f &T)
 
static Eigen::Matrix3f se::math::to_inverse_rotation (const Eigen::Matrix4f &T)
 
static Eigen::Matrix4f se::math::to_inverse_transformation (const Eigen::Matrix4f &T)
 
template<typename T >
static std::enable_if< std::is_arithmetic< T >::value, T >::type se::math::clamp (const T &f, const T &a, const T &b)
 
static void se::math::clamp (Eigen::Ref< Eigen::VectorXf > res, const Eigen::Ref< const Eigen::VectorXf > a, const Eigen::Ref< Eigen::VectorXf > b)
 
template<typename R , typename A , typename B >
static void se::math::clamp (Eigen::MatrixBase< R > &res, const Eigen::MatrixBase< A > &a, const Eigen::MatrixBase< B > &b)
 
static Eigen::Vector3f se::math::plane_normal (const Eigen::Vector3f &p1, const Eigen::Vector3f &p2, const Eigen::Vector3f &p3)
 Compute the normal vector of a plane defined by 3 points. More...
 
template<typename T >
static T se::math::median (std::vector< T > &data)
 Compute the median of the data in the vector. More...
 
template<typename T >
static T se::math::almost_median (std::vector< T > &data)
 Compute the median of the data in the vector. More...
 
template<typename T >
static T se::math::median (const std::vector< T > &data)
 Same as se::math::median() but the order of the original vector is retain. More...
 
static Eigen::Matrix3f se::math::hat (const Eigen::Vector3f &omega)
 hat-operator More...
 
static Eigen::Matrix3f se::math::exp_and_theta (const Eigen::Vector3f &omega, float &theta)
 
static Eigen::Matrix4f se::math::exp (const Eigen::Matrix< float, 6, 1 > &a)
 Group exponential. More...