OGRE-Next
4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
#include <OgreMathlibC.h>
Static Public Member Functions | |
static ArrayReal | Abs4 (ArrayReal a) |
Returns the absolute values of each 4 floats. More... | |
static ArrayReal | ACos4 (ArrayReal x) |
Returns the arccos of x. More... | |
static ArrayInt | And (ArrayInt a, ArrayInt b) |
Returns the result of "a & b". More... | |
static ArrayMaskI | And (ArrayInt a, ArrayMaskI b) |
static ArrayMaskI | And (ArrayMaskI a, ArrayInt b) |
static ArrayMaskI | And (ArrayMaskI a, ArrayMaskI b) |
static ArrayInt | AndNot (ArrayInt a, ArrayInt b) |
Returns the result of "a & ~b". More... | |
static ArrayMaskI | AndNot (ArrayInt a, ArrayMaskI b) |
static ArrayMaskI | AndNot (ArrayMaskI a, ArrayInt b) |
static ArrayMaskI | AndNot (ArrayMaskI a, ArrayMaskI b) |
static ArrayReal | Cmov4 (ArrayReal arg1, ArrayReal arg2, ArrayMaskR mask) |
Branchless conditional move for 4 floating point values. More... | |
static ArrayInt | CmovRobust (ArrayInt arg1, ArrayInt arg2, ArrayMaskI mask) |
static ArrayReal | CmovRobust (ArrayReal arg1, ArrayReal arg2, ArrayMaskR mask) |
Robust, branchless conditional move for a 128-bit value. More... | |
static Real | ColapseMax (ArrayReal a) |
Returns the maximum value of all elements in a. More... | |
static Real | ColapseMin (ArrayReal a) |
Returns the minimum value of all elements in a. More... | |
static ArrayMaskR | CompareGreater (ArrayReal a, ArrayReal b) |
Returns the result of "a > b". More... | |
static ArrayMaskR | CompareGreaterEqual (ArrayReal a, ArrayReal b) |
Returns the result of "a >= b". More... | |
static ArrayMaskR | CompareLess (ArrayReal a, ArrayReal b) |
Returns the result of "a < b". More... | |
static ArrayMaskR | CompareLessEqual (ArrayReal a, ArrayReal b) |
Returns the result of "a <= b". More... | |
static ArrayReal | ConvertToF32 (ArrayInt a) |
Converts 32-bit integer to float. More... | |
static ArrayReal | Cos4 (ArrayReal x) |
Returns the cosine of x. More... | |
static void | extractS16 (ArrayToS16 a, int16 outValues[ARRAY_PACKED_REALS]) |
Extracts ARRAY_PACKED_REALS int16. More... | |
static void | extractS8 (ArrayToS8 a, int8 outValues[ARRAY_PACKED_REALS]) |
Extracts ARRAY_PACKED_REALS int8. More... | |
static Real | Get0 (ArrayReal src) |
Returns the first entry in src. More... | |
static ArrayReal | Inv4 (ArrayReal val) |
Returns the reciprocal of x. More... | |
static ArrayReal | InvNonZero4 (ArrayReal val) |
Returns the reciprocal of x. More... | |
static ArrayReal | InvSqrt4 (ArrayReal f) |
Returns the squared root of the reciprocal of x. More... | |
static ArrayReal | InvSqrtNonZero4 (ArrayReal f) |
Returns the squared root of the reciprocal of x. More... | |
static ArrayMaskR | isInfinity (ArrayReal a) |
Returns the result of "a == std::numeric_limits<float>::infinity()". More... | |
static ArrayReal | Max (ArrayReal a, ArrayReal b) |
Returns the maximum value between a and b. More... | |
static ArrayReal | Min (ArrayReal a, ArrayReal b) |
Returns the minimum value between a and b. More... | |
static ArrayReal | Modf4 (ArrayReal x, ArrayReal &outIntegral) |
Break x into fractional and integral parts. More... | |
static ArrayInt | Or (ArrayInt a, ArrayInt b) |
Returns the result of "a | b". More... | |
static ArrayMaskI | Or (ArrayInt a, ArrayMaskI b) |
static ArrayMaskI | Or (ArrayMaskI a, ArrayInt b) |
static ArrayMaskI | Or (ArrayMaskI a, ArrayMaskI b) |
static ArrayReal | Saturate (ArrayReal a) |
Clamps the value to the range [0; 1]. More... | |
static void | Set (ArrayReal &dst, Real val, size_t index) |
static ArrayReal | SetAll (Real val) |
static ArrayInt | SetAll (uint32 val) |
static ArrayReal | Sin4 (ArrayReal x) |
Returns the sine of x. More... | |
static void | SinCos4 (ArrayReal x, ArrayReal &outSin, ArrayReal &outCos) |
Calculates the cosine & sine of x. More... | |
static ArrayMaskI | TestFlags4 (ArrayInt a, ArrayInt b) |
Test if "a AND b" will result in non-zero, returning 0xffffffff on those cases. More... | |
static ArrayMaskI | TestFlags4 (ArrayInt a, ArrayMaskI b) |
static ArrayMaskI | TestFlags4 (ArrayMaskI a, ArrayInt b) |
static ArrayToS16 | ToSnorm16 (ArrayReal a) |
Returns: (int16)( saturate( a ) * 32767.5f );. More... | |
static ArrayToS8 | ToSnorm8Unsafe (ArrayReal a) |
Returns: (int16)( saturate( a ) * 127.5f );. More... | |
static ArrayInt | Truncate (ArrayReal a) |
Truncates float to 32-bit integer. More... | |
Static Public Attributes | |
static const ArrayReal | fDeg2Rad |
static const ArrayReal | fEpsilon |
static const ArrayReal | FLOAT_MIN |
static const ArrayReal | fRad2Deg |
static const ArrayReal | fSqEpsilon |
static const ArrayReal | HALF |
static const ArrayReal | INFINITEA |
static const ArrayReal | MAX_NEG |
static const ArrayReal | MAX_POS |
static const ArrayReal | NEG_ONE |
static const ArrayReal | ONE |
static const ArrayReal | ONE_DIV_2PI |
static const ArrayReal | OneMinusEpsilon |
static const ArrayReal | PI |
static const ArrayReal | SIGN_MASK |
static const ArrayReal | THREE |
static const ArrayReal | TWO_PI |
Returns the absolute values of each 4 floats.
a | 4 floating point values |
References Ogre::Math::Abs().
Returns the arccos of x.
x | 4 floating point values |
Returns the result of "a & b".
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns the result of "a & ~b".
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Branchless conditional move for 4 floating point values.
arg1 | 4 floating point values. Can't be NaN or Inf |
arg2 | 4 floating point values. Can't be NaN or Inf |
mask | 4 values containing either 0 or 0xffffffff Any other value, the result is undefined |
References Ogre::Math::isNaN().
|
inlinestatic |
|
inlinestatic |
Robust, branchless conditional move for a 128-bit value.
For more information refer to Chapter 3.5.2.3 Bypass between Execution Domains, IntelĀ® 64 and IA-32 Architectures Optimization Reference Manual Order Number: 248966-026 April (and also Table 2-12)
arg1 | A value containing 128 bits |
arg2 | A value containing 128 bits |
mask | Mask, each bit is evaluated |
Returns the maximum value of all elements in a.
Returns the minimum value of all elements in a.
|
inlinestatic |
Returns the result of "a > b".
|
inlinestatic |
Returns the result of "a >= b".
Referenced by Ogre::ArrayRay::intersects().
|
inlinestatic |
Returns the result of "a < b".
|
inlinestatic |
Returns the result of "a <= b".
Converts 32-bit integer to float.
Returns the cosine of x.
x | 4 floating point values |
|
inlinestatic |
Extracts ARRAY_PACKED_REALS int16.
a | a must contain integers. Not floats. |
outValues | [out] outValues[0] = (int16)a[0]; outValues[1] = (int16)a[1]; outValues[2] = (int16)a[2]; outValues[3] = (int16)a[3]; |
|
inlinestatic |
Extracts ARRAY_PACKED_REALS int8.
a | a must contain integers. Not floats. |
outValues | [out] outValues[0] = (int8)a[0]; outValues[1] = (int8)a[1]; outValues[2] = (int8)a[2]; outValues[3] = (int8)a[3]; |
Returns the first entry in src.
Returns the reciprocal of x.
Returns the reciprocal of x.
val | If it's zero, the returned value could be NaN depending on implementation |
Returns the squared root of the reciprocal of x.
Returns the squared root of the reciprocal of x.
|
inlinestatic |
Returns the result of "a == std::numeric_limits<float>::infinity()".
Returns the maximum value between a and b.
Referenced by Ogre::ArrayRay::intersects().
Returns the minimum value between a and b.
Referenced by Ogre::ArrayRay::intersects().
Break x into fractional and integral parts.
x | 4 floating point values. i.e. "2.57" (x4) |
outIntegral | The integral part of x. i.e. 2 |
Returns the result of "a | b".
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Clamps the value to the range [0; 1].
Referenced by Ogre::ArrayRay::intersects().
Returns the sine of x.
x | 4 floating point values |
Calculates the cosine & sine of x.
Use this function if you need to calculate both, as it is faster than calling Cos4 & Sin4 together.
x | 4 floating point values |
outSin | Output value, sin( x ) (packed as 4 floats) |
outCos | Output value, cos( x ) (packed as 4 floats) |
|
inlinestatic |
Test if "a AND b" will result in non-zero, returning 0xffffffff on those cases.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns: (int16)( saturate( a ) * 32767.5f );.
Returns: (int16)( saturate( a ) * 127.5f );.
Input a MUST be in range (-256.996; 256.996) for saturation to properly work (in other implementations, C version doesn't have this flaw). Otherwise result will be wrong.
Truncates float to 32-bit integer.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |