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

Method updatePreSplit

samples/SampleBase/blast/BlastFamily.cpp:108–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void BlastFamily::updatePreSplit(float dt)
109{
110 if (!m_spawned)
111 {
112 ExtPxSpawnSettings spawnSettings = {
113 &m_physXController.getPhysXScene(),
114 m_physXController.getDefaultMaterial(),
115 RIGIDBODY_DENSITY
116 };
117
118 m_pxFamily->spawn(m_initialTransform, PxVec3(1.0f), spawnSettings);
119 reloadStressSolver();
120
121 m_spawned = true;
122 }
123
124 // collect potential actors to health update
125 m_actorsToUpdateHealth.clear();
126 for (const ExtPxActor* actor : m_actors)
127 {
128 if (actor->getTkActor().isPending())
129 {
130 m_actorsToUpdateHealth.emplace(actor);
131 }
132 }
133}
134
135void BlastFamily::updateAfterSplit(float dt)
136{

Callers 1

AnimateMethod · 0.80

Calls 5

isPendingMethod · 0.80
PxVec3Class · 0.50
getDefaultMaterialMethod · 0.45
spawnMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected