MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addObject

Method addObject

Engine/source/T3D/Scene.cpp:110–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void Scene::addObject(SimObject* object)
111{
112 //Child scene
113 Scene* scene = dynamic_cast<Scene*>(object);
114 if (scene)
115 {
116 //We'll keep these principly separate so they don't get saved into each other
117 mSubScenes.push_back(scene);
118 return;
119 }
120
121 SceneObject* sceneObj = dynamic_cast<SceneObject*>(object);
122 if (sceneObj)
123 {
124 //We'll operate on the presumption that if it's being added via regular parantage means, it's considered permanent
125 mPermanentObjects.push_back(sceneObj);
126 Parent::addObject(object);
127
128 return;
129 }
130
131 //Do it like regular, though we should probably bail if we're trying to add non-scene objects to the scene?
132 Parent::addObject(object);
133}
134
135void Scene::removeObject(SimObject* object)
136{

Callers 15

onAddMethod · 0.45
getServerSetMethod · 0.45
spawnTargetMethod · 0.45
addNamedEffectMethod · 0.45
registerForCleanupFunction · 0.45
onAddMethod · 0.45
onAddMethod · 0.45
afx_emitParticlesMethod · 0.45
onAddMethod · 0.45
onAddMethod · 0.45
getServerSetMethod · 0.45
spawnTargetMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected