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

Method spawnAsset

samples/SampleBase/scene/SceneController.cpp:320–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318 }
319
320 void spawnAsset(int32_t num)
321 {
322 m_lastSpawnedAsset = physx::PxClamp<int32_t>(num, -1, (uint32_t)m_assets.size() - 1);
323
324 if (m_lastSpawnedAsset < 0)
325 {
326 return;
327 }
328
329 PxVec3 shift(PxZero);
330 for (SceneActor* a : m_sceneActors)
331 {
332 shift += a->getSpawnShift();
333 }
334
335 SceneAsset* asset = m_assets[m_lastSpawnedAsset];
336 asset->spawn(shift);
337 }
338
339 void addSceneActor(SceneActor* actor)
340 {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
getSpawnShiftMethod · 0.45
spawnMethod · 0.45

Tested by

no test coverage detected