| 27 | |
| 28 | extern float Z_bias; |
| 29 | void g3_GetModelViewMatrix(const vector *viewPos, const matrix *viewMatrix, float *mvMat) { |
| 30 | matrix localOrient = (*viewMatrix); |
| 31 | vector localPos = -(*viewPos); |
| 32 | mvMat[0] = localOrient.rvec.x; |
| 33 | mvMat[1] = localOrient.uvec.x; |
| 34 | mvMat[2] = localOrient.fvec.x; |
| 35 | mvMat[3] = 0.0f; |
| 36 | mvMat[4] = localOrient.rvec.y; |
| 37 | mvMat[5] = localOrient.uvec.y; |
| 38 | mvMat[6] = localOrient.fvec.y; |
| 39 | mvMat[7] = 0.0f; |
| 40 | mvMat[8] = localOrient.rvec.z; |
| 41 | mvMat[9] = localOrient.uvec.z; |
| 42 | mvMat[10] = localOrient.fvec.z; |
| 43 | mvMat[11] = 0.0f; |
| 44 | mvMat[12] = localPos * localOrient.rvec; |
| 45 | mvMat[13] = localPos * localOrient.uvec; |
| 46 | mvMat[14] = localPos * localOrient.fvec + Z_bias; |
| 47 | mvMat[15] = 1.0f; |
| 48 | } |
| 49 | |
| 50 | void g3_TransformVert(float res[4], float pt[4], float a[4][4]) { |
| 51 | int y; |
no outgoing calls
no test coverage detected