MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Blast / Animate

Method Animate

samples/SampleBase/blast/BlastController.cpp:357–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
356
357void BlastController::Animate(double dt)
358{
359 PROFILER_SCOPED_FUNCTION();
360
361 PROFILER_BEGIN("Apply Impact Damage");
362 m_extImpactDamageManager->applyDamage();
363 PROFILER_END();
364
365 updateDraggingStress();
366
367 fillDebugRender();
368
369 getPhysXController().simualtionSyncEnd();
370
371 updateImpactDamage();
372
373 Time blastTime;
374 for (uint32_t i = 0; i < m_families.size(); ++i)
375 {
376 if (m_families[i])
377 {
378 m_families[i]->updatePreSplit(dt);
379 }
380 }
381
382 m_replay->update();
383
384 PROFILER_BEGIN("Tk Group Process/Sync");
385
386#if 1
387
388 m_extGroupTaskManager->process();
389 m_extGroupTaskManager->wait();
390
391#else // process group on main thread
392
393 m_tkGroup->process();
394
395#endif
396
397 m_damageParamsBuffer.clear();
398 m_damageDescBuffer.clear();
399
400 PROFILER_END();
401
402 getPhysXController().simulationBegin(dt);
403
404 TkGroupStats gstats;
405 m_tkGroup->getStats(gstats);
406
407 this->m_lastBlastTimers.blastDamageMaterial = NvBlastTicksToSeconds(gstats.timers.material);
408 this->m_lastBlastTimers.blastDamageFracture = NvBlastTicksToSeconds(gstats.timers.fracture);
409 this->m_lastBlastTimers.blastSplitIsland = NvBlastTicksToSeconds(gstats.timers.island);
410 this->m_lastBlastTimers.blastSplitPartition = NvBlastTicksToSeconds(gstats.timers.partition);
411 this->m_lastBlastTimers.blastSplitVisibility = NvBlastTicksToSeconds(gstats.timers.visibility);
412
413 for (uint32_t i = 0; i < m_families.size(); ++i)
414 {

Callers

nothing calls this directly

Calls 12

NvBlastTicksToSecondsFunction · 0.85
applyDamageMethod · 0.80
simualtionSyncEndMethod · 0.80
updatePreSplitMethod · 0.80
simulationBeginMethod · 0.80
getStatsMethod · 0.80
updateAfterSplitMethod · 0.80
sizeMethod · 0.45
updateMethod · 0.45
processMethod · 0.45
waitMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected