Math Library

Detailed Description

Namespaces

 maxon::ParametricTypes
 

Classes

class  UInteger< N >
 
class  UInteger< SIZEOF(UIntegerBase) *8 >
 
class  LinearCongruentialRandom< FLOAT >
 
class  PseudoRandom< FLOAT >
 
struct  SqMat3< V >
 
struct  Mat3< V >
 
struct  SqMat2< V >
 
struct  Mat2< V >
 
struct  SqMat4< V >
 
class  Range< T >
 
struct  IsZeroInitialized< Range< T > >
 
class  TimeValue
 
class  Hours
 
class  Minutes
 
class  Seconds
 
class  Milliseconds
 
class  Microseconds
 
class  Nanoseconds
 
class  LIMIT< T >
 
class  LIMIT< Int64 >
 
class  LIMIT< UInt64 >
 
class  LIMIT< Int32 >
 
class  LIMIT< UInt32 >
 
class  LIMIT< Int16 >
 
class  LIMIT< UInt16 >
 
class  LIMIT< Char >
 
class  LIMIT< UChar >
 
class  LIMIT< Float32 >
 
class  LIMIT< Float64 >
 
struct  Sum< VALUES >
 
struct  Sum< X, Y... >
 
struct  Sum<>
 
struct  Or< T, VALUES >
 
struct  Or< T, X, Y... >
 
struct  Or< T >
 
class  Complex< T >
 
class  MatrixNxM< TYPE >
 
class  MatrixNxMInterface
 
class  ConstMatrixNxMInterface
 
class  Quaternion< ValueType >
 
class  FormulaParseErrorInterface
 
class  FormulaExecutionErrorInterface
 
class  FormulaNumberErrorInterface
 
class  FormulaParserCacheInterface
 
class  FormulaParserInterface
 

Macros

#define MATH_VECTOR
 
#define MATH_COLOR
 
#define MATH_MATRIX
 
#define MATH_SQUAREMATRIX
 
#define MATH_VECTOR2
 
#define MATH_MATRIX2
 
#define MATH_SQUAREMATRIX2
 
#define SIZEOF(x)
 
#define COORDINATESYSTEM_LEFT_HANDED
 

Typedefs

using UIntegerBase = UInt32
 
using NativeUInteger = UInteger< SIZEOF(Int) *8 >
 
using TransformColorDelegate32 = Delegate< Color32(const Color32 &)>
 
using TransformColorDelegate64 = Delegate< Color64(const Color64 &)>
 
using TransformColorDelegate = TransformColorDelegate64
 
using SquareMatrix32 = SqMat3< Vector32 >
 
using SquareMatrix64 = SqMat3< Vector64 >
 
using SquareMatrix = SqMat3< Vector >
 
using Matrix32 = Mat3< Vector32 >
 
using Matrix64 = Mat3< Vector64 >
 
using Matrix = Mat3< Vector >
 
using SquareMatrix2d32 = SqMat2< Vector2d32 >
 
using SquareMatrix2d64 = SqMat2< Vector2d64 >
 
using SquareMatrix2d = SqMat2< Vector2d >
 
using Matrix2d32 = Mat2< Vector2d32 >
 
using Matrix2d64 = Mat2< Vector2d64 >
 
using Matrix2d = Mat2< Vector2d >
 
using SquareMatrix4d32 = SqMat4< Vector4d32 >
 
using SquareMatrix4d64 = SqMat4< Vector4d64 >
 
using SquareMatrix4d = SqMat4< Vector4d >
 
using Vector32 = Vec3< Float32, 1 >
 
using Vector64 = Vec3< Float64, 1 >
 
using Vector = Vec3< Float, 1 >
 
using IntVector32 = Vec3< Int32, 1 >
 
using IntVector64 = Vec3< Int64, 1 >
 
using IntVector = Vec3< Int, 1 >
 
using Color32 = Col3< Float32, 1 >
 
using Color64 = Col3< Float64, 1 >
 
using Color = Col3< Float, 1 >
 
using GenericVector = Vec3< GenericArithmetic, 1 >
 
using Vector2d32 = Vec2< Float32, 1 >
 
using Vector2d64 = Vec2< Float64, 1 >
 
using Vector2d = Vec2< Float, 1 >
 
using IntVector2d32 = Vec2< Int32, 1 >
 
using UIntVector2d32 = Vec2< UInt32, 1 >
 
using IntVector2d64 = Vec2< Int64, 1 >
 
using UIntVector2d64 = Vec2< UInt64, 1 >
 
using IntVector2d = Vec2< Int, 1 >
 
using GenericVector2d = Vec2< GenericArithmetic, 1 >
 
using Vector4d32 = Vec4< Float32, 1 >
 
using Vector4d64 = Vec4< Float64, 1 >
 
using Vector4d = Vec4< Float, 1 >
 
using IntVector4d32 = Vec4< Int32, 1 >
 
using IntVector4d64 = Vec4< Int64, 1 >
 
using IntVector4d = Vec4< Int, 1 >
 
using ColorA32 = Col4< Float32, 1 >
 
using ColorA64 = Col4< Float64, 1 >
 
using ColorA = Col4< Float, 1 >
 
using GenericVector4d = Vec4< GenericArithmetic, 1 >
 

Enumerations

enum  ROTATIONORDER {
  ZXYGLOBAL,
  ZYXGLOBAL,
  YXZGLOBAL,
  YZXGLOBAL,
  XZYGLOBAL,
  XYZGLOBAL,
  YXZLOCAL,
  XYZLOCAL,
  ZXYLOCAL,
  XZYLOCAL,
  YZXLOCAL,
  ZYXLOCAL
}
 
enum  TIMEFORMAT {
  SECONDS,
  FRAMES,
  SMPTE,
  SMPTE_DROPFRAMES
}
 
enum  METRICUNIT {
  NONE,
  KM,
  M,
  CM,
  MM,
  UM,
  NM,
  MILE,
  YARD,
  FEET,
  INCH
}
 
enum  ANGLEUNIT {
  DEGREE,
  RADIANS
}
 

Functions

Int Ctz32 (Int32 x)
 
Int Ctz64 (Int64 x)
 
Int Clz32 (Int32 x)
 
Int Clz64 (Int64 x)
 
template<typename T >
Int Clz (T x)
 
template<typename T >
Int Ctz (T x)
 
Bool CompareFloatTolerant (Float32 a, Float32 b)
 
Bool CompareFloatTolerant (Float64 a, Float64 b)
 
Bool CheckFloat (Float32 r)
 
Bool CheckFloat (Float64 r)
 
Float32 RepairFloat (Float32 r)
 
Float64 RepairFloat (Float64 r)
 
Float32 BoxStep (Float32 lowerLimit, Float32 upperLimit, Float32 x)
 
Float64 BoxStep (Float64 lowerLimit, Float64 upperLimit, Float64 x)
 
Float32 SmoothStep (Float32 lowerLimit, Float32 upperLimit, Float32 x)
 
Float64 SmoothStep (Float64 lowerLimit, Float64 upperLimit, Float64 x)
 
Float32 Modulo (Float32 a, Float32 b)
 
Float64 Modulo (Float64 a, Float64 b)
 
Int32 Modulo (Int32 a, Int32 b)
 
Int64 Modulo (Int64 a, Int64 b)
 
Float32 Bias (Float32 b, Float32 x)
 
