| 976 | } |
| 977 | |
| 978 | void BuildModelAngleMatrix(matrix *mat, angle ang, vector *axis) { |
| 979 | float x, y, z; |
| 980 | float s, c, t; |
| 981 | |
| 982 | x = axis->x; |
| 983 | y = axis->y; |
| 984 | z = axis->z; |
| 985 | |
| 986 | s = (float)FixSin(ang); |
| 987 | c = (float)FixCos(ang); |
| 988 | t = 1.0f - c; |
| 989 | |
| 990 | mat->rvec.x = t * x * x + c; |
| 991 | mat->rvec.y = t * x * y + s * z; |
| 992 | mat->rvec.z = t * x * z - s * y; |
| 993 | |
| 994 | mat->uvec.x = t * x * y - s * z; |
| 995 | mat->uvec.y = t * y * y + c; |
| 996 | mat->uvec.z = t * y * z + s * x; |
| 997 | |
| 998 | mat->fvec.x = t * x * z + s * y; |
| 999 | mat->fvec.y = t * y * z - s * x; |
| 1000 | mat->fvec.z = t * z * z + c; |
| 1001 | } |
| 1002 | |
| 1003 | void SetPolymodelProperties(bsp_info *subobj, char *props) { |
| 1004 | // first, extract the command |
no test coverage detected