OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Resource::BulletShapeManager Class Reference

#include <bulletshapemanager.hpp>

Inheritance diagram for Resource::BulletShapeManager:
Collaboration diagram for Resource::BulletShapeManager:

Public Member Functions

 BulletShapeManager (const VFS::Manager *vfs, SceneManager *sceneMgr, NifFileManager *nifFileManager)
 
 ~BulletShapeManager ()
 
osg::ref_ptr< const BulletShapegetShape (const std::string &name)
 
osg::ref_ptr< BulletShapeInstancecacheInstance (const std::string &name)
 
osg::ref_ptr< BulletShapeInstancegetInstance (const std::string &name)
 
virtual void updateCache (double referenceTime)
 
virtual void clearCache ()
 Clear all cache entries. More...
 
void reportStats (unsigned int frameNumber, osg::Stats *stats) const
 
- 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::ManagergetVFS () const
 
virtual void releaseGLObjects (osg::State *state)
 

Private Member Functions

osg::ref_ptr< BulletShapeInstancecreateInstance (const std::string &name)
 

Private Attributes

osg::ref_ptr< MultiObjectCachemInstanceCache
 
SceneManagermSceneManager
 
NifFileManagermNifFileManager
 

Additional Inherited Members

- Protected Attributes inherited from Resource::ResourceManager
const VFS::ManagermVFS
 
osg::ref_ptr
< Resource::ObjectCache
mCache
 
double mExpiryDelay
 

Detailed Description

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.

Note
May be used from any thread.

Constructor & Destructor Documentation

Resource::BulletShapeManager::BulletShapeManager ( const VFS::Manager vfs,
SceneManager sceneMgr,
NifFileManager nifFileManager 
)
Resource::BulletShapeManager::~BulletShapeManager ( )

Member Function Documentation

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.

Note
The returned ref_ptr may be kept by the caller to ensure that the instance stays in cache for as long as needed.

Here is the call graph for this function:

Here is the caller graph for this function:

void Resource::BulletShapeManager::clearCache ( )
virtual

Clear all cache entries.

Reimplemented from Resource::ResourceManager.

Here is the call graph for this function:

osg::ref_ptr< BulletShapeInstance > Resource::BulletShapeManager::createInstance ( const std::string &  name)
private

Here is the call graph for this function:

Here is the caller graph for this function:

osg::ref_ptr< BulletShapeInstance > Resource::BulletShapeManager::getInstance ( const std::string &  name)
Note
May return a null pointer if the object has no shape.

Here is the call graph for this function:

osg::ref_ptr< const BulletShape > Resource::BulletShapeManager::getShape ( const std::string &  name)
Note
May return a null pointer if the object has no shape.

Here is the call graph for this function:

Here is the caller graph for this function:

void Resource::BulletShapeManager::reportStats ( unsigned int  frameNumber,
osg::Stats *  stats 
) const
virtual

Reimplemented from Resource::ResourceManager.

void Resource::BulletShapeManager::updateCache ( double  referenceTime)
virtual
See Also
ResourceManager::updateCache

Reimplemented from Resource::ResourceManager.

Here is the call graph for this function:

Member Data Documentation

osg::ref_ptr<MultiObjectCache> Resource::BulletShapeManager::mInstanceCache
private
NifFileManager* Resource::BulletShapeManager::mNifFileManager
private
SceneManager* Resource::BulletShapeManager::mSceneManager
private

The documentation for this class was generated from the following files: