lib_math.h File Reference

Detailed Description

high-level mathematical functions

Classes

class  LinearCongruentialRandom< FLOAT >
 
class  PseudoRandom< FLOAT >
 

Namespaces

 maxon
 

Macros

#define MATH_VECTOR
 
#define MATH_COLOR
 
#define MATH_MATRIX
 
#define MATH_SQUAREMATRIX
 
#define MATH_VECTOR2
 
#define MATH_MATRIX2
 
#define MATH_SQUAREMATRIX2
 

Typedefs

using TransformColorDelegate32 = Delegate< Color32(const Color32 &)>
 
using TransformColorDelegate64 = Delegate< Color64(const Color64 &)>
 
using TransformValueDelegate32 = Delegate< Float32(const Float32 &)>
 
using TransformValueDelegate64 = Delegate< Float64(const Float64 &)>
 
using TransformColorDelegate = TransformColorDelegate64
 
using TransformValueDelegate = TransformValueDelegate64
 

Enumerations

enum class  ROTATIONORDER {
  ZXYGLOBAL ,
  ZYXGLOBAL ,
  YXZGLOBAL ,
  YZXGLOBAL ,
  XZYGLOBAL ,
  XYZGLOBAL ,
  YXZLOCAL ,
  XYZLOCAL ,
  ZXYLOCAL ,
  XZYLOCAL ,
  YZXLOCAL ,
  ZYXLOCAL
}
 

Functions

template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > VectorToSquareMatrix (const Vec3< FLOAT > &dirVector, const Vec3< FLOAT > &upVector)
 
template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > CheckedVectorToSquareMatrix (const Vec3< FLOAT > &dirVector, const Vec3< FLOAT > &upVector)
 
template<typename FLOAT >
Mat3< Vec3< FLOAT > > VectorToMatrix (const Vec3< FLOAT > &dirVector, const Vec3< FLOAT > &upVector)
 
template<typename FLOAT >
Mat3< Vec3< FLOAT > > GetTranslationMatrix (const Vec3< FLOAT > &translation)
 
template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > GetScaleMatrix (const Vec3< FLOAT > &scale)
 
template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > GetRotationMatrixX (FLOAT angle)
 
template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > GetRotationMatrixY (FLOAT angle)
 
template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > GetRotationMatrixZ (FLOAT angle)
 
template<typename FLOAT >
Mat2< Vec2< FLOAT > > GetTranslationMatrix (const Vec2< FLOAT > &translation)
 
template<typename FLOAT >
SqrMat2< Vec2< FLOAT > > GetScaleMatrix (const Vec2< FLOAT > &scale)
 
template<typename FLOAT >
SqrMat2< Vec2< FLOAT > > GetRotationMatrix (FLOAT angle)
 
enum maxon::ROTATIONORDER MAXON_ENUM_LIST (ROTATIONORDER)
 
template<typename FLOAT >
Vec3< FLOAT > GetRotationAngles (const SqrMat3< Vec3< FLOAT >> &m, ROTATIONORDER rotationOrder)
 
template<typename FLOAT >
Vec3< FLOAT > GetRotationAngles (const Vec3< FLOAT > &direction, ROTATIONORDER rotationOrder)
 
template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > GetRotationMatrix (const Vec3< FLOAT > &rotation, ROTATIONORDER rotationOrder)
 
template<typename FLOAT >
Mat3< Vec3< FLOAT > > GetPSRMatrix (const Vec3< FLOAT > &position, const Vec3< FLOAT > &scale, const Vec3< FLOAT > &rotation, ROTATIONORDER rotationOrder)
 
template<typename FLOAT >
Vec3< FLOAT > GetOptimumRotation (const Vec3< FLOAT > &oldRotation, const Vec3< FLOAT > &newRotation, ROTATIONORDER rotationOrder)
 
template<typename FLOAT >
Vec3< FLOAT > GetClosestPointOnLine (const Vec3< FLOAT > &lineOrigin, const Vec3< FLOAT > &lineDirection, const Vec3< FLOAT > &point)
 
template<typename FLOAT >
FLOAT GetPointLineDistance (const Vec3< FLOAT > &lineOrigin, const Vec3< FLOAT > &lineDirection, const Vec3< FLOAT > &point)
 
template<typename FLOAT >
Vec3< FLOAT > ReflectRay (const Vec3< FLOAT > &direction, const Vec3< FLOAT > &normal)
 
template<typename FLOAT >
Vec3< FLOAT > RGBToHSV (const Col3< FLOAT > &color)
 
template<typename FLOAT >
Col3< FLOAT > HSVToRGB (const Vec3< FLOAT > &color)
 
template<typename FLOAT >
Vec3< FLOAT > RGBToHSL (const Col3< FLOAT > &color)
 
template<typename FLOAT >
Col3< FLOAT > HSLToRGB (const Vec3< FLOAT > &color)
 
template<typename FLOAT >
void GetRotationAxis (const SqrMat3< Vec3< FLOAT >> &m, Vec3< FLOAT > &axisVector, FLOAT &axisRotation)
 
template<typename FLOAT >
SqrMat3< Vec3< FLOAT > > GetRotationMatrixFromAxis (const Vec3< FLOAT > &axisVector, FLOAT axisRotation)
 
template<typename MATRIXTYPE >
Bool IsMatrixRectangular (const MATRIXTYPE &m, typename MATRIXTYPE::ValueType epsilon=1e-10_f)
 
template<typename ITERABLETYPE >
MAXON_ATTRIBUTE_FORCE_INLINE std::remove_reference< ITERABLETYPE >::type::ValueType GetSum (ITERABLETYPE &&array)
 
template<typename ITERABLETYPE >
MAXON_ATTRIBUTE_FORCE_INLINE std::remove_reference< ITERABLETYPE >::type::ValueType GetAverage (ITERABLETYPE &&array)
 

Variables

 ZXYGLOBAL
 
 ZYXGLOBAL
 
 YXZGLOBAL
 
 YZXGLOBAL
 
 XZYGLOBAL
 
 XYZGLOBAL
 
 YXZLOCAL
 
 XYZLOCAL
 
 ZXYLOCAL
 
 XZYLOCAL
 
 YZXLOCAL
 
 ZYXLOCAL
 

Variable Documentation

◆ ZXYGLOBAL

ZXYGLOBAL

◆ ZYXGLOBAL

ZYXGLOBAL

◆ YXZGLOBAL

YXZGLOBAL

◆ YZXGLOBAL

YZXGLOBAL

◆ XZYGLOBAL

XZYGLOBAL

◆ XYZGLOBAL

XYZGLOBAL

◆ YXZLOCAL

YXZLOCAL

◆ XYZLOCAL

XYZLOCAL

◆ ZXYLOCAL

ZXYLOCAL

◆ XZYLOCAL

XZYLOCAL

◆ YZXLOCAL

YZXLOCAL

◆ ZYXLOCAL

ZYXLOCAL