Classes |
| class | Burger::FPMath |
| | Generic floating point math routines. More...
|
| struct | Burger::Vector2D_t |
| struct | Vector3D_t |
| struct | Matrix3D_t |
| struct | Quat_t |
| struct | Matrix4D_t |
| struct | FixedEuler_t |
| struct | Euler_t |
Namespaces |
| namespace | Burger |
Defines |
| #define | BURGER_PI 3.141592653589793238 /* Pretty accurate eh? */ |
| #define | ANGLERANGE 2048 /* Number of angles in angle table */ |
| #define | ANGLEMASK (ANGLERANGE-1) /* Rounding mask for angles */ |
| #define | TANTABLESIZE 2048 /* Size of the Tangent arrays */ |
| #define | FLOATRECIPTABLESIZE 1024 /* Size of the float recip table */ |
| #define | Vector3DSet(a, x, y, z) Vector3DInit(a,x,y,z) |
| #define | Matrix3DInit(x) Matrix3DZero(x) |
| #define | Vector3DZero(a) {(a)->x=0;(a)->y=0;(a)->z=0;} |
| #define | Vector3DNegate(a) {(a)->x=-(a)->x;(a)->y=-(a)->y;(a)->z=-(a)->z;} |
| #define | Vector3DNegate2(a, b) {(a)->x=-(b)->x;(a)->y=-(b)->y;(a)->z=-(b)->z;} |
| #define | Vector3DAdd(a, b) {(a)->x=(a)->x+(b)->x;(a)->y=(a)->y+(b)->y;(a)->z=(a)->z+(b)->z;} |
| #define | Vector3DAdd3(a, b, c) {(a)->x=(b)->x+(c)->x;(a)->y=(b)->y+(c)->y;(a)->z=(b)->z+(c)->z;} |
| #define | Vector3DSub(a, b) {(a)->x=(a)->x-(b)->x;(a)->y=(a)->y-(b)->y;(a)->z=(a)->z-(b)->z;} |
| #define | Vector3DSub3(a, b, c) {(a)->x=(b)->x-(c)->x;(a)->y=(b)->y-(c)->y;(a)->z=(b)->z-(c)->z;} |
| #define | Vector3DMul(a, b) {(a)->x=(a)->x*(b);(a)->y=(a)->y*(b);(a)->z=(a)->z*(b);} |
| #define | Vector3DMul3(a, b, c) {(a)->x=(b)->x*(c);(a)->y=(b)->y*(c);(a)->z=(b)->z*(c);} |
| #define | Vector3DDot(a, b) (((a)->x*(b)->x) + ((a)->y*(b)->y) + ((a)->z * (b)->z)) |
Typedefs |
| typedef struct Vector3D_t | Vector3D_t |
| typedef struct Matrix3D_t | Matrix3D_t |
| typedef struct Quat_t | Quat_t |
| typedef struct Matrix4D_t | Matrix4D_t |
| typedef struct FixedEuler_t | FixedEuler_t |
| typedef struct Euler_t | Euler_t |
Functions |
| float | sqrtf (float) |
| double | sqrt (double) |
| float | fabsf (float) |
| double | fabs (double) |
| float BURGER_API | SqrtFast (float Input) |
| float BURGER_API | FloatSine (float Angle) |
| float BURGER_API | FloatCosine (float Angle) |
| float BURGER_API | FloatSineInt (int Angle) |
| float BURGER_API | FloatCosineInt (int Angle) |
| float BURGER_API | FloatATan2 (float x, float y) |
| Fixed32 BURGER_API | FixedArcCosine (Fixed32 c) |
| Fixed32 BURGER_API | FloatArcCosine (float c) |
| Fixed32 BURGER_API | FixedArcSine (Fixed32 s) |
| Fixed32 BURGER_API | FloatArcSine (float s) |
| void BURGER_API | Vector3DInit (Vector3D_t *Input, float x, float y, float z) |
| void BURGER_API | Vector3DZero (Vector3D_t *Output) |
| void BURGER_API | Vector3DFromIntVector3D (Vector3D_t *Output, const struct Burger::FixedVector3D_t *Input) |
| void BURGER_API | Vector3DFromFixedVector3D (Vector3D_t *Output, const struct Burger::FixedVector3D_t *Input) |
| void BURGER_API | Vector3DNegate (Vector3D_t *Input) |
| void BURGER_API | Vector3DNegate2 (Vector3D_t *Output, const Vector3D_t *Input) |
| void BURGER_API | Vector3DAdd (Vector3D_t *Output, const Vector3D_t *Input) |
| void BURGER_API | Vector3DAdd3 (Vector3D_t *Output, const Vector3D_t *Input1, const Vector3D_t *Input2) |
| void BURGER_API | Vector3DSub (Vector3D_t *Output, const Vector3D_t *Input) |
| void BURGER_API | Vector3DSub3 (Vector3D_t *Output, const Vector3D_t *Input1, const Vector3D_t *Input2) |
| void BURGER_API | Vector3DMul (Vector3D_t *Output, float Val) |
| void BURGER_API | Vector3DMul3 (Vector3D_t *Output, const Vector3D_t *Input, float Val) |
| Word BURGER_API | Vector3DEqual (const Vector3D_t *Input1, const Vector3D_t *Input2) |
| Word BURGER_API | Vector3DEqualWithinRange (const Vector3D_t *Input1, const Vector3D_t *Input2, float Range) |
| float BURGER_API | Vector3DGetAxis (const Vector3D_t *Input, Word Axis) |
| void BURGER_API | Vector3DSetAxis (Vector3D_t *Output, Word Axis, float Val) |
| float BURGER_API | Vector3DDot (const Vector3D_t *Input1, const Vector3D_t *Input2) |
| void BURGER_API | Vector3DCross (Vector3D_t *Output, const Vector3D_t *Input1, const Vector3D_t *Input2) |
| float BURGER_API | Vector3DGetRadiusSqr (const Vector3D_t *Input) |
| float BURGER_API | Vector3DGetRadius (const Vector3D_t *Input) |
| float BURGER_API | Vector3DGetRadiusFast (const Vector3D_t *Input) |
| float BURGER_API | Vector3DGetDistanceSqr (const Vector3D_t *Input1, const Vector3D_t *Input2) |
| float BURGER_API | Vector3DGetDistance (const Vector3D_t *Input1, const Vector3D_t *Input2) |
| float BURGER_API | Vector3DGetDistanceFast (const Vector3D_t *Input1, const Vector3D_t *Input2) |
| void BURGER_API | Vector3DSetRadius (Vector3D_t *Input, float Len) |
| void BURGER_API | Vector3DNormalize (Vector3D_t *Input) |
| void BURGER_API | Vector3DNormalize2 (Vector3D_t *Output, const Vector3D_t *Input) |
| void BURGER_API | Vector3DNormalize3 (Vector3D_t *Output, float x, float y, float z) |
| void BURGER_API | Vector3DNormalizeFast (Vector3D_t *Input) |
| void BURGER_API | Vector3DNormalizeFast2 (Vector3D_t *Output, const Vector3D_t *Input) |
| void BURGER_API | Vector3DNormalizeFast3 (Vector3D_t *Output, float x, float y, float z) |
| void BURGER_API | Vector3DNormalizeToLen (Vector3D_t *Input, float Len) |
| void BURGER_API | Vector3DNormalizeToLen2 (Vector3D_t *Output, const Vector3D_t *Input, float Len) |
| void BURGER_API | Matrix3DZero (Matrix3D_t *Input) |
| void BURGER_API | Matrix3DIdentity (Matrix3D_t *Input) |
| void BURGER_API | Matrix3DFromFixedMatrix3D (Matrix3D_t *Output, const Burger::FixedMatrix3D_t *Input) |
| void BURGER_API | Matrix3DSet (Matrix3D_t *Output, float yaw, float pitch, float roll) |
| void BURGER_API | Matrix3DSetYaw (Matrix3D_t *Output, float yaw) |
| void BURGER_API | Matrix3DSetPitch (Matrix3D_t *Output, float pitch) |
| void BURGER_API | Matrix3DSetRoll (Matrix3D_t *Output, float roll) |
| void BURGER_API | Matrix3DSetInt (Matrix3D_t *Output, Word yaw, Word pitch, Word roll) |
| void BURGER_API | Matrix3DSetYawInt (Matrix3D_t *Output, Word yaw) |
| void BURGER_API | Matrix3DSetPitchInt (Matrix3D_t *Output, Word pitch) |
| void BURGER_API | Matrix3DSetRollInt (Matrix3D_t *Output, Word roll) |
| void BURGER_API | Matrix3DSetFixed (Matrix3D_t *Output, Fixed32 yaw, Fixed32 pitch, Fixed32 roll) |
| void BURGER_API | Matrix3DSetYawFixed (Matrix3D_t *Output, Fixed32 yaw) |
| void BURGER_API | Matrix3DSetPitchFixed (Matrix3D_t *Output, Fixed32 pitch) |
| void BURGER_API | Matrix3DSetRollFixed (Matrix3D_t *Output, Fixed32 roll) |
| void BURGER_API | Matrix3DSetFromEuler (Matrix3D_t *Output, const Euler_t *Input) |
| void BURGER_API | Matrix3DSetFromFixedEuler (Matrix3D_t *Output, const FixedEuler_t *Input) |
| void BURGER_API | Matrix3DSetFromQuat (Matrix3D_t *Output, const Quat_t *Input) |
| void BURGER_API | Matrix3DSetTranslate2D (Matrix3D_t *Input, float xVal, float yVal) |
| void BURGER_API | Matrix3DTranspose (Matrix3D_t *Input) |
| void BURGER_API | Matrix3DTranspose2 (Matrix3D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DMul (Matrix3D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DMul2 (Matrix3D_t *Output, const Matrix3D_t *Input1, const Matrix3D_t *Input2) |
| void BURGER_API | Matrix3DGetXVector (Vector3D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DGetYVector (Vector3D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DGetZVector (Vector3D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DTransformVector3D (Vector3D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DTransformVector3D2 (Vector3D_t *Output, const Matrix3D_t *Input, const Vector3D_t *Input2) |
| void BURGER_API | Matrix3DTransformVector3DAdd (Vector3D_t *Output, const Matrix3D_t *Input, const Vector3D_t *Add) |
| void BURGER_API | Matrix3DTransformVector3DAdd2 (Vector3D_t *Output, const Matrix3D_t *Input, const Vector3D_t *Add, const Vector3D_t *InputV) |
| void BURGER_API | Matrix3DITransformVector3D (Vector3D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DITransformVector3D2 (Vector3D_t *Output, const Matrix3D_t *Input, const Vector3D_t *Input2) |
| void BURGER_API | Matrix3DITransformVector3DAdd (Vector3D_t *Output, const Matrix3D_t *Input, const Vector3D_t *Add) |
| void BURGER_API | Matrix3DITransformVector3DAdd2 (Vector3D_t *Output, const Matrix3D_t *Input, const Vector3D_t *Add, const Vector3D_t *InputV) |
| void BURGER_API | Matrix3DTransform2D (Burger::Vector2D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DTransform2D2 (Burger::Vector2D_t *Output, const Matrix3D_t *Input, const Burger::Vector2D_t *InputV) |
| void BURGER_API | Matrix3DITransform2D (Burger::Vector2D_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | Matrix3DITransform2D2 (Burger::Vector2D_t *Output, const Matrix3D_t *Input, const Burger::Vector2D_t *InputV) |
| void BURGER_API | EulerFromMatrix3D (Euler_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | FixedEulerFromMatrix3D (FixedEuler_t *Output, const Matrix3D_t *Input) |
| void BURGER_API | QuatIdentity (Quat_t *Input) |
| void BURGER_API | QuatNormalize (Quat_t *Input) |
| float BURGER_API | QuatDot (const Quat_t *Input1, const Quat_t *Input2) |
| void BURGER_API | QuatMul2 (Quat_t *Output, const Quat_t *Input1, const Quat_t *Input2) |
| void BURGER_API | Matrix4DZero (Matrix4D_t *Input) |
| void BURGER_API | Matrix4DIdentity (Matrix4D_t *Input) |
| void BURGER_API | Matrix4DSetTranslate3D (Matrix4D_t *Output, float xVal, float yVal, float zVal) |
| void BURGER_API | Matrix4DSetScale (Matrix4D_t *Output, float xVal, float yVal, float zVal) |
| void BURGER_API | Matrix4DTransformVector3D (Vector3D_t *Output, const Matrix4D_t *Input) |
| void BURGER_API | Matrix4DTransformVector3D2 (Vector3D_t *Output, const Matrix4D_t *Input, const Vector3D_t *Input2) |
| void BURGER_API | Matrix4DITransformVector3D (Vector3D_t *Output, const Matrix4D_t *Input) |
| void BURGER_API | Matrix4DITransformVector3D2 (Vector3D_t *Output, const Matrix4D_t *Input, const Vector3D_t *Input2) |
Variables |
| Word32 | BurgerSqrtTable [512 *2] |
| float | FAngleArray [TANTABLESIZE+1] |
| Fixed32 | FixedArcCosineTable [ANGLERANGE+1] |
| Fixed32 | FixedArcSineTable [ANGLERANGE+1] |
| float | FSineTable [ANGLERANGE+(ANGLERANGE/4)] |
| float | FloatRecipTable [FLOATRECIPTABLESIZE] |