|
static int | IAbs (int iValue) |
|
static int | ICeil (float fValue) |
|
static int | IFloor (float fValue) |
|
static int | ISign (int iValue) |
|
static float | Abs (float fValue) |
|
static double | Abs (double fValue) |
|
static int | Abs (int nValue) |
|
static Degree | Abs (const Degree &dValue) |
|
static Radian | Abs (const Radian &rValue) |
|
static Radian | ACos (float fValue) |
|
static Radian | ASin (float fValue) |
|
static Radian | ATan (float fValue) |
|
static Radian | ATan2 (float fY, float fX) |
|
static float | Ceil (float fValue) |
|
static float | Cos (const Radian &fValue, bool useTables=false) |
| Cosine function. More...
|
|
static float | Cos (float fValue, bool useTables=false) |
| Cosine function. More...
|
|
static float | Exp (float fValue) |
|
static float | Floor (float fValue) |
|
static float | Log (float fValue) |
|
static float | Pow (float fBase, float fExponent) |
|
static float | Sign (float fValue) |
|
static Radian | Sign (const Radian &rValue) |
|
static Degree | Sign (const Degree &dValue) |
|
static float | Sin (const Radian &fValue, bool useTables=false) |
| Sine function. More...
|
|
static float | Sin (float fValue, bool useTables=false) |
| Sine function. More...
|
|
static float | Sqr (float fValue) |
|
static float | Sqrt (float fValue) |
|
static double | Sqr (double fValue) |
|
static double | Sqrt (double fValue) |
|
static Radian | Sqrt (const Radian &fValue) |
|
static Degree | Sqrt (const Degree &fValue) |
|
static float | InvSqrt (float fValue) |
| Inverse square root i.e. More...
|
|
static float | UnitRandom () |
|
static float | RangeRandom (float fLow, float fHigh) |
|
static float | SymmetricRandom () |
|
static float | Tan (const Radian &fValue, bool useTables=false) |
| Tangent function. More...
|
|
static float | Tan (float fValue, bool useTables=false) |
| Tangent function. More...
|
|
static float | DegreesToRadians (float degrees) |
|
static float | RadiansToDegrees (float radians) |
|
static void | setAngleUnit (AngleUnit unit) |
| These functions used to set the assumed angle units (radians or degrees) expected when using the Angle type. More...
|
|
static AngleUnit | getAngleUnit (void) |
| Get the unit being used for angles. More...
|
|
static float | AngleUnitsToRadians (float units) |
| Convert from the current AngleUnit to radians. More...
|
|
static float | RadiansToAngleUnits (float radians) |
| Convert from radians to the current AngleUnit . More...
|
|
static float | AngleUnitsToDegrees (float units) |
| Convert from the current AngleUnit to degrees. More...
|
|
static float | DegreesToAngleUnits (float degrees) |
| Convert from degrees to the current AngleUnit. More...
|
|
static bool | pointInTri2D (const Vector2 &p, const Vector2 &a, const Vector2 &b, const Vector2 &c) |
| Checks whether a given point is inside a triangle, in a 2-dimensional (Cartesian) space. More...
|
|
static bool | pointInTri3D (const Vector3 &p, const Vector3 &a, const Vector3 &b, const Vector3 &c, const Vector3 &normal) |
| Checks whether a given 3D point is inside a triangle. More...
|
|
static std::pair< bool, float > | intersects (const Ray &ray, const Plane &plane) |
| Ray / plane intersection, returns boolean result and distance. More...
|
|
static std::pair< bool, float > | intersects (const Ray &ray, const Sphere &sphere, bool discardInside=true) |
| Ray / sphere intersection, returns boolean result and distance. More...
|
|
static std::pair< bool, float > | intersects (const Ray &ray, const AxisAlignedBox &box) |
| Ray / box intersection, returns boolean result and distance. More...
|
|
static bool | intersects (const Ray &ray, const AxisAlignedBox &box, float *d1, float *d2) |
| Ray / box intersection, returns boolean result and two intersection distance. More...
|
|
static std::pair< bool, float > | intersects (const Ray &ray, const Vector3 &a, const Vector3 &b, const Vector3 &c, const Vector3 &normal, bool positiveSide=true, bool negativeSide=true) |
| Ray / triangle intersection, returns boolean result and distance. More...
|
|
static std::pair< bool, float > | intersects (const Ray &ray, const Vector3 &a, const Vector3 &b, const Vector3 &c, bool positiveSide=true, bool negativeSide=true) |
| Ray / triangle intersection, returns boolean result and distance. More...
|
|
static bool | intersects (const Sphere &sphere, const AxisAlignedBox &box) |
| Sphere / box intersection test. More...
|
|
static bool | intersects (const CShapeSphere &sphere, const CShapeBox &box) |
|
static bool | intersects (const Plane &plane, const AxisAlignedBox &box) |
| Plane / box intersection test. More...
|
|
static std::pair< bool, float > | intersects (const Ray &ray, const std::vector< Plane > &planeList, bool normalIsOutside) |
| Ray / convex plane list intersection test. More...
|
|
static std::pair< bool, float > | intersects (const Ray &ray, const std::list< Plane > &planeList, bool normalIsOutside) |
| Ray / convex plane list intersection test. More...
|
|
static bool | intersects (const Sphere &sphere, const Plane &plane) |
| Sphere / plane intersection test. More...
|
|
static bool | RealEqual (float a, float b, float tolerance=std::numeric_limits< float >::epsilon()) |
| Compare 2 reals, using tolerance for inaccuracies.
|
|
static Vector3 | calculateTangentSpaceVector (const Vector3 &position1, const Vector3 &position2, const Vector3 &position3, float u1, float v1, float u2, float v2, float u3, float v3) |
| Calculates the tangent space vector for a given set of positions / texture coords. More...
|
|
static Matrix4 | buildReflectionMatrix (const Plane &p) |
| Build a reflection matrix for the passed in plane. More...
|
|
static Vector4 | calculateFaceNormal (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) |
| Calculate a face normal, including the w component which is the offset from the origin. More...
|
|
static Vector3 | calculateBasicFaceNormal (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) |
| Calculate a face normal, no w-information. More...
|
|
static Vector4 | calculateFaceNormalWithoutNormalize (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) |
| Calculate a face normal without normalize, including the w component which is the offset from the origin. More...
|
|
static Vector3 | calculateBasicFaceNormalWithoutNormalize (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) |
| Calculate a face normal without normalize, no w-information. More...
|
|
static float | gaussianDistribution (float x, float offset=0.0f, float scale=1.0f) |
| Generates a value based on the Gaussian (normal) distribution function with the given offset and scale parameters.
|
|
template<class T > |
static T | Clamp (const T X, const T Min, const T Max) |
| Clamps X to be between Min and Max, inclusive.
|
|
static Matrix4 | makeViewMatrix (const Vector3 &position, const Quaternion &orientation, const Matrix4 *reflectMatrix=0) |
|
static bool | IsEquivalent (float f1, float f2) |
| Returns whether two floating-point values are equivalent within a given tolerance. More...
|
|
static bool | IsEquivalent (float f1, float f2, float tolerance) |
| Returns whether two floating-point values are equivalent within a given tolerance. More...
|
|
static bool | IsEquivalent (double f1, double f2) |
| Returns whether two double-sized floating-point values are equivalent. More...
|
|
static bool | IsEquivalent (double f1, double f2, double tolerance) |
| Returns whether two double-sized floating-point values are equivalent within a given tolerance. More...
|
|
template<class T > |
static bool | IsEquivalent (const T *al, size_t acount, const T *bl, size_t bcount) |
| Returns whether two constant-sized arrays are equivalent. More...
|
|
static int | log2 (unsigned int x) |
| this is a fast version of log2. More...
|
|
static int | log2_ceil (unsigned int x) |
| this is a fast version of log2. More...
|
|
template<class T > |
static T | Max (const T A, const T B) |
| Returns higher value in a generic way.
|
|
template<class T > |
static T | Min (const T A, const T B) |
| Returns lower value in a generic way.
|
|
static int32 | Trunc (float F) |
| Converts a float to an integer with truncation towards zero. More...
|
|
static float | TruncFloat (float F) |
| Converts a float to an integer value with truncation towards zero. More...
|
|
static float | Fractional (float Value) |
| Returns the fractional part of a float. More...
|
|
static float | GridSnap (float Location, float Grid) |
| Snaps a value to the nearest grid multiple.
|
|
template<class T > |
static T | DivideAndRoundUp (T Dividend, T Divisor) |
| Divides two integers and rounds up.
|
|
template<class T > |
static T | Max3 (const T A, const T B, const T C) |
| Returns highest of 3 values.
|
|
template<class T > |
static T | Min3 (const T A, const T B, const T C) |
| Returns lowest of 3 values.
|
|
template<class T , class U > |
static T | Lerp (const T &A, const T &B, const U &Alpha) |
| Performs a linear interpolation between two values, Alpha ranges from 0-1.
|
|
static int32 | Rand () |
| Returns a random integer between 0 and RAND_MAX, inclusive.
|
|
static void | RandInit (int32 Seed) |
| Seeds global random number functions Rand() and FRand()
|
|
static float | FRand () |
| Returns a random float between 0 and 1, inclusive. More...
|
|
static void | SRandInit (int32 Seed) |
| Seeds future calls to SRand()
|
|
static float | SRand () |
| Returns a seeded random float in the range [0,1), using the seed from SRandInit(). More...
|
|
static float | FloatSelect (float Comparand, float ValueGEZero, float ValueLTZero) |
| Returns value based on comparand. More...
|
|
static bool | SmoothMoveFloat1 (float &src, const float dest, const float fMaxStep) |
| change src from src to dest, by a maximum of fMaxStep. More...
|
|
static bool | SmoothMoveAngle1 (float &src, const float dest, const float fMaxStep) |
| change src from src to dest, by a maximum of fMaxStep. More...
|
|
static bool | SmoothMoveVec3 (Vector3 *result, const Vector3 &vPosTarget, const Vector3 &vPos, FLOAT fIncrease, FLOAT fTolerance) |
| linearly (smoothly) move vPos to vPosTarget by the amount fIncrease return true if we have reached the target. More...
|
|
static float | ToStandardAngle (float fAngle) |
| make sure that the angle is in the range (-Pi,Pi]
|
|
static double | ToStandardAngle (double fAngle) |
|
static bool | MatchString (const std::string &matchPattern, const std::string &matchStr) |
| check if the matchStr matches the string pattern in matchPattern More...
|
|
static bool | ComputeFacingTarget (const Vector3 &target, const Vector3 &source, FLOAT &fFacing) |
| facing target in xz plane fFacing: [out] it is in the range [0, 2PI] return true if target!=source(a valid facing can be computed)
|
|
static bool | ComputeFacingTarget (const DVector3 &target, const DVector3 &source, float &fFacing) |
|
static int | Round (float fValue) |
| get the closest integer near the specified float number. More...
|
|
static float | MinVec3 (const Vector3 &v) |
| Returns MIN(x, y, z);.
|
|
static float | MaxVec3 (const Vector3 &v) |
| Returns MAX(x, y, z);.
|
|
template<class T > |
static bool | CompareXZ (const T &a, const T &b) |
| return true if equal. More...
|
|
template<class T > |
static bool | CompareXZ (const T &a, const T &b, float epsilon) |
| return true if equal. More...
|
|
static bool | FuzzyCompare (double p1, double p2) |
|
static bool | FuzzyCompare (float p1, float p2) |
|
static bool | FuzzyIsNull (double d) |
|
static bool | FuzzyIsNull (float f) |
|
static bool | IsNull (double d) |
|
static bool | IsNull (float f) |
|
template<typename T > |
static bool | is_nan (T value) |
| whether value is not a number, T is usually float or double
|
|
template<typename T > |
static bool | is_infinity (T value) |
| whether value is infinity, T is usually float or double
|
|
static void | GetMatrixScaling (const Matrix4 &globalMat, float *fScalingX, float *fScalingY, float *fScalingZ) |
| Get the scaling factor from globalMat. More...
|
|
static Matrix4 * | CreateBillboardMatrix (Matrix4 *pOut, const Matrix4 *matModelview, const Vector3 *vBillboardPos, bool bAxisAligned=false) |
| create a billboard matrix More...
|
|
static void | CameraRotMatrixYawPitch (Matrix4 &out, float fYaw, float fPitch) |
|
static int | NextPowerOf2 (int x) |
| get nearest power of two of x
|
|