| 70 | uint32_t f_render_sub); |
| 71 | |
| 72 | static void BuildModelAngleMatrix(matrix *mat, angle ang, vector *axis) { |
| 73 | float x, y, z; |
| 74 | float s, c, t; |
| 75 | |
| 76 | x = axis->x; |
| 77 | y = axis->y; |
| 78 | z = axis->z; |
| 79 | |
| 80 | s = (float)FixSin(ang); |
| 81 | c = (float)FixCos(ang); |
| 82 | t = 1.0f - c; |
| 83 | |
| 84 | mat->rvec.x = t * x * x + c; |
| 85 | mat->rvec.y = t * x * y + s * z; |
| 86 | mat->rvec.z = t * x * z - s * y; |
| 87 | |
| 88 | mat->uvec.x = t * x * y - s * z; |
| 89 | mat->uvec.y = t * y * y + c; |
| 90 | mat->uvec.z = t * y * z + s * x; |
| 91 | |
| 92 | mat->fvec.x = t * x * z + s * y; |
| 93 | mat->fvec.y = t * y * z - s * x; |
| 94 | mat->fvec.z = t * z * z + c; |
| 95 | } |
| 96 | |
| 97 | float fvi_hit_param; |
| 98 | bool fvi_check_param; |