OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
bulletshapemanager.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_BULLETSHAPEMANAGER_H
2 #define OPENMW_COMPONENTS_BULLETSHAPEMANAGER_H
3 
4 #include <map>
5 #include <string>
6 
7 #include <osg/ref_ptr>
8 
9 #include "bulletshape.hpp"
10 #include "resourcemanager.hpp"
11 
12 namespace Resource
13 {
14  class SceneManager;
15  class NifFileManager;
16 
17  class BulletShape;
18  class BulletShapeInstance;
19 
20  class MultiObjectCache;
21 
26  {
27  public:
28  BulletShapeManager(const VFS::Manager* vfs, SceneManager* sceneMgr, NifFileManager* nifFileManager);
30 
32  osg::ref_ptr<const BulletShape> getShape(const std::string& name);
33 
37  osg::ref_ptr<BulletShapeInstance> cacheInstance(const std::string& name);
38 
40  osg::ref_ptr<BulletShapeInstance> getInstance(const std::string& name);
41 
43  virtual void updateCache(double referenceTime);
44 
45  private:
46  osg::ref_ptr<BulletShapeInstance> createInstance(const std::string& name);
47 
48  osg::ref_ptr<MultiObjectCache> mInstanceCache;
51  };
52 
53 }
54 
55 #endif
osg::ref_ptr< BulletShapeInstance > createInstance(const std::string &name)
Definition: bulletshapemanager.cpp:172
Handles loading and caching of scenes, e.g. .nif files or .osg files.
Definition: scenemanager.hpp:37
osg::ref_ptr< const BulletShape > getShape(const std::string &name)
Definition: bulletshapemanager.cpp:108
osg::ref_ptr< MultiObjectCache > mInstanceCache
Definition: bulletshapemanager.hpp:48
SceneManager * mSceneManager
Definition: bulletshapemanager.hpp:49
Handles caching of NIFFiles.
Definition: niffilemanager.hpp:15
osg::ref_ptr< BulletShapeInstance > cacheInstance(const std::string &name)
Definition: bulletshapemanager.cpp:150
~BulletShapeManager()
Definition: bulletshapemanager.cpp:103
BulletShapeManager(const VFS::Manager *vfs, SceneManager *sceneMgr, NifFileManager *nifFileManager)
Definition: bulletshapemanager.cpp:94
NifFileManager * mNifFileManager
Definition: bulletshapemanager.hpp:50
virtual void updateCache(double referenceTime)
Definition: bulletshapemanager.cpp:181
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
Base class for managers that require a virtual file system and object cache.
Definition: resourcemanager.hpp:17
osg::ref_ptr< BulletShapeInstance > getInstance(const std::string &name)
Definition: bulletshapemanager.cpp:160
Definition: bulletshapemanager.hpp:25
const char * name
Definition: crashcatcher.cpp:59