Modules | |
| Vector functions | |
Macros | |
| #define | bound(a, b, c) (max(a, min(b, c))) |
| #define | BOX_ON_PLANE_SIDE(emins, emaxs, p) |
| #define | EQUAL_EPSILON 0.001 |
| #define | IS_NAN(x) (((*(int *) (char *) &x) & nanmask) == nanmask) |
| #define | M_PI 3.14159265358979323846 |
| #define | max(a, b) ((a) > (b) ? (a) : (b)) |
| #define | min(a, b) ((a) < (b) ? (a) : (b)) |
| #define | PITCH 0 |
| #define | PlaneDiff(point, plane) (PlaneDist (point, plane) - (plane)->dist) |
| #define | PlaneDist(point, plane) |
| #define | PlaneFlip(sp, dp) |
| #define | qfrandom(MAX) ((float) MAX * (rand() * (1.0 / (RAND_MAX + 1.0)))) |
| #define | RINT(x) (floor ((x) + 0.5)) |
| #define | ROLL 2 |
| #define | YAW 1 |
Variables | |
| plane_t *const | frustum |
| int | nanmask |
| #define BOX_ON_PLANE_SIDE | ( | emins, | |
| emaxs, | |||
| p | |||
| ) |
| #define EQUAL_EPSILON 0.001 |
| #define M_PI 3.14159265358979323846 |
| #define max | ( | a, | |
| b | |||
| ) | ((a) > (b) ? (a) : (b)) |
| #define min | ( | a, | |
| b | |||
| ) | ((a) < (b) ? (a) : (b)) |
| #define PITCH 0 |
| #define PlaneDist | ( | point, | |
| plane | |||
| ) |
| #define PlaneFlip | ( | sp, | |
| dp | |||
| ) |
| #define ROLL 2 |
| #define YAW 1 |
| float anglemod | ( | float | a | ) |
Convert quake angles to basis vectors.
The basis vectors form a left handed system (although the world is right handed). When all angles are 0, forward points along the world X axis, right along the negative Y axis, and up along the Z axis.
Rotation is done by:
Thus when used for the player from the first person perspective, positive YAW turns to the left, positive PITCH looks down, and positive ROLL leans to the right.
| angles | The rotation angles. |
| forward | The vector pointing forward. |
| right | The vector pointing to the right. |
| up | The vector pointing up. |
| void R_ConcatRotations | ( | float | in1[3][3], |
| float | in2[3][3], | ||
| float | out[3][3] | ||
| ) |
| void R_ConcatTransforms | ( | float | in1[3][4], |
| float | in2[3][4], | ||
| float | out[3][4] | ||
| ) |
| int nanmask |