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

Function xParCmdRandomVelocityPar_Update

src/SB/Core/x/xParCmd.cpp:319–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319void xParCmdRandomVelocityPar_Update(xParCmd* c, xParGroup* ps, F32 dt)
320{
321 xPar* p = ps->m_root;
322 xParCmdRandomVelocityPar* cmd = (xParCmdRandomVelocityPar*)c->tasset;
323 F32 f31 = cmd->x * dt;
324 F32 f30 = cmd->y * dt;
325 F32 f29 = cmd->z * dt;
326
327 while (p)
328 {
329 xMat3x3 var_88;
330
331 F32 y = 2.0f * (f31 * xurand()) - f31;
332 F32 x = 2.0f * (f30 * xurand()) - f30;
333 F32 z = 2.0f * (f29 * xurand()) - f29;
334
335 xMat3x3Euler(&var_88, x, y, z);
336 xMat3x3LMulVec(&p->m_vel, &var_88, &p->m_vel);
337
338 p = p->m_next;
339 }
340}
341
342void xParCmdApplyWind_Update(xParCmd* c, xParGroup* ps, F32 dt)
343{

Callers

nothing calls this directly

Calls 3

xurandFunction · 0.85
xMat3x3EulerFunction · 0.85
xMat3x3LMulVecFunction · 0.70

Tested by

no test coverage detected