MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / createMovableObject

Method createMovableObject

OgreMain/src/OgreSceneManager.cpp:4023–4045  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

4021 }
4022 //---------------------------------------------------------------------
4023 MovableObject *SceneManager::createMovableObject( const String &typeName,
4024 ObjectMemoryManager *objectMemMgr,
4025 const NameValuePairList *params )
4026 {
4027 // Nasty hack to make generalised Camera functions work without breaking add-on SMs
4028 if( typeName == "Camera" )
4029 {
4030 return createCamera( "", true );
4031 }
4032 MovableObjectFactory *factory = Root::getSingleton().getMovableObjectFactory( typeName );
4033 // Check for duplicate names
4034 MovableObjectCollection *objectMap = getMovableObjectCollection( typeName );
4035
4036 {
4037 OGRE_LOCK_MUTEX( objectMap->mutex );
4038
4039 MovableObject *newObj = factory->createInstance( Id::generateNewId<MovableObject>(),
4040 objectMemMgr, this, params );
4041 objectMap->movableObjects.push_back( newObj );
4042 newObj->mGlobalIndex = objectMap->movableObjects.size() - 1;
4043 return newObj;
4044 }
4045 }
4046 //---------------------------------------------------------------------
4047 bool SceneManager::hasMovableObject( MovableObject *m )
4048 {

Callers

nothing calls this directly

Calls 4

createInstanceMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected