vhdMath Class Reference

#include <vhdMath.h>

List of all members.

Public Types

enum  AngleUnit { AU_DEGREE, AU_RADIAN }

Public Member Functions

 vhdMath (unsigned int uiTrigTableSize=4096)
 ~vhdMath ()

Static Public Member Functions

static int iAbs (int iValue)
static int iCeil (float fValue)
static int iFloor (float fValue)
static int iSign (int iValue)
static vhtReal abs (vhtReal fValue)
static vhtReal aCos (vhtReal fValue)
static vhtReal aSin (vhtReal fValue)
static vhtReal aTan (vhtReal fValue)
static vhtReal aTan2 (vhtReal fY, vhtReal fX)
static vhtReal ceil (vhtReal fValue)
static vhtReal cos (vhtReal fValue, bool useTables=false)
static vhtReal exp (vhtReal fValue)
static vhtReal floor (vhtReal fValue)
static vhtReal log (vhtReal fValue)
static vhtReal pow (vhtReal kBase, vhtReal kExponent)
static vhtReal sign (vhtReal fValue)
static vhtReal sin (vhtReal fValue, bool useTables=false)
static vhtReal sqr (vhtReal fValue)
static vhtReal sqrt (vhtReal fValue)
static vhtReal invSqrt (vhtReal fValue)
static vhtReal unitRandom ()
static vhtReal rangeRandom (vhtReal fLow, vhtReal fHigh)
static vhtReal symmetricRandom ()
static unsigned int rand (unsigned int uiNumber)
static vhtReal randReal ()
static unsigned int dice (unsigned int uiNumberFaces)
static vhtReal tan (vhtReal fValue, bool useTables=false)
static vhtReal cot (vhtReal value)
static vhtReal degreesToRadians (vhtReal degrees)
static vhtReal radiansToDegrees (vhtReal radians)
static void setAngleUnit (AngleUnit unit)
static AngleUnit getAngleUnit (void)
static vhtReal angleUnitsToRadians (vhtReal units)
static vhtReal radiansToAngleUnits (vhtReal radians)
static bool pointInTri2D (vhtReal px, vhtReal pz, vhtReal ax, vhtReal az, vhtReal bx, vhtReal bz, vhtReal cx, vhtReal cz)
static bool vhtRealEqual (vhtReal a, vhtReal b, vhtReal tolerance=std::numeric_limits< vhtReal >::epsilon())
template<class _OUT, class _IN>
static _OUT fast_cast (_IN input)
template<class T>
static T absoluteValue (T value)
template<class T>
static bool isPositive (T a)
template<class T>
static bool isNegative (T a)
template<class T>
static bool sameSigns (T a, T b)
template<class T>
static T copySign (T value, T s)
template<class T>
static bool deltaRangeTest (T a, T b, T epsilon)
template<class T>
static bool deltaRangeTest (T a, T b)
template<class T>
static const T & minimum (const T &a, const T &b)
template<class T>
static const T & maximum (const T &a, const T &b)
template<class T>
static const T & maximum (const T &a, const T &b, const T &c)
template<class T>
static T clamp (T value, T low, T high)
template<class T>
static T clampPositive (T value)
template<class T>
static T clampNegative (T value)
template<class T>
static bool isPowerOfTwo (T input)
template<class T>
static T nearestPowerOfTwo (T input)
template<class T>
static T ceilingPowerOfTwo (T input)
template<class T>
static T modulus (T a, T b)
template<class T>
static void swap (T &a, T &b)

Static Public Attributes

static const vhtReal POS_INFINITY
static const vhtReal NEG_INFINITY
static const vhtReal PI
static const vhtReal TWO_PI
static const vhtReal HALF_PI
static const vhtReal MAX_vhtReal
static const vhtReal MIN_vhtReal
static const vhtReal INV_TWO_PI
static const vhtReal DEG_TO_RAD
static const vhtReal RAD_TO_DEG
static const vhtReal G_EPSILON
static const vhtReal EPSILON

Protected Member Functions

void buildTrigTables ()

Static Private Attributes

static AngleUnit msAngleUnit
static int mTrigTableSize
static vhtReal mTrigTableFactor
static vhtRealmSinTable
static vhtRealmTanTable


Member Enumeration Documentation

enum vhdMath::AngleUnit

Enumerator:
AU_DEGREE 
AU_RADIAN 


Constructor & Destructor Documentation

vhdMath::vhdMath ( unsigned int  uiTrigTableSize = 4096  ) 

vhdMath::~vhdMath (  ) 


Member Function Documentation

int vhdMath::iAbs ( int  iValue  )  [static]

int vhdMath::iCeil ( float  fValue  )  [static]

int vhdMath::iFloor ( float  fValue  )  [static]

int vhdMath::iSign ( int  iValue  )  [static]

vhtReal vhdMath::abs ( vhtReal  fValue  )  [static]

vhtReal vhdMath::aCos ( vhtReal  fValue  )  [static]

vhtReal vhdMath::aSin ( vhtReal  fValue  )  [static]

vhtReal vhdMath::aTan ( vhtReal  fValue  )  [static]

vhtReal vhdMath::aTan2 ( vhtReal  fY,
vhtReal  fX 
) [static]

vhtReal vhdMath::ceil ( vhtReal  fValue  )  [static]

vhtReal vhdMath::cos ( vhtReal  fValue,
bool  useTables = false 
) [static]

