|
KallistiOS
##version##
|
Inline functions for the DC's special math instructions. More...
Go to the source code of this file.
Macros | |
| #define | __FMINLINE static |
Functions | |
| __FMINLINE float | fipr (float x, float y, float z, float w, float a, float b, float c, float d) |
| Floating point inner product. More... | |
| __FMINLINE float | fipr_magnitude_sqr (float x, float y, float z, float w) |
| Floating point inner product w/self (square of vector magnitude) More... | |
| __FMINLINE float | fsin (float r) |
| Floating point sine. More... | |
| __FMINLINE float | fcos (float r) |
| Floating point cosine. More... | |
| __FMINLINE float | ftan (float r) |
| Floating point tangent. More... | |
| __FMINLINE float | fisin (int d) |
| Integer sine. More... | |
| __FMINLINE float | ficos (int d) |
| Integer cosine. More... | |
| __FMINLINE float | fitan (int d) |
| Integer tangent. More... | |
| __FMINLINE float | fsqrt (float f) |
| Floating point square root. More... | |
| __FMINLINE float | frsqrt (float f) |
| __FMINLINE void | fsincos (float f, float *s, float *c) |
| Calculate the sine and cosine of a value in degrees. More... | |
| __FMINLINE void | fsincosr (float f, float *s, float *c) |
| Calculate the sine and cosine of a value in radians. More... | |
| __FMINLINE uint32 | pvr_pack_bump (float h, float t, float q) |
| Calculate the offset color value for a set of bumpmap parameters. More... | |
Inline functions for the DC's special math instructions.
| #define __FMINLINE static |
| __FMINLINE float fcos | ( | float | r | ) |
Floating point cosine.
| r | a floating point number between 0 and 2*PI |
| __FMINLINE float ficos | ( | int | d | ) |
Integer cosine.
| d | an integer between 0 and 65535 |
| __FMINLINE float fipr | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w, | ||
| float | a, | ||
| float | b, | ||
| float | c, | ||
| float | d | ||
| ) |
Floating point inner product.
| __FMINLINE float fipr_magnitude_sqr | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
Floating point inner product w/self (square of vector magnitude)
| __FMINLINE float fisin | ( | int | d | ) |
Integer sine.
| d | an integer between 0 and 65535 |
| __FMINLINE float fitan | ( | int | d | ) |
Integer tangent.
| d | an integer between 0 and 65535 |
| __FMINLINE float frsqrt | ( | float | f | ) |
| __FMINLINE float fsin | ( | float | r | ) |
Floating point sine.
| r | a floating point number between 0 and 2*PI |
| __FMINLINE void fsincos | ( | float | f, |
| float * | s, | ||
| float * | c | ||
| ) |
Calculate the sine and cosine of a value in degrees.
This function uses the fsca instruction to calculate an approximation of the sine and cosine of the input value.
| f | The value to calculate the sine and cosine of. |
| s | Storage for the returned sine value. |
| c | Storage for the returned cosine value. |
| __FMINLINE void fsincosr | ( | float | f, |
| float * | s, | ||
| float * | c | ||
| ) |
Calculate the sine and cosine of a value in radians.
This function uses the fsca instruction to calculate an approximation of the sine and cosine of the input value.
| f | The value to calculate the sine and cosine of. |
| s | Storage for the returned sine value. |
| c | Storage for the returned cosine value. |
| __FMINLINE float fsqrt | ( | float | f | ) |
Floating point square root.
| __FMINLINE float ftan | ( | float | r | ) |
Floating point tangent.
| r | a floating point number between 0 and 2*PI |
| __FMINLINE uint32 pvr_pack_bump | ( | float | h, |
| float | t, | ||
| float | q | ||
| ) |
Calculate the offset color value for a set of bumpmap parameters.
This function calculates the value to be placed into the oargb value for the use of bumpmapping on a polygon. The angles specified should be expressed in radians and within the limits specified for the individual parameter.
| h | Weighting value in the range [0, 1] for how defined the bumpiness of the surface should be. |
| t | Spherical elevation angle in the range [0, pi/2] between the surface and the lighting source. A value of pi/2 implies that the light is directly overhead. |
| q | Spherical rotation angle in the range [0, 2*pi] between the surface and the lighting source. |
References F_PI.
1.8.7