Lines Matching refs:m
70 void C_MTXFrustum ( Mtx44 m, f32 t, f32 b, f32 lf, f32 r, f32 n, f32 f ) in C_MTXFrustum() argument
74 ASSERTMSG( (m != 0), MTX_FRUSTUM_1 ); in C_MTXFrustum()
80 m[0][0] = (2*n) * tmp; in C_MTXFrustum()
81 m[0][1] = 0.0f; in C_MTXFrustum()
82 m[0][2] = (r + lf) * tmp; in C_MTXFrustum()
83 m[0][3] = 0.0f; in C_MTXFrustum()
86 m[1][0] = 0.0f; in C_MTXFrustum()
87 m[1][1] = (2*n) * tmp; in C_MTXFrustum()
88 m[1][2] = (t + b) * tmp; in C_MTXFrustum()
89 m[1][3] = 0.0f; in C_MTXFrustum()
91 m[2][0] = 0.0f; in C_MTXFrustum()
92 m[2][1] = 0.0f; in C_MTXFrustum()
97 m[2][2] = -(f + n) * tmp; in C_MTXFrustum()
98 m[2][3] = -(2*f*n) * tmp; in C_MTXFrustum()
100 m[3][0] = 0.0f; in C_MTXFrustum()
101 m[3][1] = 0.0f; in C_MTXFrustum()
102 m[3][2] = -1.0f; in C_MTXFrustum()
103 m[3][3] = 0.0f; in C_MTXFrustum()
131 void C_MTXPerspective ( Mtx44 m, f32 fovY, f32 aspect, f32 n, f32 f ) in C_MTXPerspective() argument
137 ASSERTMSG( (m != 0), MTX_PERSPECTIVE_1 ); in C_MTXPerspective()
147 m[0][0] = cot / aspect; in C_MTXPerspective()
148 m[0][1] = 0.0f; in C_MTXPerspective()
149 m[0][2] = 0.0f; in C_MTXPerspective()
150 m[0][3] = 0.0f; in C_MTXPerspective()
152 m[1][0] = 0.0f; in C_MTXPerspective()
153 m[1][1] = cot; in C_MTXPerspective()
154 m[1][2] = 0.0f; in C_MTXPerspective()
155 m[1][3] = 0.0f; in C_MTXPerspective()
157 m[2][0] = 0.0f; in C_MTXPerspective()
158 m[2][1] = 0.0f; in C_MTXPerspective()
163 m[2][2] = -(f + n) * tmp; in C_MTXPerspective()
164 m[2][3] = -(2*f*n) * tmp; in C_MTXPerspective()
166 m[3][0] = 0.0f; in C_MTXPerspective()
167 m[3][1] = 0.0f; in C_MTXPerspective()
168 m[3][2] = -1.0f; in C_MTXPerspective()
169 m[3][3] = 0.0f; in C_MTXPerspective()
200 void C_MTXOrtho ( Mtx44 m, f32 t, f32 b, f32 lf, f32 r, f32 n, f32 f ) in C_MTXOrtho() argument
204 ASSERTMSG( (m != 0), MTX_ORTHO_1 ); in C_MTXOrtho()
210 m[0][0] = 2.0f * tmp; in C_MTXOrtho()
211 m[0][1] = 0.0f; in C_MTXOrtho()
212 m[0][2] = 0.0f; in C_MTXOrtho()
213 m[0][3] = -(r + lf) * tmp; in C_MTXOrtho()
216 m[1][0] = 0.0f; in C_MTXOrtho()
217 m[1][1] = 2.0f * tmp; in C_MTXOrtho()
218 m[1][2] = 0.0f; in C_MTXOrtho()
219 m[1][3] = -(t + b) * tmp; in C_MTXOrtho()
221 m[2][0] = 0.0f; in C_MTXOrtho()
222 m[2][1] = 0.0f; in C_MTXOrtho()
227 m[2][2] = -2.0f * tmp; in C_MTXOrtho()
228 m[2][3] = -(f + n) * tmp; in C_MTXOrtho()
230 m[3][0] = 0.0f; in C_MTXOrtho()
231 m[3][1] = 0.0f; in C_MTXOrtho()
232 m[3][2] = 0.0f; in C_MTXOrtho()
233 m[3][3] = 1.0f; in C_MTXOrtho()
259 void C_MTX44Identity( Mtx44 m ) in C_MTX44Identity() argument
261 ASSERTMSG( (m != 0), MTX44_IDENTITY_1 ); in C_MTX44Identity()
263 m[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f; in C_MTX44Identity()
264 m[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f; in C_MTX44Identity()
265 m[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f; in C_MTX44Identity()
266 m[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f; in C_MTX44Identity()
276 void PSMTX44Identity( register Mtx44 m ) in PSMTX44Identity() argument
278 __PSQ_ST(m, c10, 0, 0); in PSMTX44Identity()
279 __PSQ_STX(m, 8, c00, 0, 0); in PSMTX44Identity()
280 __PSQ_STX(m, 16, c01, 0, 0); in PSMTX44Identity()
281 __PSQ_STX(m, 24, c00, 0, 0); in PSMTX44Identity()
282 __PSQ_STX(m, 32, c00, 0, 0); in PSMTX44Identity()
283 __PSQ_STX(m, 40, c10, 0, 0); in PSMTX44Identity()
284 __PSQ_STX(m, 48, c00, 0, 0); in PSMTX44Identity()
285 __PSQ_STX(m, 56, c01, 0, 0); in PSMTX44Identity()
400 Mtx44Ptr m; in C_MTX44Concat() local
408 m = mTmp; in C_MTX44Concat()
412 m = ab; in C_MTX44Concat()
417 m[0][0] = a[0][0]*b[0][0] + a[0][1]*b[1][0] + a[0][2]*b[2][0] + a[0][3]*b[3][0]; in C_MTX44Concat()
418 m[0][1] = a[0][0]*b[0][1] + a[0][1]*b[1][1] + a[0][2]*b[2][1] + a[0][3]*b[3][1]; in C_MTX44Concat()
419 m[0][2] = a[0][0]*b[0][2] + a[0][1]*b[1][2] + a[0][2]*b[2][2] + a[0][3]*b[3][2]; in C_MTX44Concat()
420 m[0][3] = a[0][0]*b[0][3] + a[0][1]*b[1][3] + a[0][2]*b[2][3] + a[0][3]*b[3][3]; in C_MTX44Concat()
422 m[1][0] = a[1][0]*b[0][0] + a[1][1]*b[1][0] + a[1][2]*b[2][0] + a[1][3]*b[3][0]; in C_MTX44Concat()
423 m[1][1] = a[1][0]*b[0][1] + a[1][1]*b[1][1] + a[1][2]*b[2][1] + a[1][3]*b[3][1]; in C_MTX44Concat()
424 m[1][2] = a[1][0]*b[0][2] + a[1][1]*b[1][2] + a[1][2]*b[2][2] + a[1][3]*b[3][2]; in C_MTX44Concat()
425 m[1][3] = a[1][0]*b[0][3] + a[1][1]*b[1][3] + a[1][2]*b[2][3] + a[1][3]*b[3][3]; in C_MTX44Concat()
427 m[2][0] = a[2][0]*b[0][0] + a[2][1]*b[1][0] + a[2][2]*b[2][0] + a[2][3]*b[3][0]; in C_MTX44Concat()
428 m[2][1] = a[2][0]*b[0][1] + a[2][1]*b[1][1] + a[2][2]*b[2][1] + a[2][3]*b[3][1]; in C_MTX44Concat()
429 m[2][2] = a[2][0]*b[0][2] + a[2][1]*b[1][2] + a[2][2]*b[2][2] + a[2][3]*b[3][2]; in C_MTX44Concat()
430 m[2][3] = a[2][0]*b[0][3] + a[2][1]*b[1][3] + a[2][2]*b[2][3] + a[2][3]*b[3][3]; in C_MTX44Concat()
432 m[3][0] = a[3][0]*b[0][0] + a[3][1]*b[1][0] + a[3][2]*b[2][0] + a[3][3]*b[3][0]; in C_MTX44Concat()
433 m[3][1] = a[3][0]*b[0][1] + a[3][1]*b[1][1] + a[3][2]*b[2][1] + a[3][3]*b[3][1]; in C_MTX44Concat()
434 m[3][2] = a[3][0]*b[0][2] + a[3][1]*b[1][2] + a[3][2]*b[2][2] + a[3][3]*b[3][2]; in C_MTX44Concat()
435 m[3][3] = a[3][0]*b[0][3] + a[3][1]*b[1][3] + a[3][2]*b[2][3] + a[3][3]*b[3][3]; in C_MTX44Concat()
438 if(m == mTmp) in C_MTX44Concat()
748 Mtx44Ptr m; in C_MTX44Transpose() local
755 m = mTmp; in C_MTX44Transpose()
759 m = xPose; in C_MTX44Transpose()
762 m[0][0] = src[0][0]; m[0][1] = src[1][0]; m[0][2] = src[2][0]; m[0][3] = src[3][0]; in C_MTX44Transpose()
763 m[1][0] = src[0][1]; m[1][1] = src[1][1]; m[1][2] = src[2][1]; m[1][3] = src[3][1]; in C_MTX44Transpose()
764 m[2][0] = src[0][2]; m[2][1] = src[1][2]; m[2][2] = src[2][2]; m[2][3] = src[3][2]; in C_MTX44Transpose()
765 m[3][0] = src[0][3]; m[3][1] = src[1][3]; m[3][2] = src[2][3]; m[3][3] = src[3][3]; in C_MTX44Transpose()
768 if( m == mTmp ) in C_MTX44Transpose()
977 void C_MTX44Trans ( Mtx44 m, f32 xT, f32 yT, f32 zT ) in C_MTX44Trans() argument
979 ASSERTMSG( (m != 0), MTX44_TRANS_1 ); in C_MTX44Trans()
981 m[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = xT; in C_MTX44Trans()
982 m[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = yT; in C_MTX44Trans()
983 m[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = zT; in C_MTX44Trans()
984 m[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f; in C_MTX44Trans()
993 void PSMTX44Trans( Mtx44 m, f32 xT, f32 yT, f32 zT ) in PSMTX44Trans() argument
998 __PSQ_ST(m, c10, 0, 0); in PSMTX44Trans()
999 __PSQ_STX(m, 8, xT2, 0, 0); in PSMTX44Trans()
1000 __PSQ_STX(m, 16, c01, 0, 0); in PSMTX44Trans()
1001 __PSQ_STX(m, 24, yT2, 0, 0); in PSMTX44Trans()
1002 __PSQ_STX(m, 32, c00, 0, 0); in PSMTX44Trans()
1003 __PSQ_STX(m, 40, zT2, 0, 0); in PSMTX44Trans()
1004 __PSQ_STX(m, 48, c00, 0, 0); in PSMTX44Trans()
1005 __PSQ_STX(m, 56, c01, 0, 0); in PSMTX44Trans()
1135 void C_MTX44Scale ( Mtx44 m, f32 xS, f32 yS, f32 zS ) in C_MTX44Scale() argument
1137 ASSERTMSG( (m != 0), MTX44_SCALE_1 ); in C_MTX44Scale()
1139 m[0][0] = xS; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f; in C_MTX44Scale()
1140 m[1][0] = 0.0f; m[1][1] = yS; m[1][2] = 0.0f; m[1][3] = 0.0f; in C_MTX44Scale()
1141 m[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = zS; m[2][3] = 0.0f; in C_MTX44Scale()
1142 m[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f; in C_MTX44Scale()
1152 void PSMTX44Scale( Mtx44 m, f32 xS, f32 yS, f32 zS ) in PSMTX44Scale() argument
1158 __PSQ_ST(m, xS2, 0, 0); in PSMTX44Scale()
1159 __PSQ_STX(m, 8, c00, 0, 0); in PSMTX44Scale()
1160 __PSQ_STX(m, 16, yS2, 0, 0); in PSMTX44Scale()
1161 __PSQ_STX(m, 24, c00, 0, 0); in PSMTX44Scale()
1162 __PSQ_STX(m, 32, c00, 0, 0); in PSMTX44Scale()
1163 __PSQ_STX(m, 40, zS2, 0, 0); in PSMTX44Scale()
1164 __PSQ_STX(m, 48, c00, 0, 0); in PSMTX44Scale()
1165 __PSQ_STX(m, 56, c01, 0, 0); in PSMTX44Scale()
1339 void C_MTX44RotRad ( Mtx44 m, char axis, f32 rad ) in C_MTX44RotRad() argument
1343 ASSERTMSG( (m != 0), MTX44_ROTRAD_1 ); in C_MTX44RotRad()
1350 C_MTX44RotTrig( m, axis, sinA, cosA ); in C_MTX44RotRad()
1360 void PSMTX44RotRad ( Mtx44 m, char axis, f32 rad ) in PSMTX44RotRad() argument
1367 PSMTX44RotTrig( m, axis, sinA, cosA ); in PSMTX44RotRad()
1387 void C_MTX44RotTrig ( Mtx44 m, char axis, f32 sinA, f32 cosA ) in C_MTX44RotTrig() argument
1389 ASSERTMSG( (m != 0), MTX44_ROTTRIG_1 ); in C_MTX44RotTrig()
1396 m[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f; in C_MTX44RotTrig()
1397 m[1][0] = 0.0f; m[1][1] = cosA; m[1][2] = -sinA; m[1][3] = 0.0f; in C_MTX44RotTrig()
1398 m[2][0] = 0.0f; m[2][1] = sinA; m[2][2] = cosA; m[2][3] = 0.0f; in C_MTX44RotTrig()
1399 m[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f; in C_MTX44RotTrig()
1403 m[0][0] = cosA; m[0][1] = 0.0f; m[0][2] = sinA; m[0][3] = 0.0f; in C_MTX44RotTrig()
1404 m[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f; in C_MTX44RotTrig()
1405 m[2][0] = -sinA; m[2][1] = 0.0f; m[2][2] = cosA; m[2][3] = 0.0f; in C_MTX44RotTrig()
1406 m[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f; in C_MTX44RotTrig()
1410 m[0][0] = cosA; m[0][1] = -sinA; m[0][2] = 0.0f; m[0][3] = 0.0f; in C_MTX44RotTrig()
1411 m[1][0] = sinA; m[1][1] = cosA; m[1][2] = 0.0f; m[1][3] = 0.0f; in C_MTX44RotTrig()
1412 m[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f; in C_MTX44RotTrig()
1413 m[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f; in C_MTX44RotTrig()
1428 void PSMTX44RotTrig( Mtx44 m, char axis, f32 sinA, f32 cosA ) in PSMTX44RotTrig() argument
1439 __PSQ_ST(m, c11, 1, 0); in PSMTX44RotTrig()
1442 __PSQ_STX(m, 4, c00, 0, 0); in PSMTX44RotTrig()
1448 __PSQ_STX(m, 12, c00, 0, 0); in PSMTX44RotTrig()
1454 __PSQ_STX(m, 12, c00, 0, 0); in PSMTX44RotTrig()
1460 __PSQ_STX(m, 44, c00, 0, 0); in PSMTX44RotTrig()
1463 __PSQ_STX(m, 52, c00, 0, 0); in PSMTX44RotTrig()
1466 __PSQ_STX(m, 36, ftmp1, 0, 0); in PSMTX44RotTrig()
1469 __PSQ_STX(m, 20, ftmp0, 0, 0); in PSMTX44RotTrig()
1472 __PSQ_STX(m, 60, c11, 1, 0); in PSMTX44RotTrig()
1480 __PSQ_STX(m, 48, c00, 0, 0); in PSMTX44RotTrig()
1486 __PSQ_STX(m, 24, c00, 0, 0); in PSMTX44RotTrig()
1489 __PSQ_ST(m, cosA10, 0, 0); in PSMTX44RotTrig()
1492 __PSQ_STX(m, 16, c01, 0, 0); in PSMTX44RotTrig()
1495 __PSQ_STX(m, 8, sinA10, 0, 0); in PSMTX44RotTrig()
1498 __PSQ_STX(m, 32, ftmp0, 0, 0); in PSMTX44RotTrig()
1501 __PSQ_STX(m, 40, cosA10, 0, 0); in PSMTX44RotTrig()
1504 __PSQ_STX(m, 56, c01, 0, 0); in PSMTX44RotTrig()
1511 __PSQ_STX(m, 8, c00, 0, 0); in PSMTX44RotTrig()
1517 __PSQ_STX(m, 24, c00, 0, 0); in PSMTX44RotTrig()
1523 __PSQ_STX(m, 32, c00, 0, 0); in PSMTX44RotTrig()
1526 __PSQ_STX(m, 48, c00, 0, 0); in PSMTX44RotTrig()
1529 __PSQ_STX(m, 16, ftmp1, 0, 0); in PSMTX44RotTrig()
1535 __PSQ_STX(m, 40, c10, 0, 0); in PSMTX44RotTrig()
1538 __PSQ_STX(m, 56, c01, 0, 0); in PSMTX44RotTrig()
1541 __PSQ_ST(m, ftmp4, 0, 0); in PSMTX44RotTrig()
1558 void C_MTX44RotAxisRad( Mtx44 m, const Vec *axis, f32 rad ) in C_MTX44RotAxisRad() argument
1566 ASSERTMSG( (m != 0), MTX44_ROTAXIS_1 ); in C_MTX44RotAxisRad()
1583 m[0][0] = ( t * xSq ) + ( c ); in C_MTX44RotAxisRad()
1584 m[0][1] = ( t * x * y ) - ( s * z ); in C_MTX44RotAxisRad()
1585 m[0][2] = ( t * x * z ) + ( s * y ); in C_MTX44RotAxisRad()
1586 m[0][3] = 0.0f; in C_MTX44RotAxisRad()
1588 m[1][0] = ( t * x * y ) + ( s * z ); in C_MTX44RotAxisRad()
1589 m[1][1] = ( t * ySq ) + ( c ); in C_MTX44RotAxisRad()
1590 m[1][2] = ( t * y * z ) - ( s * x ); in C_MTX44RotAxisRad()
1591 m[1][3] = 0.0f; in C_MTX44RotAxisRad()
1593 m[2][0] = ( t * x * z ) - ( s * y ); in C_MTX44RotAxisRad()
1594 m[2][1] = ( t * y * z ) + ( s * x ); in C_MTX44RotAxisRad()
1595 m[2][2] = ( t * zSq ) + ( c ); in C_MTX44RotAxisRad()
1596 m[2][3] = 0.0f; in C_MTX44RotAxisRad()
1598 m[3][0] = 0.0f; in C_MTX44RotAxisRad()
1599 m[3][1] = 0.0f; in C_MTX44RotAxisRad()
1600 m[3][2] = 0.0f; in C_MTX44RotAxisRad()
1601 m[3][3] = 1.0f; in C_MTX44RotAxisRad()
1612 Mtx44 m, in __PSMTX44RotAxisRadInternal() argument
1676 __PSQ_STX(m, 48, c00, 0, 0); in __PSMTX44RotAxisRadInternal()
1688 __PSQ_STX(m, 56, tmp7, 0, 0); in __PSMTX44RotAxisRadInternal()
1757 __PSQ_STX(m, 8, tmp8, 0, 0); in __PSMTX44RotAxisRadInternal()
1767 __PSQ_STX(m, 0, tmp2, 0, 0); in __PSMTX44RotAxisRadInternal()
1777 __PSQ_STX(m, 16, tmp3, 0, 0); in __PSMTX44RotAxisRadInternal()
1787 __PSQ_STX(m, 24, tmp6, 0, 0); in __PSMTX44RotAxisRadInternal()
1797 __PSQ_STX(m, 32, tmp4, 0, 0); in __PSMTX44RotAxisRadInternal()
1803 __PSQ_STX(m, 40, tmp5, 0, 0); in __PSMTX44RotAxisRadInternal()
1807 void PSMTX44RotAxisRad( Mtx44 m, const Vec *axis, f32 rad ) in PSMTX44RotAxisRad() argument
1814 __PSMTX44RotAxisRadInternal(m, axis, sinT, cosT); in PSMTX44RotAxisRad()
1887 extern void _ASM_MTX44RotAxisRadInternal(Mtx m, const Vec *axis, f32 sT, f32 cT);
1889 void ASM_MTX44RotAxisRad(Mtx44 m, const Vec *axis, f32 rad) { in ASM_MTX44RotAxisRad() argument
1895 _ASM_MTX44RotAxisRadInternal(m, axis, sinT, cosT); in ASM_MTX44RotAxisRad()
1898 void ASM_MTX44RotRad ( Mtx44 m, char axis, f32 rad ) in ASM_MTX44RotRad() argument
1905 ASM_MTX44RotTrig( m, axis, sinA, cosA ); in ASM_MTX44RotRad()