Murl::Math Namespace Reference

Namespace containing mathematic related interfaces. More...

Classes

class  Vector
 A 4-component vector class. More...
 
class  StaticVector
 The static vector class. More...
 
class  Quaternion
 A quaternion class. More...
 
class  Matrix
 A 4x4 matrix class. More...
 
class  Limits
 The limit values class. More...
 
class  Sphere
 A sphere class. More...
 
class  Rectangle
 A rectangle class with 2D coordinates. More...
 
class  Box
 A box class describing the minimum and maximum coordinate of a 3d-box. More...
 
class  Ray
 A ray class. More...
 
class  Plane
 A plane class describing the equation for a plane a*x + b*y + c*z + d = 0. More...
 
class  Cone
 A cone class describing a cone by its angle and length. More...
 
class  Cylinder
 A cylinder class describing a cylinder by its radius and length. More...
 
class  Frustum
 A frustum describing 6 planes. More...
 
class  StaticMatrix
 The static matrix class. More...
 
class  BigInteger
 An integer of variable capacity. More...
 
class  Easing
 The easing class implements the functions of the predefined IEnums::Interpolation curves. More...
 
class  MinMax
 The minimum maximum values template class. More...
 
class  SplineKey
 A template class to create spline key objects for the spline interpolation classes. More...
 
class  SplineBase
 A template base class for spline interpolations. More...
 
class  SplineBezier
 A template class to create a Bezier spline interpolation object. More...
 
class  SplineHermite
 A template class to create a Cubic Hermite spline interpolation (aka as Cardinal Spline / Catmull-Rom spline) object. More...
 
class  VectorUninitialized
 A 4-component uninitialized vector class. More...
 

Typedefs

using SplineBaseVector = SplineBase< Vector< Real > >
 Predefined SplineBase using a Vector data type.
 
using SplineBaseVectorPtr = SharedPointer< SplineBaseVector >
 The SplineBaseVector shared pointer type.
 
using SplineVectorKey = SplineBaseVector::Key
 Predefined SplineBaseKey using a Vector data type.
 
using SplineBaseColor = SplineBase< Color >
 Predefined SplineBase using a Color data type.
 
using SplineBaseColorPtr = SharedPointer< SplineBaseColor >
 The SplineBaseColor shared pointer type.
 
using SplineColorKey = SplineBaseColor::Key
 Predefined SplineBaseKey using a Color data type.
 
using SplineBaseReal = SplineBase< Real >
 Predefined SplineBase using a Real data type.
 
using SplineBaseRealPtr = SharedPointer< SplineBaseReal >
 The SplineBaseReal shared pointer type.
 
using SplineRealKey = SplineBaseReal::Key
 Predefined SplineBaseKey using a Real data type.
 
using SplineBezierVector = SplineBezier< Vector< Real > >
 Predefined SplineBezier using a Vector data type.
 
using SplineBezierVectorPtr = SharedPointer< SplineBezierVector >
 The SplineBezierVector shared pointer type.
 
using SplineBezierColor = SplineBezier< Color >
 Predefined SplineBezier using a Color data type.
 
using SplineBezierColorPtr = SharedPointer< SplineBezierColor >
 The SplineBezierColor shared pointer type.
 
using SplineBezierReal = SplineBezier< Real >
 Predefined SplineBezier using a Real data type.
 
using SplineBezierRealPtr = SharedPointer< SplineBezierReal >
 The SplineBezierReal shared pointer type.
 
using SplineHermiteVector = SplineHermite< Vector< Real > >
 Predefined SplineHermite using a Vector data type.
 
using SplineHermiteVectorPtr = SharedPointer< SplineHermiteVector >
 The SplineHermiteVector shared pointer type.
 
using SplineHermiteColor = SplineHermite< Color >
 Predefined SplineHermite using a Color data type.
 
using SplineHermiteColorPtr = SharedPointer< SplineHermiteColor >
 The SplineHermiteColor shared pointer type.
 
using SplineHermiteReal = SplineHermite< Real >
 Predefined SplineHermite using a Real data type.
 
using SplineHermiteRealPtr = SharedPointer< SplineHermiteReal >
 The SplineHermiteReal shared pointer type.
 

Functions

template<class DataType >
DataType Abs (DataType value)
 Get the absolute value. More...
 
template<class DataType >
DataType Sgn (DataType value)
 Get the sign of a value. More...
 
template<class DataType >
const DataType & Min (const DataType &x, const DataType &y)
 Get the minimum of two values. More...
 
