![]() |
VR-Forces Developer's Guide
|
Math utilities.
Static Public Member Functions | |
| static uint32 | getUpperPowerOfTwo (uint32 val) |
| static uint32 | getLowerPowerOfTwo (uint32 val) |
| static bool | isPowerOf2 (uint32 i) |
| static uint32 | nextPowerOf2 (uint32 i) |
| static std::string | formatBytes (uint64_t sizeInBytes) |
| 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) |
| static unsigned int | tilelog2 (unsigned int x) |
| template<class T > | |
| static T | rpmToRadiansPerSec (T rpm) |
| template<class T > | |
| static T | radiansPerSecToRpm (T radiansPerSec) |
| template<class T > | |
| static T | positiveInfinity (void) |
| template<class T > | |
| static T | negativeInfinity (void) |
| template<class T > | |
| static T | Sqrt (T val) |
| 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()) |
| 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) |
| 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) |
| 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 T | lerp (T a, T b, T t) |
| template<class T > | |
| static DtVector2< T > | lerp (const DtVector2< T > &va, const DtVector2< T > &vb, const T t) |
| template<class T > | |
| static DtVector3< T > | lerp (const DtVector3< T > &va, const DtVector3< T > &vb, const T t) |
| template<class T > | |
| static DtVector4< T > | lerp (const DtVector4< T > &va, const DtVector4< T > &vb, const T t) |
| 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) |
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 |
|
inlinestatic |
Standard math routines.
Referenced by makVrv::DtVector2< T >::length(), makVrv::DtVector4< T >::length(), makVrv::DtVector3< T >::length(), makVrv::DtVector2< T >::normalize(), and makVrv::DtVector3< T >::normalize().
|
inlinestatic |
Standard math routines.
Referenced by makVrv::DtVector3< T >::absDotProduct().
|
inlinestatic |
Standard math routines.
Referenced by makVrv::DtMatrixUtils< T >::matrixRotation_3x3(), makVrv::DtMatrixUtils< T >::matrixRotationX(), makVrv::DtMatrixUtils< T >::matrixRotationY(), makVrv::DtMatrixUtils< T >::matrixRotationZ(), and toCartesian().
|
inlinestatic |
Standard math routines.
Referenced by makVrv::DtMatrixUtils< T >::matrixRotation_3x3(), makVrv::DtMatrixUtils< T >::matrixRotationX(), makVrv::DtMatrixUtils< T >::matrixRotationY(), makVrv::DtMatrixUtils< T >::matrixRotationZ(), and toCartesian().
|
inlinestatic |
Standard math routines.
|
static |
Standard math routines.
|
static |
Standard math routines.
|
static |
Standard math routines.
|
inlinestatic |
Standard math routines.
Referenced by makVrv::DtMatrixUtils< T >::matrixRotation_3x3().
|
static |
Standard math routines.
|
static |
Standard math routines.
|
static |
Test equality with tolerance.
Referenced by makVrv::DtMatrix3< T >::IsEqual(), makVrv::DtVector2< T >::isEqual(), makVrv::DtMatrix4< T >::isEqual(), makVrv::DtVector3< T >::isEqual(), and makVrv::DtVector4< T >::isEqual().
|
static |
Standard math routines.
|
static |
Standard math routines.
|
static |
Standard math routines.
|
static |
Random number generation routines.
|
static |
Random number generation routines.
Random number generation routines.
Random number generation routines.
Random number generation routines.
|
static |
Random number generation routines.
whether is a power of 2 From Bit Twiddling Hacks (website)
get the next power of 2 From Bit Twiddling Hacks (website)
|
static |
format a size in bytes to a string like Mb, Kb and so on
|
static |
|
static |
Clamping routines.
References clamp(), makVrv::DtVector2< T >::x, and makVrv::DtVector2< T >::y.
|
static |
Clamping routines.
References clamp(), makVrv::DtVector3< T >::x, makVrv::DtVector3< T >::y, and makVrv::DtVector3< T >::z.
|
static |
Clamping routines.
References clamp(), makVrv::DtVector4< T >::w, makVrv::DtVector4< T >::x, makVrv::DtVector4< T >::y, and makVrv::DtVector4< T >::z.
|
inlinestatic |
Lerping routines.
|
inlinestatic |
Lerping routines.
|
inlinestatic |
Lerping routines.
|
inlinestatic |
Lerping routines.
|
static |
References Cos(), Sin(), makVrv::DtVector3< T >::x, makVrv::DtVector3< T >::y, and makVrv::DtVector3< T >::z.
|
static |
Basic intersections.
References makVrv::DtVector3< T >::dotProduct(), and makVrv::DtVector3< T >::normalize().
|
static |
|
static |
|
static |
|
static |
rpm to radians per sec
References PI.
|
static |
radians per sec to rpm
References PI.
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
Referenced by radiansPerSecToRpm(), and rpmToRadiansPerSec().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |