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

Method spawn

samples/SampleBase/scene/SceneController.cpp:813–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

811 }
812
813 void spawn()
814 {
815 std::ostringstream str;
816 str << m_asset->getName();
817 if (m_index)
818 str << " (" << m_index << ")";
819 m_name = str.str();
820
821 PxTransform pose = m_asset->getInitialTransform();
822 pose.p += m_shift;
823
824 BlastAsset::ActorDesc actorDesc = {
825 actorDesc.id = generateIDFromString(m_name.c_str()),
826 pose,
827 m_scene.getBlastController().getTkGroup()
828 };
829
830 m_actor = m_scene.getBlastController().spawnFamily(m_asset->getAsset(), actorDesc);
831 }
832
833 Scene& m_scene;
834 BlastFamilyPtr m_actor;

Callers

nothing calls this directly

Calls 6

generateIDFromStringFunction · 0.85
getTkGroupMethod · 0.80
spawnFamilyMethod · 0.80
getNameMethod · 0.45
getInitialTransformMethod · 0.45
getAssetMethod · 0.45

Tested by

no test coverage detected