Float64 Bias (Float64 b, Float64 x)
 
Float32 Truncate (Float32 x)
 
Float64 Truncate (Float64 x)
 
Bool LessThan (UInt a1, UInt a2, UInt b1, UInt b2)
 
template<typename FLOAT >
Mat3< Vec3< FLOAT > > GetTranslationMatrix (const Vec3< FLOAT > &translation)
 
template<typename FLOAT >
SqMat3< Vec3< FLOAT > > GetScaleMatrix (const Vec3< FLOAT > &scale)
 
template<typename FLOAT >
SqMat3< Vec3< FLOAT > > GetRotationMatrixX (FLOAT angle)
 
template<typename FLOAT >
SqMat3< Vec3< FLOAT > > GetRotationMatrixY (FLOAT angle)
 
template<typename FLOAT >
SqMat3< Vec3< FLOAT > > GetRotationMatrixZ (FLOAT angle)
 
template<typename FLOAT >
Mat2< Vec2< FLOAT > > GetTranslationMatrix (const Vec2< FLOAT > &translation)
 
template<typename FLOAT >
SqMat2< Vec2< FLOAT > > GetScaleMatrix (const Vec2< FLOAT > &scale)
 
template<typename FLOAT >
SqMat2< Vec2< FLOAT > > GetRotationMatrix (FLOAT angle)
 
enum maxon::ROTATIONORDER MAXON_ENUM_LIST (ROTATIONORDER)
 
template<typename FLOAT >
Vec3< FLOAT > GetRotationAngles (const SqMat3< Vec3< FLOAT >> &m, ROTATIONORDER rotationOrder)
 
template<typename FLOAT >
Vec3< FLOAT > GetRotationAngles (const Vec3< FLOAT > &direction, ROTATIONORDER rotationOrder)
 
template<typename FLOAT >
SqMat3< 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 >
void GetRotationAxis (const SqMat3< Vec3< FLOAT >> &m, Vec3< FLOAT > &axisVector, FLOAT &axisRotation)
 
template<typename FLOAT >
SqMat3< Vec3< FLOAT > > GetRotationMatrixFromAxis (const Vec3< FLOAT > &axisVector, FLOAT axisRotation)
 
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)
 
template<typename V , typename V2 >
Mat3< typename MultiplicativePromotion< V, typename V2::ValueType >::type > operator* (const SqMat3< V > &m, const Mat3< V2 > &m2)
 
template<typename V , typename V2 >
Mat2< typename MultiplicativePromotion< V, typename V2::ValueType >::type > operator* (const SqMat2< V > &m, const Mat2< V2 > &m2)
 
template<typename T >
PrivateRangeValueTypeHelper (OverloadRank0)
 
template<typename T >
T::ValueType PrivateRangeValueTypeHelper (OverloadRank1)
 
template<GET_DATATYPE_POLICY POLICY, typename T >
Result< const DataType * > PrivateGetDataType (Range< T > *, OverloadRank0)
 
enum maxon::TIMEFORMAT MAXON_ENUM_LIST (TIMEFORMAT)
 
const TimeValue operator"" _h (long double value)
 
const TimeValue operator"" _min (long double value)
 
const TimeValue operator"" _sec (long double value)
 
const TimeValue operator"" _ms (long double value)
 
const TimeValue operator"" _us (long double value)
 