template<class DataType >
const DataType & Min (const DataType &x, const DataType &y, const DataType &z)
 Get the minimum of three values. More...
 
template<class DataType >
const DataType & Min (const DataType &x, const DataType &y, const DataType &z, const DataType &w)
 Get the minimum of four values. More...
 
template<class DataType >
const DataType & Max (const DataType &x, const DataType &y)
 Get the maximum of two values. More...
 
template<class DataType >
const DataType & Max (const DataType &x, const DataType &y, const DataType &z)
 Get the maximum of three values. More...
 
template<class DataType >
const DataType & Max (const DataType &x, const DataType &y, const DataType &z, const DataType &w)
 Get the maximum of four values. More...
 
template<class DataType >
const DataType & Clamp (const DataType &val, const DataType &min, const DataType &max)
 Clamp a value. More...
 
template<class DataType >
Bool IsNaN (DataType value)
 Check if a value is not a number (NaN). More...
 
template<class DataType >
Bool IsInfinite (DataType value)
 Check if a value is infinite (either positive infinity or negative infinity). More...
 
template<class DataType >
Bool IsFinite (DataType value)
 Check if a value is finite. More...
 
template<class DataType >
DataType Exp (DataType value)
 Get the the e number raised to the power of a value. More...
 
template<class DataType >
DataType Log (DataType value)
 Get the natural logarithm of a value. More...
 
template<class DataType >
DataType Log2 (DataType value)
 Get the base 2 logarithm of a value. More...
 
template<class DataType >
DataType Log10 (DataType value)
 Get the base 10 logarithm of a value. More...
 
template<class DataType >
DataType Sqrt (DataType value)
 Get the square root of a value. More...
 
template<class DataType >
DataType Pow (DataType base, DataType exponent)
 Get a base raised to the power of an exponent. More...
 
template<class DataType >
DataType Fmod (DataType numerator, DataType denominator)
 Get the remainder of a numerator divided by a denominator. More...
 
template<class DataType >
DataType ModF (DataType value, DataType &intPart)
 Get the integer part and the fractional part of a value. More...
 
template<class DataType >
DataType Remainder (DataType numerator, DataType denominator)
 Get the IEEE remainder of a numerator divided by a denominator. More...
 
template<class DataType >
DataType Sin (DataType radAngle)
 Get the sine of an angle value. More...
 
template<class DataType >
DataType Cos (DataType radAngle)
 Get the cosine of an angle value. More...
 
template<class DataType >
DataType Tan (DataType radAngle)
 Get the tangent of an angle value. More...
 
template<class DataType >
DataType ArcSin (DataType value)
 Get the arc sine of a value. More...
 
template<class DataType >
DataType ArcCos (DataType value)
 Get the arc cosine of a value. More...
 
template<class DataType >
DataType ArcTan (DataType value)
 Get the arc tangent of a value. More...
 
template<class DataType >
DataType ArcTan2 (DataType y, DataType x)
 Get the arc tangent of y divided by x. More...
 
template<class DataType >
DataType SinHyp (DataType value)
 Get the hyperbolic sine of an value. More...
 
template<class DataType >
DataType CosHyp (DataType value)
 Get the hyperbolic cosine of an value. More...
 
template<class DataType >
DataType TanHyp (DataType value)
 Get the hyperbolic tangent of an value. More...
 
template<class DataType >
DataType ArcSinHyp (DataType value)
 Get the hyperbolic arc sine of an value. More...
 
template<class DataType >
DataType ArcCosHyp (DataType value)
 Get the hyperbolic arc cosine of an value. More...
 
template<class DataType >
DataType ArcTanHyp (DataType value)
 Get the hyperbolic arc tangent of an value. More...
 
template<class DataType >
DataType Floor (DataType value)
 Round down to an integral value. More...
 
template<class DataType >
DataType Ceil (DataType value)
 Round up to an integral value. More...
 
template<class DataType >
DataType Round (DataType value)
 Round to an integral value, regardless of the rounding direction. More...
 
template<class DataType >
Bool IsEqual (const DataType &a, const DataType &b, const DataType &epsilon=Limits< DataType >::Epsilon())
 Check if two values are equal within an epsilon range. More...
 
template<class DataType >
DataType DegToRad (DataType degrees)
 Convert degrees into radiants. More...
 
template<class DataType >
DataType RadToDeg (DataType radiants)
 Convert radiants into degrees. More...
 
