Public Types |
enum | AngleUnit { AU_DEGREE,
AU_RADIAN
} |
| The angular units used by the API. More...
|
Public Methods |
| Math (unsigned int trigTableSize=4096) |
| Default constructor. More...
|
| ~Math () |
| Default destructor. More...
|
Static Public Methods |
int | IAbs (int iValue) |
int | ICeil (float fValue) |
int | IFloor (float fValue) |
int | ISign (int iValue) |
Real | Abs (Real fValue) |
Real | ACos (Real fValue) |
Real | ASin (Real fValue) |
Real | ATan (Real fValue) |
Real | ATan2 (Real fY, Real fX) |
Real | Ceil (Real fValue) |
Real | Cos (Real fValue, bool useTables=false) |
| Cosine function. More...
|
Real | Exp (Real fValue) |
Real | Floor (Real fValue) |
Real | Log (Real fValue) |
Real | Pow (Real kBase, Real kExponent) |
Real | Sign (Real fValue) |
Real | Sin (Real fValue, bool useTables=false) |
| Sine function. More...
|
Real | Sqr (Real fValue) |
Real | Sqrt (Real fValue) |
Real | InvSqrt (Real fValue) |
| Inverse square root i.e. More...
|
Real | UnitRandom () |
Real | RangeRandom (Real fLow, Real fHigh) |
Real | SymmetricRandom () |
Real | Tan (Real fValue, bool useTables=false) |
| Tangent function. More...
|
Real | DegreesToRadians (Real degrees) |
Real | RadiansToDegrees (Real radians) |
void | setAngleUnit (AngleUnit unit) |
| Sets the native angle units (radians or degrees) expected by and returned by the Ogre API. More...
|
AngleUnit | getAngleUnit (void) |
| Get the unit being used for angles. More...
|
Real | AngleUnitsToRadians (Real units) |
| Convert from the units the engine is currently using to radians. More...
|
Real | RadiansToAngleUnits (Real radians) |
| Convert from radians to the units the engine is currently using . More...
|
bool | pointInTri2D (Real px, Real pz, Real ax, Real az, Real bx, Real bz, Real cx, Real cz) |
| Checks wether a given point is inside a triangle, in a 2-dimensional (Cartesian) space. More...
|
bool | RealEqual (Real a, Real b, Real tolerance=std::numeric_limits< Real >::epsilon()) |
| Compare 2 reals, using tolerance for inaccuracies. More...
|
Math & | getSingleton (void) |
| Override standard Singleton retrieval. More...
|
Math * | getSingletonPtr (void) |
Static Public Attributes |
const Real | POS_INFINITY = std::numeric_limits<Real>::infinity() |
const Real | NEG_INFINITY = -std::numeric_limits<Real>::infinity() |
const Real | PI = Real( 4.0 * atan( 1.0 ) ) |
const Real | TWO_PI = Real( 2.0 * PI ) |
const Real | HALF_PI = Real( 0.5 * PI ) |
Protected Methods |
void | buildTrigTables () |
| Private function to build trig tables. More...
|
Static Protected Attributes |
AngleUnit | msAngleUnit |
int | mTrigTableSize |
| Size of the trig tables as determined by constructor. More...
|
Real | mTrigTableFactor |
| Radian -> index factor value ( mTrigTableSize / 2 * PI ). More...
|
Real * | mSinTable = NULL |
Real * | mTanTable = NULL |
Math * | ms_Singleton = 0 |