|
|
@ -141,11 +141,8 @@ osg::ref_ptr<const BulletShape> BulletShapeManager::getShape(const std::string &
|
|
|
|
node->accept(visitor);
|
|
|
|
node->accept(visitor);
|
|
|
|
shape = visitor.getShape();
|
|
|
|
shape = visitor.getShape();
|
|
|
|
if (!shape)
|
|
|
|
if (!shape)
|
|
|
|
{
|
|
|
|
|
|
|
|
mCache->addEntryToObjectCache(normalized, NULL);
|
|
|
|
|
|
|
|
return osg::ref_ptr<BulletShape>();
|
|
|
|
return osg::ref_ptr<BulletShape>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mCache->addEntryToObjectCache(normalized, shape);
|
|
|
|
mCache->addEntryToObjectCache(normalized, shape);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -158,6 +155,7 @@ osg::ref_ptr<BulletShapeInstance> BulletShapeManager::cacheInstance(const std::s
|
|
|
|
mVFS->normalizeFilename(normalized);
|
|
|
|
mVFS->normalizeFilename(normalized);
|
|
|
|
|
|
|
|
|
|
|
|
osg::ref_ptr<BulletShapeInstance> instance = createInstance(normalized);
|
|
|
|
osg::ref_ptr<BulletShapeInstance> instance = createInstance(normalized);
|
|
|
|
|
|
|
|
if (instance)
|
|
|
|
mInstanceCache->addEntryToObjectCache(normalized, instance.get());
|
|
|
|
mInstanceCache->addEntryToObjectCache(normalized, instance.get());
|
|
|
|
return instance;
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
}
|
|
|
|