Commit 51dcb203 authored by Jan Möbius's avatar Jan Möbius

Speedup getObject for triangle meshes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15084 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e35b116f
......@@ -89,7 +89,10 @@ bool getObject( int _identifier , TriMeshObject*& _object ) {
return false;
}
BaseObject* object = objectRoot()->childExists( _identifier );
// Get object by using the map accelerated plugin function
BaseObjectData* object = 0;
PluginFunctions::getObject(_identifier,object);
_object = dynamic_cast< TriMeshObject* >(object);
return ( _object != 0 );
}
......@@ -105,7 +108,9 @@ bool getMesh( int _identifier , TriMesh*& _mesh ) {
return false;
}
BaseObject* object = objectRoot()->childExists( _identifier );
// Get object by using the map accelerated plugin function
BaseObjectData* object = 0;
PluginFunctions::getObject(_identifier,object);
// Unable to find object
if ( object == 0)
......@@ -162,7 +167,9 @@ TriMeshObject* triMeshObject( int _objectId ) {
if (_objectId == -1)
return 0;
BaseObject* object = objectRoot()->childExists( _objectId );
// Get object by using the map accelerated plugin function
BaseObjectData* object = 0;
PluginFunctions::getObject(_objectId,object);
if ( object == 0 )
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment