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

Function CoefSeg3

src/SB/Core/x/xSpline.cpp:416–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416xCoef3* CoefSeg3(xSpline3* spl, U32 seg, xCoef3* tempCoef)
417{
418 F32 N[4];
419
420 F32* temp_knotseg;
421 xVec3* temp_bctrl;
422
423 switch (spl->type)
424 {
425 case 1:
426 return spl->coef + (seg * 0x30);
427 case 2:
428 BasisToCoef3(tempCoef, sBasisHermite, spl->points + (seg * 0xC), spl->p12 + (seg * 0x18),
429 spl->p12 + (seg * 0x18) + 0xC, spl->points + (seg * 0xC) + 0xC);
430 return tempCoef;
431 case 3:
432 BasisToCoef3(tempCoef, sBasisBezier, spl->points + (seg * 0xC), spl->p12 + (seg * 0x18),
433 spl->p12 + (seg * 0x18) + 0xC, spl->points + (seg * 0xC) + 0xC);
434 return tempCoef;
435 case 4:
436 BasisBspline(&N, &spl->knot[seg]);
437 temp_bctrl = spl->bctrl + (seg * 0xC);
438 BasisToCoef3(tempCoef, &N, temp_bctrl, temp_bctrl + 0xC, temp_bctrl + 0x18,
439 temp_bctrl + 0x24);
440 temp_knotseg = &spl->knot[seg];
441 CoefToUnity3(tempCoef, tempCoef, temp_knotseg[4], temp_knotseg[5]);
442 return tempCoef;
443 default:
444 return tempCoef;
445 }
446}
447
448void xSpline3_EvalSeg(xSpline3* spl, F32 u, U32 deriv, xVec3* o)
449{

Callers 2

ArcEvalIterateFunction · 0.70
xSpline3_ArcInitFunction · 0.70

Calls 3

BasisToCoef3Function · 0.85
CoefToUnity3Function · 0.85
BasisBsplineFunction · 0.70

Tested by

no test coverage detected