vhtReal vhdMath::exp ( vhtReal  fValue  )  [static]

vhtReal vhdMath::floor ( vhtReal  fValue  )  [static]

vhtReal vhdMath::log ( vhtReal  fValue  )  [static]

vhtReal vhdMath::pow ( vhtReal  kBase,
vhtReal  kExponent 
) [static]

vhtReal vhdMath::sign ( vhtReal  fValue  )  [static]

vhtReal vhdMath::sin ( vhtReal  fValue,
bool  useTables = false 
) [static]

vhtReal vhdMath::sqr ( vhtReal  fValue  )  [static]

vhtReal vhdMath::sqrt ( vhtReal  fValue  )  [static]

vhtReal vhdMath::invSqrt ( vhtReal  fValue  )  [static]

vhtReal vhdMath::unitRandom (  )  [static]

vhtReal vhdMath::rangeRandom ( vhtReal  fLow,
vhtReal  fHigh 
) [static]

vhtReal vhdMath::symmetricRandom (  )  [static]

unsigned int vhdMath::rand ( unsigned int  uiNumber  )  [static]

vhtReal vhdMath::randReal (  )  [static]

unsigned int vhdMath::dice ( unsigned int  uiNumberFaces  )  [static]

vhtReal vhdMath::tan ( vhtReal  fValue,
bool  useTables = false 
) [static]

vhtReal vhdMath::cot ( vhtReal  value  )  [static]

vhtReal vhdMath::degreesToRadians ( vhtReal  degrees  )  [static]

vhtReal vhdMath::radiansToDegrees ( vhtReal  radians  )  [static]

void vhdMath::setAngleUnit ( AngleUnit  unit  )  [static]

vhdMath::AngleUnit vhdMath::getAngleUnit ( void   )  [static]

vhtReal vhdMath::angleUnitsToRadians ( vhtReal  units  )  [static]

vhtReal vhdMath::radiansToAngleUnits ( vhtReal  radians  )  [static]

bool vhdMath::pointInTri2D ( vhtReal  px,
vhtReal  pz,
vhtReal  ax,
vhtReal  az,
vhtReal  bx,
vhtReal  bz,
vhtReal  cx,
vhtReal  cz 
) [static]

bool vhdMath::vhtRealEqual ( vhtReal  a,
vhtReal  b,
vhtReal  tolerance = std::numeric_limits< vhtReal >::epsilon() 
) [static]

template<class _OUT, class _IN>
static _OUT vhdMath::fast_cast ( _IN  input  )  [inline, static]

template<class T>
static T vhdMath::absoluteValue ( value  )  [inline, static]

template<class T>
static bool vhdMath::isPositive ( a  )  [inline, static]

template<class T>
static bool vhdMath::isNegative ( a  )  [inline, static]

template<class T>
static bool vhdMath::sameSigns ( a,
b 
) [inline, static]

template<class T>
static T vhdMath::copySign ( value,
s 
) [inline, static]

template<class T>
static bool vhdMath::deltaRangeTest ( a,
b,
epsilon 
) [inline, static]

template<class T>
static bool vhdMath::deltaRangeTest ( a,
b 
) [inline, static]

template<class T>
static const T& vhdMath::minimum ( const T &  a,
const T &  b 
) [inline, static]

template<class T>
static const T& vhdMath::maximum ( const T &  a,
const T &  b 
) [inline, static]

template<class T>
static const T& vhdMath::maximum ( const T &  a,
const T &  b,
const T &  c 
) [inline, static]

template<class T>
static T vhdMath::clamp ( value,
low,
high 
) [inline, static]

template<class T>
static T vhdMath::clampPositive ( value  )  [inline, static]

template<class T>
static T vhdMath::clampNegative ( value  )  [inline, static]

template<class T>
static bool vhdMath::isPowerOfTwo ( input  )  [inline, static]

template<class T>
static T vhdMath::nearestPowerOfTwo ( input  )  [inline, static]

template<class T>
static T vhdMath::ceilingPowerOfTwo ( input  )  [inline, static]

template<class T>
static T vhdMath::modulus ( a,
b 
) [inline, static]

template<class T>
static void vhdMath::swap ( T &  a,
T &  b 
) [inline, static]

void vhdMath::buildTrigTables (  )  [protected]


Member Data Documentation

const vhtReal vhdMath::POS_INFINITY [static]

const vhtReal vhdMath::NEG_INFINITY [static]

const vhtReal vhdMath::PI [static]

const vhtReal vhdMath::TWO_PI [static]

const vhtReal vhdMath::HALF_PI [static]

const vhtReal vhdMath::MAX_vhtReal [static]

const vhtReal vhdMath::MIN_vhtReal [static]

const vhtReal vhdMath::INV_TWO_PI [static]

const vhtReal vhdMath::DEG_TO_RAD [static]

const vhtReal vhdMath::RAD_TO_DEG [static]

const vhtReal vhdMath::G_EPSILON [static]

const vhtReal vhdMath::EPSILON [static]

vhdMath::AngleUnit vhdMath::msAngleUnit [static, private]

int vhdMath::mTrigTableSize [static, private]

vhtReal vhdMath::mTrigTableFactor [static, private]

vhtReal * vhdMath::mSinTable [static, private]

vhtReal * vhdMath::mTanTable [static, private]


Generated on Thu Jan 18 10:06:24 2007 for vhdPLUS by  doxygen 1.5.1-p1