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

Method addObjectToScene

Engine/source/scene/sceneManager.cpp:581–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579//-----------------------------------------------------------------------------
580
581bool SceneManager::addObjectToScene( SceneObject* object )
582{
583 AssertFatal( !object->mSceneManager, "SceneManager::addObjectToScene - Object already part of a scene" );
584
585 // Mark the object as belonging to us.
586
587 object->mSceneManager = this;
588
589 // Register with managers except its the root zone.
590
591 if( !dynamic_cast< SceneRootZone* >( object ) )
592 {
593 // Add to container.
594
595 getContainer()->addObject( object );
596
597 // Register the object with the zone manager.
598
599 if( getZoneManager() )
600 getZoneManager()->registerObject( object );
601 }
602
603 // Notify the object.
604
605 return object->onSceneAdd();
606}
607
608//-----------------------------------------------------------------------------
609

Callers 9

addToSceneMethod · 0.80
onAddMethod · 0.80
afx_emitParticlesMethod · 0.80
onAddMethod · 0.80
decalManager.cppFile · 0.80
onAddMethod · 0.80
onAddMethod · 0.80
emitParticlesMethod · 0.80

Calls 4

getContainerFunction · 0.50
addObjectMethod · 0.45
registerObjectMethod · 0.45
onSceneAddMethod · 0.45

Tested by

no test coverage detected