OpenMW
|
#include <bulletshapemanager.hpp>
Public Member Functions | |
BulletShapeManager (const VFS::Manager *vfs, SceneManager *sceneMgr, NifFileManager *nifFileManager) | |
~BulletShapeManager () | |
osg::ref_ptr< const BulletShape > | getShape (const std::string &name) |
osg::ref_ptr< BulletShapeInstance > | cacheInstance (const std::string &name) |
osg::ref_ptr< BulletShapeInstance > | getInstance (const std::string &name) |
virtual void | updateCache (double referenceTime) |
Public Member Functions inherited from Resource::ResourceManager | |
ResourceManager (const VFS::Manager *vfs) | |
virtual | ~ResourceManager () |
void | setExpiryDelay (double expiryDelay) |
How long to keep objects in cache after no longer being referenced. More... | |
const VFS::Manager * | getVFS () const |
Private Member Functions | |
osg::ref_ptr< BulletShapeInstance > | createInstance (const std::string &name) |
Private Attributes | |
osg::ref_ptr< MultiObjectCache > | mInstanceCache |
SceneManager * | mSceneManager |
NifFileManager * | mNifFileManager |
Additional Inherited Members | |
Protected Attributes inherited from Resource::ResourceManager | |
const VFS::Manager * | mVFS |
osg::ref_ptr < Resource::ObjectCache > | mCache |
double | mExpiryDelay |
Handles loading, caching and "instancing" of bullet shapes. A shape 'instance' is a clone of another shape, with the goal of setting a different scale on this instance.
Resource::BulletShapeManager::BulletShapeManager | ( | const VFS::Manager * | vfs, |
SceneManager * | sceneMgr, | ||
NifFileManager * | nifFileManager | ||
) |
Resource::BulletShapeManager::~BulletShapeManager | ( | ) |
osg::ref_ptr< BulletShapeInstance > Resource::BulletShapeManager::cacheInstance | ( | const std::string & | name | ) |
Create an instance of the given shape and cache it for later use, so that future calls to getInstance() can simply return the cached instance instead of having to create a new one.
|
private |
osg::ref_ptr< BulletShapeInstance > Resource::BulletShapeManager::getInstance | ( | const std::string & | name | ) |
osg::ref_ptr< const BulletShape > Resource::BulletShapeManager::getShape | ( | const std::string & | name | ) |
|
virtual |
Reimplemented from Resource::ResourceManager.
|
private |
|
private |
|
private |