VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Static Public Member Functions | Static Public Attributes
makVrv::DtMath Class Reference

Math utilities. More...

Static Public Member Functions

static uint32 getUpperPowerOfTwo (uint32 val)
 
static uint32 getLowerPowerOfTwo (uint32 val)
 
template<class T >
static DtVector3< T > toCartesian (T thetaDegrees, T phiDegrees, bool flipYZ)
 
template<class T >
static bool isFinite (T n)
 
template<class T >
static T Min (T lhs, T rhs)
 
template<class T >
static T Max (T lhs, T rhs)
 
static double fractional (double val)
 fractional part of a number More...
 
static unsigned int tilelog2 (unsigned int x)
 
template<class T >
static T rpmToRadiansPerSec (T rpm)
 rpm to radians per sec More...
 
template<class T >
static T radiansPerSecToRpm (T radiansPerSec)
 radians per sec to rpm More...
 
template<class T >
static T positiveInfinity (void)
 
template<class T >
static T negativeInfinity (void)
 
template<class T >
static T Sqrt (T val)
 Standard math routines. More...
 
template<class T >
static T Abs (T val)
 
static int Abs (int val)
 
template<class T >
static T Sin (T val)
 
template<class T >
static T Cos (T val)
 
template<class T >
static T Tan (T val)
 
static float Sin (const DtDegrees &val)
 
static float Cos (const DtDegrees &val)
 
static float Tan (const DtDegrees &val)
 
template<class T >
static T Squared (T val)
 
template<class T >
static int NumDigits (T val)
 
template<class T >
static double GetNormalizedValueRespectingLength (T val)
 
static bool isEqual (int32 lhs, int32 rhs, int32 tolerance=std::numeric_limits< int32 >::epsilon())
 Test equality with tolerance. More...
 
static bool isEqual (uint32 lhs, uint32 rhs, uint32 tolerance=std::numeric_limits< uint32 >::epsilon())
 
static bool isEqual (float32 lhs, float32 rhs, float32 tolerance=std::numeric_limits< float32 >::epsilon())
 
static bool isEqual (float64 lhs, float64 rhs, float64 tolerance=std::numeric_limits< float64 >::epsilon())
 
static float32 unitRandom32 (void)
 Random number generation routines. More...
 
static float64 unitRandom64 (void)
 
static int rangeRandom (int iLow, int iHigh)
 
static float32 rangeRandom (float32 fLow, float32 fHigh)
 
static float64 rangeRandom (float64 fLow, float64 fHigh)
 
static bool randomBool (void)
 
template<class T >
static T clamp (T val, T minval, T maxval)
 Clamping routines. More...
 
template<class T >
static DtVector2< T > clamp (const DtVector2< T > &val, const DtVector2< T > &minval, const DtVector2< T > &maxval)
 
template<class T >
static DtVector3< T > clamp (const DtVector3< T > &val, const DtVector3< T > &minval, const DtVector3< T > &maxval)
 
template<class T >
static DtVector4< T > clamp (const DtVector4< T > &val, const DtVector4< T > &minval, const DtVector4< T > &maxval)
 
template<class T >
static bool linePlaneIntersection (const DtVector3< T > &linePoint1, const DtVector3< T > &linePoint2, const DtVector3< T > &planePoint, const DtVector3< T > &planeNormal, DtVector3< T > &intersect, float &w)
 Basic intersections. More...
 

Static Public Attributes

static const float32 TWO_PI
 
static const float32 PI
 
static const float32 PI_BY_2
 
static const float32 PI_BY_3
 
static const float32 PI_BY_4
 
static const float32 PI_BY_6
 
static const float32 Gravity
 
static const float32 m_fConvertToRadians
 
static const float32 m_fConvertToDegrees
 

Detailed Description

Math utilities.

Member Function Documentation

