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

Function bakeMorphAnim

src/SB/Game/zLasso.cpp:510–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510static void bakeMorphAnim(RpGeometry* geom, void* anim)
511{
512 if (*(U32*)anim & 0x80000000)
513 {
514 return;
515 }
516
517 *(U32*)anim |= 0x80000000;
518
519 xMat4x3 mat;
520 xVec3 tran[64];
521 xQuat quat[64];
522
523 iAnimEval(anim, 0.0f, 0x0, tran, quat);
524 xQuatToMat(quat, &mat);
525 mat.pos = tran[0];
526
527 S32 i, j;
528 for (i = 0; i < geom->numMorphTargets; i++)
529 {
530 S32 numV = geom->numVertices;
531 xVec3* v = (xVec3*)geom->morphTarget[i].verts;
532
533 for (j = 0; j < numV; j++)
534 {
535 xMat4x3Toworld(&v[j], &mat, &v[j]);
536 }
537 }
538}

Callers 1

zLasso_AddGuideFunction · 0.70

Calls 3

iAnimEvalFunction · 0.85
xMat4x3ToworldFunction · 0.85
xQuatToMatFunction · 0.50

Tested by

no test coverage detected