const TimeValue operator"" _ns (long double value)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Clamp01 (Float32 a)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Clamp01 (Float64 a)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Sin (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Sin (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Cos (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Cos (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Tan (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Tan (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 ATan (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 ATan (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 ATan2 (Float32 valY, Float32 valX)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 ATan2 (Float64 valY, Float64 valX)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Exp (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Exp (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Ln (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Ln (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Log10 (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Log10 (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Log2 (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Log2 (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Sqrt (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Sqrt (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Floor (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Floor (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Ceil (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Ceil (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Round (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Round (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Pow (Float32 v1, Float32 v2)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Pow (Float64 v1, Float64 v2)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Sinh (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Sinh (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Cosh (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Cosh (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Tanh (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Tanh (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 FMod (Float32 v1, Float32 v2)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 FMod (Float64 v1, Float64 v2)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Abs (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Abs (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Inverse (Float32 f)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Inverse (Float64 f)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINE constexpr X Abs (X f)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINE constexpr X Min (X a, X b)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINE constexpr X Max (X a, X b)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINE void Swap (X &a, X &b)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINEClampValue (X value, X lowerLimit, X upperLimit)
 
template<typename X , typename Y >
MAXON_ATTRIBUTE_FORCE_INLINEBlend (const X &value1, const X &value2, Y blendValue)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINESqr (X a, X b)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINESqr (X a)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Gamma (Float32 value, Float32 gamma)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Gamma (Float64 value, Float64 gamma)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Si (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Si (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 Sinc (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 Sinc (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 ASin (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 ASin (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 ACos (Float32 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 ACos (Float64 val)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 DegToRad (Float32 r)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 DegToRad (Float64 r)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float32 RadToDeg (Float32 r)
 
MAXON_ATTRIBUTE_FORCE_INLINE Float64 RadToDeg (Float64 r)
 
MAXON_ATTRIBUTE_FORCE_INLINE void SinCos (Float32 val, Float32 &sn, Float32 &cs)
 
MAXON_ATTRIBUTE_FORCE_INLINE void SinCos (Float64 val, Float64 &sn, Float64 &cs)
 
template<typename DEST >
MAXON_ATTRIBUTE_FORCE_INLINE DEST SafeConvert (Float64 src)
 
template<typename DEST >
MAXON_ATTRIBUTE_FORCE_INLINE DEST SafeConvert (Float32 src)
 
template<typename T >
MAXON_ATTRIBUTE_FORCE_INLINE void SetMax (T &a, const typename SFINAEHelper< T >::type &b)
 
template<typename T >
MAXON_ATTRIBUTE_FORCE_INLINE void SetMin (T &a, const typename SFINAEHelper< T >::type &b)
 
template<typename X >
MAXON_ATTRIBUTE_FORCE_INLINE Int Sign (X f)
 
template<typename T >
MAXON_ATTRIBUTE_FORCE_INLINEMod (T a, T b)
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool IsPowerOfTwo (UInt32 x)
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool IsPowerOfTwo (UInt64 x)
 
enum maxon::METRICUNIT MAXON_ENUM_LIST (METRICUNIT)
 
enum maxon::ANGLEUNIT MAXON_ENUM_LIST (ANGLEUNIT)
 

Variables

const Float64 FRAMERATE_DEFAULT
 
const Float64 FRAMERATE_NTSC
 
const Float64 FRAMERATE_PAL
 
const Float64 FRAMERATE_FILM
 
const Float64 FRAMERATE_FILM_NTSC
 
static const TimeValue TIMEVALUE_INFINITE
 
static const TimeValue TIMEVALUE_INVALID
 
static const Float32 MINVALUE_FLOAT32
 
static const Float32 MAXVALUE_FLOAT32
 
static const Float64 MINVALUE_FLOAT64
 
static const Float64 MAXVALUE_FLOAT64
 
static const Float32 MINVALUE_INT32_FLOAT32
 
static const Float32 MAXVALUE_INT32_FLOAT32
 
static const Float64 MINVALUE_INT64_FLOAT64
 
static const Float64 MAXVALUE_INT64_FLOAT64
 
static const Float32 MINRANGE_FLOAT32
 
static const Float32 MAXRANGE_FLOAT32
 
static const Float64 MINRANGE_FLOAT64
 
static const Float64 MAXRANGE_FLOAT64
 
static const Float MINVALUE_FLOAT
 
static const Float MAXVALUE_FLOAT
 
static const Float MINRANGE_FLOAT
 
static const Float MAXRANGE_FLOAT
 
static const Int NOTOK
 
static const Float64 PI
 
static const Float64 PI_INV
 
static const Float64 PI2
 
static const Float64 PI2_INV
 
static const Float64 PI05
 
static const Float64 SQRT2
 
static const Float64 SQRT_PI2
 
static const Float64 SQRT2_INV
 
static const Float64 SQRT3
 
static const Float64 LOG2
 
class maxon::ParametricTypeInterface MAXON_ENUM_FLAGS_CLASS
 

Macro Definition Documentation

◆ MATH_VECTOR

#define MATH_VECTOR

◆ MATH_COLOR

#define MATH_COLOR

◆ MATH_MATRIX

#define MATH_MATRIX

◆ MATH_SQUAREMATRIX

#define MATH_SQUAREMATRIX

◆ MATH_VECTOR2

#define MATH_VECTOR2

◆ MATH_MATRIX2

#define MATH_MATRIX2

◆ MATH_SQUAREMATRIX2

#define MATH_SQUAREMATRIX2

◆ SIZEOF

#define SIZEOF (   x)

Calculates the size of a datatype or element.

◆ COORDINATESYSTEM_LEFT_HANDED

#define COORDINATESYSTEM_LEFT_HANDED

Major control to define the used coordinate system. So far C4D runs only with left-handed coordinates.

Typedef Documentation

◆ UIntegerBase

◆ NativeUInteger

◆ TransformColorDelegate32

◆ TransformColorDelegate64

◆ TransformColorDelegate

◆ SquareMatrix32

Single-precision 3×3 matrix.

◆ SquareMatrix64

Double-precision 3×3 matrix.

◆ SquareMatrix

3×3 matrix with the precision of Float.

◆ Matrix32

Single-Precision Matrix.

matrix.png

The matrix has a dimension of 4×4 and consists of four rows and four columns. The first row is always "1, 0, 0, 0" and not stored in the class, which means that there are 12 actual numbers used. These numbers are grouped into four vectors, one for the remaining numbers in each column. The four vectors are called off, v1, v2 and v3, together these four vectors can be used to represent the coordinate system. A coordinate system consists of three axes, one for each coordinate (X, Y and Z). The system also has a base position, from which the three axes originate. This base position is stored in off, and the three axis vectors are stored in v1, v2 and v3 respectively. For a rectangular, normalized matrix v3 equals the cross product of v1 and v2 (v1v2). C4D by default uses a left-handed coordinate system (see define COORDINATESYSTEM_LEFT_HANDED).

◆ Matrix64

Double-Precision Matrix.

matrix.png

The matrix has a dimension of 4×4 and consists of four rows and four columns. The first row is always "1, 0, 0, 0" and not stored in the class, which means that there are 12 actual numbers used. These numbers are grouped into four vectors, one for the remaining numbers in each column. The four vectors are called off, v1, v2 and v3, together these four vectors can be used to represent the coordinate system. A coordinate system consists of three axes, one for each coordinate (X, Y and Z). The system also has a base position, from which the three axes originate. This base position is stored in off, and the three axis vectors are stored in v1, v2 and v3 respectively. For a rectangular, normalized matrix v3 equals the cross product of v1 and v2 (v1v2). C4D by default uses a left-handed coordinate system (see define COORDINATESYSTEM_LEFT_HANDED).

◆ Matrix

using Matrix = Mat3<Vector>

Matrix with the precision of Float.

matrix.png

The matrix has a dimension of 4×4 and consists of four rows and four columns. The first row is always "1, 0, 0, 0" and not stored in the class, which means that there are 12 actual numbers used. These numbers are grouped into four vectors, one for the remaining numbers in each column. The four vectors are called off, v1, v2 and v3, together these four vectors can be used to represent the coordinate system. A coordinate system consists of three axes, one for each coordinate (X, Y and Z). The system also has a base position, from which the three axes originate. This base position is stored in off, and the three axis vectors are stored in v1, v2 and v3 respectively. For a rectangular, normalized matrix v3 equals the cross product of v1 and v2 (v1v2). C4D by default uses a left-handed coordinate system (see define COORDINATESYSTEM_LEFT_HANDED).

◆ SquareMatrix2d32

Single-precision 2×2 matrix.

◆ SquareMatrix2d64

Double-precision 2×2 matrix.

◆ SquareMatrix2d

2×2 matrix with the precision of Float.

◆ Matrix2d32

Single-Precision Matrix. The matrix has a dimension of 3×3 and consists of three rows and three columns. The first row is always "1, 0, 0" and not stored in the class, which means that there are 6 actual numbers used. These numbers are grouped into three vectors, one for the remaining numbers in each column. The three vectors are called off, v1 and v2, together these three vectors can be used to represent the coordinate system. A coordinate system consists of two axes, one for each coordinate (X and Y). The system also has a base position, from which the two axes originate. This base position is stored in off, and the two axis vectors are stored in v1 and v2 respectively

◆ Matrix2d64

Double-Precision Matrix. The matrix has a dimension of 3×3 and consists of three rows and three columns. The first row is always "1, 0, 0" and not stored in the class, which means that there are 6 actual numbers used. These numbers are grouped into three vectors, one for the remaining numbers in each column. The three vectors are called off, v1 and v2, together these three vectors can be used to represent the coordinate system. A coordinate system consists of two axes, one for each coordinate (X and Y). The system also has a base position, from which the two axes originate. This base position is stored in off, and the two axis vectors are stored in v1 and v2 respectively

◆ Matrix2d

Matrix with the precision of Float. The matrix has a dimension of 3×3 and consists of three rows and three columns. The first row is always "1, 0, 0" and not stored in the class, which means that there are 6 actual numbers used. These numbers are grouped into three vectors, one for the remaining numbers in each column. The three vectors are called off, v1 and v2, together these three vectors can be used to represent the coordinate system. A coordinate system consists of two axes, one for each coordinate (X and Y). The system also has a base position, from which the two axes originate. This base position is stored in off, and the two axis vectors are stored in v1 and v2 respectively

◆ SquareMatrix4d32

Single-Precision Matrix.

◆ SquareMatrix4d64

Double-Precision Matrix.

◆ SquareMatrix4d

Matrix with the precision of Float.

◆ Vector32

using Vector32 = Vec3<Float32, 1>

Single-Precision Vector. A vector contains three components X, Y and Z

◆ Vector64

using Vector64 = Vec3<Float64, 1>

Double-Precision Vector. A vector contains three components X, Y and Z

◆ Vector

using Vector = Vec3<Float, 1>

Vector with the precision of Float. A vector contains three components X, Y and Z

◆ IntVector32

using IntVector32 = Vec3<Int32, 1>

32-bit Int Vector. A vector contains three components X, Y and Z

◆ IntVector64

using IntVector64 = Vec3<Int64, 1>

64-bit Int Vector. A vector contains three components X, Y and Z

◆ IntVector

using IntVector = Vec3<Int, 1>

Vector of Int. A vector contains three components X, Y and Z

◆ Color32

using Color32 = Col3<Float32, 1>

Single-Precision Color. A color contains three components R, G and B

◆ Color64

using Color64 = Col3<Float64, 1>

Double-Precision Color. A color contains three components R, G and B

◆ Color

using Color = Col3<Float, 1>

Color with the precision of Float. A color contains three components R, G and B

◆ GenericVector

Generic arithmetic vector type.

◆ Vector2d32

using Vector2d32 = Vec2<Float32, 1>

Single-Precision Vector. A vector contains two components X and Y

◆ Vector2d64

using Vector2d64 = Vec2<Float64, 1>

Double-Precision Vector. A vector contains two components X and Y

◆ Vector2d

using Vector2d = Vec2<Float, 1>

Vector with the precision of Float. A vector contains two components X and Y

◆ IntVector2d32

using IntVector2d32 = Vec2<Int32, 1>

32-bit Int Vector. A vector contains three components X, Y and Z

◆ UIntVector2d32

using UIntVector2d32 = Vec2<UInt32, 1>

32-bit UInt Vector. A vector contains three components X, Y and Z

◆ IntVector2d64

using IntVector2d64 = Vec2<Int64, 1>

64-bit Int Vector. A vector contains three components X, Y and Z

◆ UIntVector2d64

using UIntVector2d64 = Vec2<UInt64, 1>

64-bit UInt Vector. A vector contains three components X, Y and Z

◆ IntVector2d

using IntVector2d = Vec2<Int, 1>

Vector of Int. A vector contains three components X, Y and Z

◆ GenericVector2d

Generic arithmetic vector type.

◆ Vector4d32

using Vector4d32 = Vec4<Float32, 1>

Single-Precision Vector. A vector contains three components X, Y, Z and W

◆ Vector4d64

using Vector4d64 = Vec4<Float64, 1>

Double-Precision Vector. A vector contains three components X, Y, Z and W

◆ Vector4d

using Vector4d = Vec4<Float, 1>

Vector with the precision of Float. A vector contains four components X, Y, Z and W

◆ IntVector4d32

using IntVector4d32 = Vec4<Int32, 1>

32-bit Int Vector. A vector contains four components X, Y, Z and W

◆ IntVector4d64

using IntVector4d64 = Vec4<Int64, 1>

64-bit Int Vector. A vector contains four components X, Y, Z and W

◆ IntVector4d

using IntVector4d = Vec4<Int, 1>

Vector of Int. A vector contains four components X, Y, Z and W

◆ ColorA32

using ColorA32 = Col4<Float32, 1>

Single-Precision Color with Alpha. A color contains three components R, G, B and A

◆ ColorA64

using ColorA64 = Col4<Float64, 1>

Double-Precision Color with Alpha. A color contains three components R, G, B and A

◆ ColorA

using ColorA = Col4<Float, 1>

Color with Alpha with the precision of Float. A color contains four components R, G, B and A

◆ GenericVector4d

Generic arithmetic vector type.

Enumeration Type Documentation

◆ ROTATIONORDER

enum ROTATIONORDER
strong

Defines in which order rotations are executed. Global means that the rotation will always be done around the world axes. Local means that the rotation will always be done around an already rotated axis of an axis system. For each global rotation there is a local counterpart and vice versa. All rotations are done so that a positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

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

◆ TIMEFORMAT

enum TIMEFORMAT
strong

format in which time values are displayed

Enumerator
SECONDS 

display time in seconds

FRAMES 

display time as a frame number

SMPTE 

display time as SMPTE time code

SMPTE_DROPFRAMES 

display clock time as SMPTE time code (see here for information on drop frames)

◆ METRICUNIT

enum METRICUNIT
strong

Metric unit.

Enumerator
NONE 

No metric unit.

KM 

kilometer

meter

CM 

centimeter

MM 

millimeter

UM 

micrometer

NM 

nanometer

MILE 

mile (1.609344 km)

YARD 

yard (91.44 cm)

FEET 

feet (30.48 cm)

INCH 

inch (2.54 cm)

◆ ANGLEUNIT

enum ANGLEUNIT
strong

Angle unit.

Enumerator
DEGREE 

trigonometric functions expect degree values

RADIANS 

trigonometric functions expect radians values

Function Documentation

◆ Ctz32()

Int maxon::Ctz32 ( Int32  x)

◆ Ctz64()

Int maxon::Ctz64 ( Int64  x)

◆ Clz32()

Int maxon::Clz32 ( Int32  x)

◆ Clz64()

Int maxon::Clz64 ( Int64  x)

◆ Clz()

Int maxon::Clz ( x)

Counts the number of leading zero bits of x. If x is zero, the bit width of T is returned. Note that the result depends on the bit width, i.e., Clz((Int16) 0xff) will return 8, while Clz((Int32) 0xff) will return 24.

Parameters
[in]xValue of which leading zero bits shall be counted.
Template Parameters
TType of x, this has to be an integral type.
Returns
Number of leading zero bits of x.

◆ Ctz()

Int maxon::Ctz ( x)

Counts the number of trailing zero bits of x. If x is zero, the 0 is returned.

Parameters
[in]xValue of which trailing zero bits shall be counted.
Template Parameters
TType of x, this has to be an integral type.
Returns
Number of trailing zero bits of x.

◆ CompareFloatTolerant() [1/2]

Bool maxon::CompareFloatTolerant ( Float32  a,
Float32  b 
)

Compare two floating point values.

Returns
The result is true if the values are identical or nearly identical (the last 3 bits may be different)

◆ CompareFloatTolerant() [2/2]

Bool maxon::CompareFloatTolerant ( Float64  a,
Float64  b 
)

Compare two floating point values.

Returns
The result is true if the values are identical or nearly identical (the last 3 bits may be different)

◆ CheckFloat() [1/2]

Bool maxon::CheckFloat ( Float32  r)

Tests if a floating point number is valid.

Returns
True for FP_NORMAL, FP_SUBNORMAL, FP_ZERO and false for FP_NAN, FP_INFINITE.

◆ CheckFloat() [2/2]

Bool maxon::CheckFloat ( Float64  r)

Tests if a floating point number is valid.

Returns
True for FP_NORMAL, FP_SUBNORMAL, FP_ZERO and false for FP_NAN, FP_INFINITE.

◆ RepairFloat() [1/2]

Float32 maxon::RepairFloat ( Float32  r)

Repair floating point number. Only NANs and Infinity are corrected - denormalized numbers stay unchanged

◆ RepairFloat() [2/2]

Float64 maxon::RepairFloat ( Float64  r)

Repair floating point number. Only NANs and Infinity are corrected - denormalized numbers stay unchanged

◆ BoxStep() [1/2]

Float32 maxon::BoxStep ( Float32  lowerLimit,
Float32  upperLimit,
Float32  x 
)

calculates the relative position of x in the range [lowerLimit..upperLimit]. if x <= lowerLimit the return value is 0.0, if x >= upperLimit it is 1.0, otherwise the relative position: (x - lowerLimit) / (upperLimit - lowerLimit)

◆ BoxStep() [2/2]

Float64 maxon::BoxStep ( Float64  lowerLimit,
Float64  upperLimit,
Float64  x 
)

calculates the relative position of x in the range [lowerLimit..upperLimit]. if x <= lowerLimit the return value is 0.0, if x >= upperLimit it is 1.0, otherwise the relative position: (x - lowerLimit) / (upperLimit - lowerLimit)

◆ SmoothStep() [1/2]

Float32 maxon::SmoothStep ( Float32  lowerLimit,
Float32  upperLimit,
Float32  x 
)

identical to Boxstep, but with a soft curve instead of linear behaviour in the range of [lowerLimit..upperLimit].

◆ SmoothStep() [2/2]

Float64 maxon::SmoothStep ( Float64  lowerLimit,
Float64  upperLimit,
Float64  x 
)

identical to Boxstep, but with a soft curve instead of linear behaviour in the range of [lowerLimit..upperLimit].

◆ Modulo() [1/4]

Float32 maxon::Modulo ( Float32  a,
Float32  b 
)

Calculates the modulo of two floating point values. If the first value is positive, it behaves like a regular C++ modulo. Below zero the results are different though as the modulo continues to operate like in the positive domain: e.g. -1 % 7 = 6 or -8 % 7 = 6.

Parameters
[in]aPositive or negative value.
[in]bThis value must be positive, otherwise the return value will be zero.

◆ Modulo() [2/4]

Float64 maxon::Modulo ( Float64  a,
Float64  b 
)

Calculates the modulo of two floating point values. If the first value is positive, it behaves like a regular C++ modulo. Below zero the results are different though as the modulo continues to operate like in the positive domain: e.g. -1 % 7 = 6 or -8 % 7 = 6.

Parameters
[in]aPositive or negative value.
[in]bThis value must be positive, otherwise the return value will be zero.

◆ Modulo() [3/4]

Int32 maxon::Modulo ( Int32  a,
Int32  b 
)

Calculates the modulo of two integer values. If the first value is positive, it behaves like a regular C++ modulo. Below zero the results are different though as the modulo continues to operate like in the positive domain: e.g. -1 % 7 = 6 or -8 % 7 = 6.

Parameters
[in]aPositive or negative value.
[in]bThis value must be positive, otherwise the return value will be zero.

◆ Modulo() [4/4]

Int64 maxon::Modulo ( Int64  a,
Int64  b 
)

Calculates the modulo of two integer values. If the first value is positive, it behaves like a regular C++ modulo. Below zero the results are different though as the modulo continues to operate like in the positive domain: e.g. -1 % 7 = 6 or -8 % 7 = 6.

Parameters
[in]aPositive or negative value.
[in]bThis value must be positive, otherwise the return value will be zero.

◆ Bias() [1/2]

Float32 maxon::Bias ( Float32  b,
Float32  x 
)

calculates x ^ log2(b). b must be > 0.0

◆ Bias() [2/2]

Float64 maxon::Bias ( Float64  b,
Float64  x 
)

calculates x ^ log2(b) b must be > 0.0

◆ Truncate() [1/2]

Float32 maxon::Truncate ( Float32  x)

returns Floor for positive values and zero or Ceil for negative values

◆ Truncate() [2/2]

Float64 maxon::Truncate ( Float64  x)

returns Floor for positive values and zero or Ceil for negative values

◆ LessThan()

Bool maxon::LessThan ( UInt  a1,
UInt  a2,
UInt  b1,
UInt  b2 
)

Returns true if a1*a2 is less than b1*b2. The products and the comparison are carried out with the double bit width of Int so that no overflow occurs.

Parameters
[in]a1First factor of first comparison operand.
[in]a2Second factor of first comparison operand.
[in]b1First factor of second comparison operand.
[in]b2Second factor of second comparison operand.
Returns
True if a1*a2 < b1*b2.

◆ GetTranslationMatrix() [1/2]

Mat3<Vec3<FLOAT> > maxon::GetTranslationMatrix ( const Vec3< FLOAT > &  translation)

Calculates a matrix to move / translate.

◆ GetScaleMatrix() [1/2]

SqMat3<Vec3<FLOAT> > maxon::GetScaleMatrix ( const Vec3< FLOAT > &  scale)

Calculates a matrix to scale.

◆ GetRotationMatrixX()

SqMat3<Vec3<FLOAT> > maxon::GetRotationMatrixX ( FLOAT  angle)

Calculates a matrix to rotate around the X axis. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

◆ GetRotationMatrixY()

SqMat3<Vec3<FLOAT> > maxon::GetRotationMatrixY ( FLOAT  angle)

Calculates a matrix to rotate around the Y axis. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

◆ GetRotationMatrixZ()

SqMat3<Vec3<FLOAT> > maxon::GetRotationMatrixZ ( FLOAT  angle)

Calculates a matrix to rotate around the Z axis. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

◆ GetTranslationMatrix() [2/2]

Mat2<Vec2<FLOAT> > maxon::GetTranslationMatrix ( const Vec2< FLOAT > &  translation)

Calculates a matrix to move / translate.

◆ GetScaleMatrix() [2/2]

SqMat2<Vec2<FLOAT> > maxon::GetScaleMatrix ( const Vec2< FLOAT > &  scale)

Calculates a matrix to scale.

◆ GetRotationMatrix() [1/2]

SqMat2<Vec2<FLOAT> > maxon::GetRotationMatrix ( FLOAT  angle)

Calculates a rotation matrix. A positive angle rotates counter-clockwise. Note that the 2d rotation is different from the GetRotationMatrixZ rotation in 3d - the latter one rotates looking onto the axis, thus clockwise if you look from the front.

◆ MAXON_ENUM_LIST() [1/4]

enum maxon::ROTATIONORDER maxon::MAXON_ENUM_LIST ( ROTATIONORDER  )

◆ GetRotationAngles() [1/2]

Vec3<FLOAT> maxon::GetRotationAngles ( const SqMat3< Vec3< FLOAT >> &  m,
ROTATIONORDER  rotationOrder 
)

Calculates rotation values of a matrix.

Parameters
[in]mMatrix. The axes do not need to be normalized, but should be perpendicular. The 'offset' component has no influence on the outcome.
[in]rotationOrderRotation order in which the rotations shall be executed.
Returns
Calculated rotation values, which can be used to re-create the matrix again using GetRotationMatrix. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

◆ GetRotationAngles() [2/2]

Vec3<FLOAT> maxon::GetRotationAngles ( const Vec3< FLOAT > &  direction,
ROTATIONORDER  rotationOrder 
)

Calculates a rotation from a given direction vector.

Parameters
[in]directionDirection vector, does not need to be normalized. The direction vector defines the first rotation axis of any (global) rotation order. So, e.g. for ROTATIONORDER::XYZGLOBAL 'direction' defines the +X direction.
[in]rotationOrderRotation order in which the rotations shall be executed.
Returns
Rotation that can be transformed into a matrix using GetRotationMatrix. The first rotation axis (according to the rotation order) will be parallel to 'direction' (e.g. for ROTATIONORDER::XYZGLOBAL this is the +X axis).

◆ GetRotationMatrix() [2/2]

SqMat3<Vec3<FLOAT> > maxon::GetRotationMatrix ( const Vec3< FLOAT > &  rotation,
ROTATIONORDER  rotationOrder 
)

Constructs a rotation matrix from a given rotation. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

Parameters
[in]rotationRotation value that is interpreted depending on the rotation order.
[in]rotationOrderRotation order in which the rotations shall be executed.
Returns
A matrix with normalized, perpendicular vectors and offset 0.0.

◆ GetPSRMatrix()

Mat3<Vec3<FLOAT> > maxon::GetPSRMatrix ( const Vec3< FLOAT > &  position,
const Vec3< FLOAT > &  scale,
const Vec3< FLOAT > &  rotation,
ROTATIONORDER  rotationOrder 
)

Constructs a matrix from a given position, scale and rotation. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

Parameters
[in]positionTranslation value (offset of the resulting matrix).
[in]scaleScale value (length of the resulting axes).
[in]rotationRotation value that is interpreted depending on the rotation order.
[in]rotationOrderRotation order in which the rotations shall be executed.
Returns
A matrix with normalized, perpendicular vectors and offset 0.0.

◆ GetOptimumRotation()

Vec3<FLOAT> maxon::GetOptimumRotation ( const Vec3< FLOAT > &  oldRotation,
const Vec3< FLOAT > &  newRotation,
ROTATIONORDER  rotationOrder 
)

Corrects a new rotational value to match an old one as close as possible. This will avoid singularity effects (sudden 'flips' when a rotation jumps from 360 to 0 degrees).

Parameters
[in]oldRotationLast rotation value.
[in]newRotationNew rotation value that needs to be corrected.
[in]rotationOrderRotation order in which the rotations shall be executed.
Returns
The rotation value that is closest to oldRotation, but creates the same matrix.

◆ GetClosestPointOnLine()

Vec3<FLOAT> maxon::GetClosestPointOnLine ( const Vec3< FLOAT > &  lineOrigin,
const Vec3< FLOAT > &  lineDirection,
const Vec3< FLOAT > &  point 
)

Calculates the closest point on a line.

Parameters
[in]lineOriginThe starting point of the line.
[in]lineDirectionThe direction vector of the line (does not need to be normalized)
[in]pointThe point.
Returns
The closest point on the line (with the minimum distance to the given point). If lineDirection was a null vector, the result will be lineOrigin.

◆ GetPointLineDistance()

FLOAT maxon::GetPointLineDistance ( const Vec3< FLOAT > &  lineOrigin,
const Vec3< FLOAT > &  lineDirection,
const Vec3< FLOAT > &  point 
)

Calculates the distance of a point and a line.

Parameters
[in]lineOriginThe starting point of the line.
[in]lineDirectionThe direction vector of the line (does not need to be normalized)
[in]pointThe point.
Returns
The minimum distance of the given line and point. If lineDirection was a null vector, the result will be 0.0.

◆ ReflectRay()

Vec3<FLOAT> maxon::ReflectRay ( const Vec3< FLOAT > &  direction,
const Vec3< FLOAT > &  normal 
)

Reflects a ray on a surface.

Parameters
[in]directionThe direction of the ray, must be normalized.
[in]normalSurface normal, must be normalized.
Returns
The reflected ray, which is also normalized.

◆ RGBToHSV()

Vec3<FLOAT> maxon::RGBToHSV ( const Col3< FLOAT > &  color)

Converts RGB into HSV color space.

Parameters
[in]colorThe RGB color (with r/g/b >= 0.0)
Returns
The HSV (hue, saturation, value) color.

◆ HSVToRGB()

Col3<FLOAT> maxon::HSVToRGB ( const Vec3< FLOAT > &  color)

Converts HSV into RGB color space.

Parameters
[in]colorThe HSV (hue, saturation, value) color (with h/s/v >= 0.0)
Returns
The RGB color.

◆ GetRotationAxis()

void maxon::GetRotationAxis ( const SqMat3< Vec3< FLOAT >> &  m,
Vec3< FLOAT > &  axisVector,
FLOAT &  axisRotation 
)

Calculates axis and rotation from a matrix. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

Parameters
[in]mMatrix with perpendicular vectors. Its vectors do not need to be normalized.
[out]axisVectorThe calculated axis (normalized vector)
[out]axisRotationThe calculated rotation. If the matrix was singular a null vector will be returned for axisVector.

◆ GetRotationMatrixFromAxis()

SqMat3<Vec3<FLOAT> > maxon::GetRotationMatrixFromAxis ( const Vec3< FLOAT > &  axisVector,
FLOAT  axisRotation 
)

Calculates matrix from axis and rotation. A positive angle rotates counter-clockwise (when the rotation axis is facing towards the viewer).

Parameters
[in]axisVectorAxis vector, does not need to be normalized.
[in]axisRotationThe rotation.
Returns
The calculated matrix (perpendicular & normalized vectors). If the passed axis was a null vector an identity matrix will be returned.

◆ GetSum()

MAXON_ATTRIBUTE_FORCE_INLINE std::remove_reference<ITERABLETYPE>::type::ValueType maxon::GetSum ( ITERABLETYPE &&  array)

Returns the sum of all elements.

◆ GetAverage()

MAXON_ATTRIBUTE_FORCE_INLINE std::remove_reference<ITERABLETYPE>::type::ValueType maxon::GetAverage ( ITERABLETYPE &&  array)

Returns the average of all elements.

◆ operator*() [1/2]

Mat3<typename MultiplicativePromotion<V, typename V2::ValueType>::type> maxon::operator* ( const SqMat3< V > &  m,
const Mat3< V2 > &  m2 
)

Multiplies two matrices. The rule is m1 AFTER m2 If you transform a point with the result matrix this is identical to first transforming with m2 and then with m1

◆ operator*() [2/2]

Mat2<typename MultiplicativePromotion<V, typename V2::ValueType>::type> maxon::operator* ( const SqMat2< V > &  m,
const Mat2< V2 > &  m2 
)

Multiplies two matrices. The rule is m1 AFTER m2 If you transform a point with the result matrix this is identical to first transforming with m2 and then with m1

◆ PrivateRangeValueTypeHelper() [1/2]

T maxon::PrivateRangeValueTypeHelper ( OverloadRank0  )

◆ PrivateRangeValueTypeHelper() [2/2]

T::ValueType maxon::PrivateRangeValueTypeHelper ( OverloadRank1  )

◆ PrivateGetDataType()

Result<const DataType*> maxon::PrivateGetDataType ( Range< T > *  ,
OverloadRank0   
)

◆ MAXON_ENUM_LIST() [2/4]

enum maxon::TIMEFORMAT maxon::MAXON_ENUM_LIST ( TIMEFORMAT  )

◆ operator"" _h()

const TimeValue maxon::operator"" _h ( long double  value)

Literal to allow definition of hours.

◆ operator"" _min()

const TimeValue maxon::operator"" _min ( long double  value)

Literal to allow definition of minutes.

◆ operator"" _sec()

const TimeValue maxon::operator"" _sec ( long double  value)

Literal to allow definition of seconds.

◆ operator"" _ms()

const TimeValue maxon::operator"" _ms ( long double  value)

Literal to allow definition of milliseconds.

◆ operator"" _us()

const TimeValue maxon::operator"" _us ( long double  value)

Literal to allow definition of microseconds.

◆ operator"" _ns()

const TimeValue maxon::operator"" _ns ( long double  value)

Literal to allow definition of nanoseconds.

◆ Clamp01() [1/2]

Clip a floating point number against the lower limit 0 and the upper limit 1. The result will be returned.

◆ Clamp01() [2/2]

Clip a floating point number against the lower limit 0 and the upper limit 1. The result will be returned.

◆ Sin() [1/2]

Calculates the sine of a value.

◆ Sin() [2/2]

Calculates the sine of a value.

◆ Cos() [1/2]

Calculates the cosine of a value.

◆ Cos() [2/2]

Calculates the cosine of a value.

◆ Tan() [1/2]

Calculates the tangent of a value. Note that the input needs to be checked for proper range, so that no exceptions will be generated.

◆ Tan() [2/2]

Calculates the tangent of a value. Note that the input needs to be checked for proper range, so that no exceptions will be generated.

◆ ATan() [1/2]

Calculates the arcustangens of a value.

◆ ATan() [2/2]

Calculates the arcustangens of a value.

◆ ATan2() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float32 maxon::ATan2 ( Float32  valY,
Float32  valX 
)

Calculates the arcustangens2 of a value. Returns the principal value of the arc tangent of y/x, expressed in radians. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant. If x is zero, depending on the sign of y +/- PI05 is returned. If x and y are both zero the function returns zero.

◆ ATan2() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float64 maxon::ATan2 ( Float64  valY,
Float64  valX 
)

Calculates the arcustangens2 of a value. Returns the principal value of the arc tangent of y/x, expressed in radians. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant. If x is zero, depending on the sign of y +/- PI05 is returned. If x and y are both zero the function returns zero.

◆ Exp() [1/2]

Calculates e^value.

◆ Exp() [2/2]

Calculates e^value.

◆ Ln() [1/2]

Calculates logarithm of a value. Note that the input needs to be positive, so that no exceptions will be generated.

◆ Ln() [2/2]

Calculates logarithm of a value. Note that the input needs to be positive, so that no exceptions will be generated.

◆ Log10() [1/2]

Calculates logarithm with base 10 of a value. Note that the input needs to be positive, so that no exceptions will be generated.

◆ Log10() [2/2]

Calculates logarithm with base 10 of a value. Note that the input needs to be positive, so that no exceptions will be generated.

◆ Log2() [1/2]

Calculates logarithm with base 2 of a value. Note that the input needs to be positive, so that no exceptions will be generated.

◆ Log2() [2/2]

Calculates logarithm with base 2 of a value. Note that the input needs to be positive, so that no exceptions will be generated.

◆ Sqrt() [1/2]

Calculates square root of a value. Note that the input must not be be negative, so that no exceptions will be generated.

◆ Sqrt() [2/2]

Calculates square root of a value. Note that the input must not be be negative, so that no exceptions will be generated.

◆ Floor() [1/2]

Rounds to the largest previous integer number.

◆ Floor() [2/2]

Rounds to the largest previous integer number.

◆ Ceil() [1/2]

Rounds to the smallest following integer number.

◆ Ceil() [2/2]

Rounds to the smallest following integer number.

◆ Round() [1/2]

Rounds to the nearest integer number.

◆ Round() [2/2]

Rounds to the nearest integer number.

◆ Pow() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float32 maxon::Pow ( Float32  v1,
Float32  v2 
)

Calculates v1^v2.

◆ Pow() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float64 maxon::Pow ( Float64  v1,
Float64  v2 
)

Calculates v1^v2.

◆ Sinh() [1/2]

Calculates hyperbolic sine.

◆ Sinh() [2/2]

Calculates hyperbolic sine.

◆ Cosh() [1/2]

Calculates hyperbolic cosine.

◆ Cosh() [2/2]

Calculates hyperbolic cosine.

◆ Tanh() [1/2]

Calculates hyperbolic tangent.

◆ Tanh() [2/2]

Calculates hyperbolic tangent.

◆ FMod() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float32 maxon::FMod ( Float32  v1,
Float32  v2 
)

Calculates floating point modulo.

◆ FMod() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float64 maxon::FMod ( Float64  v1,
Float64  v2 
)

Calculates floating point modulo.

◆ Abs() [1/3]

Calculates the absolute value of a floating point number.

◆ Abs() [2/3]

Calculates the absolute value of a floating point number.

◆ Inverse() [1/2]

Calculates the reciprocal value (multiplicative inverse). If the input value is zero, zero will be returned for safety to avoid exceptions.

◆ Inverse() [2/2]

Calculates the reciprocal value (multiplicative inverse). If the input value is zero, zero will be returned for safety to avoid exceptions.

◆ Abs() [3/3]

MAXON_ATTRIBUTE_FORCE_INLINE constexpr X maxon::Abs ( f)

Calculates the absolute value of any data type.

◆ Min()

MAXON_ATTRIBUTE_FORCE_INLINE constexpr X maxon::Min ( a,
b 
)

Calculates the minimum of two values and return it.

◆ Max()

MAXON_ATTRIBUTE_FORCE_INLINE constexpr X maxon::Max ( a,
b 
)

Calculates the maximum of two values and return it.

◆ Swap()

MAXON_ATTRIBUTE_FORCE_INLINE void maxon::Swap ( X &  a,
X &  b 
)

Swaps two values. If available, move semantics will be used.

◆ ClampValue()

MAXON_ATTRIBUTE_FORCE_INLINE X maxon::ClampValue ( value,
lowerLimit,
upperLimit 
)

Clips a value against a lower and upper limit. The new value is returned.

◆ Blend()

MAXON_ATTRIBUTE_FORCE_INLINE X maxon::Blend ( const X &  value1,
const X &  value2,
blendValue 
)

Blends two values. If blendValue is 0.0 value1 is returned, if blendValue is 1.0 value2 is returned. No clipping below 0.0 or 1.0 takes place (in that case use BoxStep).

◆ Sqr() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE X maxon::Sqr ( a,
b 
)

Calculates square difference of two values.

◆ Sqr() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE X maxon::Sqr ( a)

Calculates square of a value.

◆ Gamma() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float32 maxon::Gamma ( Float32  value,
Float32  gamma 
)

Calculates the gamma correction. The input value is clipped to [0.0, 1.0] for safety to avoid exceptions.

◆ Gamma() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE Float64 maxon::Gamma ( Float64  value,
Float64  gamma 
)

Calculates the gamma correction. The input value is clipped to [0.0, 1.0] for safety to avoid exceptions.

◆ Si() [1/2]

Calculates si (the unnormalized sinc function). The input value is checked for 0 to avoid exceptions.

◆ Si() [2/2]

Calculates si (the unnormalized sinc function). The input value is checked for 0 to avoid exceptions.

◆ Sinc() [1/2]

Calculates sinc. The input value is checked for 0 to avoid exceptions.

◆ Sinc() [2/2]

Calculates sinc. The input value is checked for 0 to avoid exceptions.

◆ ASin() [1/2]

Calculates arcsine. The input value is clipped for safety to avoid exceptions.

◆ ASin() [2/2]

Calculates arcsine. The input value is clipped for safety to avoid exceptions. {reflection="net.maxon.ASin"}

◆ ACos() [1/2]

Calculates arccosine. The input value is clipped for safety to avoid exceptions.

◆ ACos() [2/2]

Calculates arccosine. The input value is clipped for safety to avoid exceptions.

◆ DegToRad() [1/2]

Converts float value from degrees to radians.

◆ DegToRad() [2/2]

Converts float value from degrees to radians.

◆ RadToDeg() [1/2]

Converts float value from radians to degrees.

◆ RadToDeg() [2/2]

Converts float value from radians to degrees.

◆ SinCos() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE void maxon::SinCos ( Float32  val,
Float32 sn,
Float32 cs 
)

Calculates both sine and cosine of a value.

◆ SinCos() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE void maxon::SinCos ( Float64  val,
Float64 sn,
Float64 cs 
)

Calculates both sine and cosine of a value.

◆ SafeConvert() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE DEST maxon::SafeConvert ( Float64  src)

Safely converts a 64 bit float value into another scalar value. The resulting value will be clipped against its boundaries, without raising an exception.

◆ SafeConvert() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE DEST maxon::SafeConvert ( Float32  src)

Safely converts a 32 bit float value into another scalar value. The resulting value will be clipped against its boundaries, without raising an exception.

◆ SetMax()

MAXON_ATTRIBUTE_FORCE_INLINE void maxon::SetMax ( T &  a,
const typename SFINAEHelper< T >::type &  b 
)

Assigns the maximum of two values to the first value.

Parameters
[in,out]aFirst value.
[in]bSecond value.

◆ SetMin()

MAXON_ATTRIBUTE_FORCE_INLINE void maxon::SetMin ( T &  a,
const typename SFINAEHelper< T >::type &  b 
)

Assigns the minimum of two values to the first value.

Parameters
[in,out]aFirst value.
[in]bSecond value.

◆ Sign()

MAXON_ATTRIBUTE_FORCE_INLINE Int maxon::Sign ( f)

Calculates the sign of a value.

Parameters
[in]fValue to test.
Returns
1 if the value is 0 or positive, -1 otherwise.

◆ Mod()

MAXON_ATTRIBUTE_FORCE_INLINE T maxon::Mod ( a,
b 
)

Calculates the modulo (non-negative remainder of division) value for integer values. It works continuously for negative dividends, e.g. Mod(-1, 9) == 8 and Mod(1, 9) == 1.

Parameters
[in]aDividend.
[in]bDivisor, must be > 0 (positive).
Returns
Modulo result.

◆ IsPowerOfTwo() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsPowerOfTwo ( UInt32  x)

Returns true if x is a power of two, i.e., if it has exactly one bit set.

Parameters
[in]xValue to check.
Returns
True if x is a power of two.

◆ IsPowerOfTwo() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsPowerOfTwo ( UInt64  x)

Returns true if x is a power of two, i.e., if it has exactly one bit set.

Parameters
[in]xValue to check.
Returns
True if x is a power of two.

◆ MAXON_ENUM_LIST() [3/4]

enum maxon::METRICUNIT maxon::MAXON_ENUM_LIST ( METRICUNIT  )

◆ MAXON_ENUM_LIST() [4/4]

enum maxon::ANGLEUNIT maxon::MAXON_ENUM_LIST ( ANGLEUNIT  )

Variable Documentation

◆ FRAMERATE_DEFAULT

const Float64 FRAMERATE_DEFAULT

Default frame rate of 30 fps.

◆ FRAMERATE_NTSC

const Float64 FRAMERATE_NTSC

NTSC frame rate is approximately 29.97 fps.

◆ FRAMERATE_PAL

const Float64 FRAMERATE_PAL

PAL frame rate is 25 fps.

◆ FRAMERATE_FILM

const Float64 FRAMERATE_FILM

Movie frame rate is 24 fps.

◆ FRAMERATE_FILM_NTSC

const Float64 FRAMERATE_FILM_NTSC

Modified movie frame rate to avoid frame roll when transfering video to NTSC, approx. 23.976 fps.

◆ TIMEVALUE_INFINITE

const TimeValue TIMEVALUE_INFINITE
static

◆ TIMEVALUE_INVALID

const TimeValue TIMEVALUE_INVALID
static

◆ MINVALUE_FLOAT32

const Float32 MINVALUE_FLOAT32
static

the minimum value a Float32 can represent

◆ MAXVALUE_FLOAT32

const Float32 MAXVALUE_FLOAT32
static

the maximum value a Float32 can represent

◆ MINVALUE_FLOAT64

const Float64 MINVALUE_FLOAT64
static

the minimum value a Float64 can represent

◆ MAXVALUE_FLOAT64

const Float64 MAXVALUE_FLOAT64
static

the maximum value a Float64 can represent

◆ MINVALUE_INT32_FLOAT32

const Float32 MINVALUE_INT32_FLOAT32
static

minimum Float32 value that can be represented by Int32 (-0x7FFFFF80). Lower values will results in an overflow

◆ MAXVALUE_INT32_FLOAT32

const Float32 MAXVALUE_INT32_FLOAT32
static

maximum Float32 value that can be represented by Int32 ( 0x7FFFFF80). Higher values will results in an overflow

◆ MINVALUE_INT64_FLOAT64

const Float64 MINVALUE_INT64_FLOAT64
static

minimum Float64 value that can be represented by Int64 (-0x7ffffffffffffdff). Lower values will results in an overflow

◆ MAXVALUE_INT64_FLOAT64

const Float64 MAXVALUE_INT64_FLOAT64
static

maximum Float64 value that can be represented by Int64 ( 0x7ffffffffffffdff). Higher values will results in an overflow

◆ MINRANGE_FLOAT32

const Float32 MINRANGE_FLOAT32
static

'safe' minimum range for Float32. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MAXRANGE_FLOAT32

const Float32 MAXRANGE_FLOAT32
static

'safe' maximum range for Float32. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MINRANGE_FLOAT64

const Float64 MINRANGE_FLOAT64
static

'safe' minimum range for Float. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MAXRANGE_FLOAT64

const Float64 MAXRANGE_FLOAT64
static

'safe' maximum range for Float. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MINVALUE_FLOAT

const Float MINVALUE_FLOAT
static

the minimum value a Float can represent

◆ MAXVALUE_FLOAT

const Float MAXVALUE_FLOAT
static

the maximum value a Float can represent

◆ MINRANGE_FLOAT

const Float MINRANGE_FLOAT
static

'safe' minimum range for Float64. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ MAXRANGE_FLOAT

const Float MAXRANGE_FLOAT
static

'safe' maximum range for Float64. Guarantees that multiplication of two numbers doesn't produce an overflow

◆ NOTOK

const Int NOTOK
static

constant used for special cases

◆ PI

const Float64 PI
static

floating point constant: PI

◆ PI_INV

const Float64 PI_INV
static

floating point constant: 1.0 / PI

◆ PI2

const Float64 PI2
static

floating point constant: 2.0 * PI

◆ PI2_INV

const Float64 PI2_INV
static

floating point constant: 1.0 / (2.0 * PI)

◆ PI05

const Float64 PI05
static

floating point constant: 0.5 * PI

◆ SQRT2

const Float64 SQRT2
static

floating point constant: Sqrt(2.0)

◆ SQRT_PI2

const Float64 SQRT_PI2
static

floating point constant: Sqrt(2.0 * PI)

◆ SQRT2_INV

const Float64 SQRT2_INV
static

floating point constant: 1.0 / Sqrt(2.0)

◆ SQRT3

const Float64 SQRT3
static

floating point constant: Sqrt(3.0)

◆ LOG2

const Float64 LOG2
static

floating point constant: Log(2.0)

◆ MAXON_ENUM_FLAGS_CLASS

maxon::FormulaParseErrorInterface MAXON_ENUM_FLAGS_CLASS