MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xMat3x3RotC

Function xMat3x3RotC

src/SB/Core/x/xMath3.cpp:299–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299void xMat3x3RotC(xMat3x3* m, F32 _x, F32 _y, F32 _z, F32 t)
300{
301 F32 sin;
302 F32 cos;
303 F32 c;
304
305 if (t == 0.0f)
306 {
307 xMat3x3Identity(m);
308 return;
309 }
310
311 cos = icos(t);
312 sin = isin(t);
313
314 c = 1.0f - cos;
315
316 m->right.x = (c * _x * _x) + cos;
317 m->right.y = (sin * _z) + (c * _x * _y);
318 m->right.z = (-sin * _y) + (c * _z * _x);
319
320 m->up.x = (-sin * _z) + (c * _x * _y);
321 m->up.y = (c * _y * _y) + cos;
322 m->up.z = (sin * _x) + (c * _y * _z);
323
324 m->at.x = (sin * _y) + (c * _z * _x);
325 m->at.y = (-sin * _x) + (c * _y * _z);
326 m->at.z = (c * _z * _z) + cos;
327
328 m->flags = 0;
329}
330
331void xMat3x3RotX(xMat3x3* m, F32 t)
332{

Callers 6

xMat4x3RotFunction · 0.70
xMat3x3RotFunction · 0.70
xMat3x3MulRotCFunction · 0.50
zEntHangable_SetMatrixFunction · 0.50
xMat4x3RotCFunction · 0.50
zPlatform_UpdateFunction · 0.50

Calls 3

xMat3x3IdentityFunction · 0.85
icosFunction · 0.85
isinFunction · 0.85

Tested by

no test coverage detected