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

Method addObjectToScene

Engine/source/scene/sceneManager.cpp:580–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 7

addToSceneMethod · 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