|
void | print (const MatrixN &matrix) |
|
template<typename Vector > |
Vector | floor (const Vector &v) |
| Component-wise floor() function on a floating-point vector.
|
|
template<typename Vector > |
Vector | ceil (const Vector &v) |
| Component-wise ceil() function on a floating-point vector.
|
|
template<typename Vector > |
Vector | trunc (const Vector &v) |
| Component-wise trunc() function on a floating-point vector.
|
|
template<typename Derived , typename DerivedA , typename DerivedB > |
Derived::PlainMatrix | clamp (const Eigen::MatrixBase< Derived > &v, const Eigen::MatrixBase< DerivedA > &min, const Eigen::MatrixBase< DerivedB > &max) |
| Component-wise clamp() function on a floating-point vector.
|
|
template<typename Derived > |
Derived::PlainMatrix | clamp (const Eigen::MatrixBase< Derived > &v, const Scalar &min, const Scalar &max) |
| Component-wise clamp() function on a floating-point vector.
|
|
template<typename S > |
bool | checkInvalidNumbers (Eigen::Ref< Eigen::Quaternion< S >> q, const bool FAIL_ON_ASSERT=false) |
| Call std::isfinite on quaternion entries.
|
|
template<typename Matrix_ > |
bool | checkInvalidNumbers (Eigen::Ref< const Matrix_ > matrix, const bool FAIL_ON_ASSERT=false) |
|
void | getOrthogonalVectors (const Vector3 &fx, Eigen::Ref< Vector3 > fy, Eigen::Ref< Vector3 > fz) |
|
template<typename Vector_ > |
Scalar | angle (const Vector_ &v1, const Vector_ &v2) |
|
template<typename Vector_ > |
Vector_ | slerp (const Vector_ &v1, const Vector_ &v2, Scalar t) |
|
Vector3 | projectOnPlane (const Vector3 &planePos, const Vector3 &planeNormal, const Vector3 &point) |
|
template<typename Vector_ > |
Scalar | cotan (const Vector_ &v1, const Vector_ &v2) |
|
template<typename Vector_ > |
Scalar | cos (const Vector_ &v1, const Vector_ &v2) |
|
template<typename Vector_ > |
Scalar | getNormAndNormalize (Vector_ &v) |
|
template<typename Vector_ > |
Scalar | getNormAndNormalizeSafe (Vector_ &v) |
|
template<typename Scalar > |
Eigen::ParametrizedLine< Scalar, 3 > | transformRay (const Eigen::Transform< Scalar, 3, Eigen::Affine > &t, const Eigen::ParametrizedLine< Scalar, 3 > &r) |
|
Matrix4 | lookAt (const Vector3 &position, const Vector3 &target, const Vector3 &up) |
|
Matrix4 | perspective (Scalar fovy, Scalar aspect, Scalar near, Scalar zfar) |
|
Matrix4 | orthographic (Scalar left, Scalar right, Scalar bottom, Scalar top, Scalar near, Scalar zfar) |
|
Quaternion | scale (const Quaternion &q, const Scalar k) |
| Returns the quaternion q multipled by a scalar factor of k.
|
|
Quaternion | add (const Quaternion &q1, const Quaternion &q2) |
| Returns the sum of two quaternions.
|
|
Quaternion | addQlerp (const Quaternion &q1, const Quaternion &q2) |
|
void | getSwingTwist (const Quaternion &in, Quaternion &swingOut, Quaternion &twistOut) |
|
template<typename Vector_ > |
Vector_ | floor (const Vector_ &v) |
|
template<typename Vector_ > |
Vector_ | ceil (const Vector_ &v) |
|
template<typename Vector_ > |
Vector_ | trunc (const Vector_ &v) |
|
constexpr Scalar | toRadians (Scalar a) |
| Useful functions. More...
|
|
constexpr Scalar | toDegrees (Scalar a) |
| Converts an angle from radians to degrees.
|
|
template<class T > |
std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type | areApproxEqual (T x, T y, T espilonBoostFactor=T(10)) |
| Compare two numbers such that |x-y| < espilon*epsilonBoostFactor.
|
|
template<typename Vector_Or_Scalar > |
bool | checkRange (const Vector_Or_Scalar &v, const Scalar &min, const Scalar &max) |
|
template<typename T > |
T | ipow (const T &x, uint exp) |
| Run-time exponent version. More...
|
|
template<uint N, typename T > |
constexpr T | ipow (const T &x) |
| Compile-time exponent version.
|
|
template<typename T > |
constexpr int | signum (T x, std::true_type) |
|
template<typename T > |
constexpr int | sign (const T &val) |
| Returns the sign of any numeric type as { -1, 0, 1}.
|
|
template<typename T > |
constexpr T | signNZ (const T &val) |
|
template<typename T > |
constexpr T | saturate (T v) |
| Clamps the value between 0 and 1.
|
|
template<typename T > |
constexpr T | lerp (const T &a, const T &b, Scalar t) |
| Returns the linear interpolation between a and b.
|
|
template<typename T > |
T | smoothstep (T edge0, T edge1, T x) |
| As define by https://registry.khronos.org/OpenGL-Refpages/gl4/html/smoothstep.xhtml.
|
|
template<typename T , template< typename, int... > typename M, int... p> |
M< T, p... > | smoothstep (T edge0, T edge1, M< T, p... > v) |
|
|
template<typename T > |
T | linearInterpolate (const T &v0, const T &v1, const Scalar t) |
|
template<> |
Core::Quaternion | linearInterpolate< Core::Quaternion > (const Core::Quaternion &q0, const Core::Quaternion &q1, const Scalar t) |
|
template<> |
Core::Transform | linearInterpolate< Core::Transform > (const Core::Transform &T0, const Core::Transform &T1, const Scalar t) |
|
This namespace contains usefull math functions.