template<class DataType >
DataType MapAngle (DataType angle)
 Map an angle into range [-PI . More...
 
template<class DataType >
DataType AddAngle (DataType angle1, DataType angle2)
 Calculate the sum of two angles. More...
 
template<class DataType >
DataType SubAngle (DataType angle1, DataType angle2)
 Calculate the difference between two angles. More...
 
UInt16 FloatToHalfFloat (Float value)
 Convert a given 32bit float value to 16bit ("half float"), represented by a UInt16 integer. More...
 
UInt16 IntToHalfFloat (UInt8 value)
 Convert a given 8bit unsigned integer value to a 16bit floating point value ("half float"), represented by a UInt16 integer. More...
 
Float HalfFloatToFloat (UInt16 value)
 Convert a given 16bit half float value stored in a UInt16 to a 32bit float value. More...
 
UInt8 HalfFloatToInt (UInt16 value)
 Convert a given 16bit half float value stored in a UInt16 to a 8bit unsigned integer value. More...
 
UInt16 FloatToPackedFloat11 (Float value)
 Convert a given 32bit float value to an 11bit packed float, represented by a UInt16 integer. More...
 
Float PackedFloat11ToFloat (UInt16 value)
 Convert a given packed 11bit float value stored in a UInt16 to a 32bit float value. More...
 
UInt16 FloatToPackedFloat10 (Float value)
 Convert a given 32bit float value to an 10bit packed float, represented by a UInt16 integer. More...
 
Float PackedFloat10ToFloat (UInt16 value)
 Convert a given packed 10bit float value stored in a UInt16 to a 32bit float value. More...
 
template<class DataTypeV , class DataTypeT >
DataTypeV Lerp (const DataTypeV &startValue, const DataTypeV &endValue, DataTypeT t)
 The linear interpolation template function. More...
 
template<class DataTypeT >
Double Lerp (Double startValue, Double endValue, DataTypeT t)
 The linear interpolation template function for Double. More...
 
template<class DataTypeV , class DataTypeT >
DataTypeT GetCubicBezierParameter (DataTypeV x0, DataTypeV x1, DataTypeV x2, DataTypeV x3, DataTypeV x)
 Get the cubic bezier parameter t for a given X value. More...
 
template<class DataTypeV , class DataTypeT >
DataTypeV CubicBezier (DataTypeV x0, DataTypeV x1, DataTypeV x2, DataTypeV x3, DataTypeT t)
 Evaluate a cubic bezier curve for a given parameter t. More...
 
template<class DataTypeV >
DataTypeV CubicBezierAt (DataTypeV x0, DataTypeV x1, DataTypeV x2, DataTypeV x3, DataTypeV y0, DataTypeV y1, DataTypeV y2, DataTypeV y3, DataTypeV x)
 Evaluate a cubic bezier curve at a given X value. More...
 
template<class DataType >
Easing< DataType >::Interpolate GetEasingFunction (IEnums::Interpolation interpolation)
 Get the Easing::Interpolate function for a specified interpolation. More...
 
template<class DataType >
DataType Interpolation (IEnums::Interpolation interpolation, DataType x)
 The interpolation template function calculates the IEnums::Interpolation curve (easing function). More...
 

Variables

constexpr Double E
 Definition of e.
 
constexpr Double PI
 Definition of pi.
 
constexpr Double TWO_PI
 Definition of two pi.
 
constexpr Double HALF_PI
 Definition of halve pi.
 
constexpr Double INV_PI
 Definition of inverse pi.
 
constexpr Double INV_TWO_PI
 Definition of inverse 2*pi.
 
constexpr Double INV_HALF_PI
 Definition of inverse pi/2.
 
constexpr Double DEG_TO_RAD
 Definition of degrees to radians factor.
 
constexpr Double RAD_TO_DEG
 Definition of radians to degrees factor.
 
constexpr Double MM_TO_CM
 Definition of millimeters to centimeters factor.
 
constexpr Double CM_TO_MM
 Definition of centimeters to millimeters factor.
 
constexpr Double MM_TO_INCHES
 Definition of millimeters to inches factor.
 
constexpr Double CM_TO_INCHES
 Definition of centimeters to inches factor.
 
constexpr Double INCHES_TO_MM
 Definition of inches to millimeters factor.
 
constexpr Double INCHES_TO_CM
 Definition of inches to centimeters factor.
 

Detailed Description

Namespace containing mathematic related interfaces.


Copyright © 2011-2024 Spraylight GmbH.