template<class T >
static T makVrv::DtMath::Sqrt ( val)
inlinestatic
template<class T >
static T makVrv::DtMath::Abs ( val)
inlinestatic
static int makVrv::DtMath::Abs ( int  val)
inlinestatic
template<class T >
static T makVrv::DtMath::Sin ( val)
inlinestatic
template<class T >
static T makVrv::DtMath::Cos ( val)
inlinestatic
template<class T >
static T makVrv::DtMath::Tan ( val)
inlinestatic
static float makVrv::DtMath::Sin ( const DtDegrees val)
static
static float makVrv::DtMath::Cos ( const DtDegrees val)
static
static float makVrv::DtMath::Tan ( const DtDegrees val)
static
template<class T >
static T makVrv::DtMath::Squared ( val)
inlinestatic
template<class T >
int makVrv::DtMath::NumDigits ( val)
static
template<class T >
double makVrv::DtMath::GetNormalizedValueRespectingLength ( val)
static
static bool makVrv::DtMath::isEqual ( int32  lhs,
int32  rhs,
int32  tolerance = std::numeric_limits< int32 >::epsilon() 
)
static
static bool makVrv::DtMath::isEqual ( uint32  lhs,
uint32  rhs,
uint32  tolerance = std::numeric_limits< uint32 >::epsilon() 
)
static
static bool makVrv::DtMath::isEqual ( float32  lhs,
float32  rhs,
float32  tolerance = std::numeric_limits< float32 >::epsilon() 
)
static
static bool makVrv::DtMath::isEqual ( float64  lhs,
float64  rhs,
float64  tolerance = std::numeric_limits< float64 >::epsilon() 
)
static
static float32 makVrv::DtMath::unitRandom32 ( void  )
static

Random number generation routines.

static float64 makVrv::DtMath::unitRandom64 ( void  )
static
static int makVrv::DtMath::rangeRandom ( int  iLow,
int  iHigh 
)
static
static float32 makVrv::DtMath::rangeRandom ( float32  fLow,
float32  fHigh 
)
static
static float64 makVrv::DtMath::rangeRandom ( float64  fLow,
float64  fHigh 
)
static
static bool makVrv::DtMath::randomBool ( void  )
static
static uint32 makVrv::DtMath::getUpperPowerOfTwo ( uint32  val)
static
static uint32 makVrv::DtMath::getLowerPowerOfTwo ( uint32  val)
static
template<class T >
T makVrv::DtMath::clamp ( val,
minval,
maxval 
)
static

Clamping routines.

References Assert.

Referenced by clamp().

template<class T >
DtVector2< T > makVrv::DtMath::clamp ( const DtVector2< T > &  val,
const DtVector2< T > &  minval,
const DtVector2< T > &  maxval 
)
static
template<class T >
DtVector3< T > makVrv::DtMath::clamp ( const DtVector3< T > &  val,
const DtVector3< T > &  minval,
const DtVector3< T > &  maxval 
)
static
template<class T >
DtVector4< T > makVrv::DtMath::clamp ( const DtVector4< T > &  val,
const DtVector4< T > &  minval,
const DtVector4< T > &  maxval 
)
static
template<class T >
DtVector3< T > makVrv::DtMath::toCartesian ( thetaDegrees,
phiDegrees,
bool  flipYZ 
)
static
template<class T >
bool makVrv::DtMath::linePlaneIntersection ( const DtVector3< T > &  linePoint1,
const DtVector3< T > &  linePoint2,
const DtVector3< T > &  planePoint,
const DtVector3< T > &  planeNormal,
DtVector3< T > &  intersect,
float &  w 
)
static
template<class T >
bool makVrv::DtMath::isFinite ( n)
static
template<class T >
T makVrv::DtMath::Min ( lhs,
rhs 
)
static
template<class T >
T makVrv::DtMath::Max ( lhs,
rhs 
)
static
static double makVrv::DtMath::fractional ( double  val)
static

fractional part of a number

static unsigned int makVrv::DtMath::tilelog2 ( unsigned int  x)
static
template<class T >
T makVrv::DtMath::rpmToRadiansPerSec ( rpm)
static

rpm to radians per sec

References PI.

template<class T >
T makVrv::DtMath::radiansPerSecToRpm ( radiansPerSec)
static

radians per sec to rpm

References PI.

template<class T >
static T makVrv::DtMath::positiveInfinity ( void  )
inlinestatic
template<class T >
static T makVrv::DtMath::negativeInfinity ( void  )
inlinestatic

Member Data Documentation

const float32 makVrv::DtMath::TWO_PI
static
const float32 makVrv::DtMath::PI
static
const float32 makVrv::DtMath::PI_BY_2
static
const float32 makVrv::DtMath::PI_BY_3
static
const float32 makVrv::DtMath::PI_BY_4
static
const float32 makVrv::DtMath::PI_BY_6
static
const float32 makVrv::DtMath::Gravity
static
const float32 makVrv::DtMath::m_fConvertToRadians
static
const float32 makVrv::DtMath::m_fConvertToDegrees
static

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)