---------------------------------------------------------------------
| 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 | { |
nothing calls this directly
no test coverage detected