OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
nifloader.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_NIFOSG_LOADER
2 #define OPENMW_COMPONENTS_NIFOSG_LOADER
3 
5 
6 #include <osg/ref_ptr>
7 #include <osg/Referenced>
8 
9 #include "controller.hpp"
10 
11 namespace osg
12 {
13  class Node;
14 }
15 
16 namespace Resource
17 {
18  class ImageManager;
19 }
20 
21 namespace NifOsg
22 {
23  typedef std::multimap<float,std::string> TextKeyMap;
24 
25  struct TextKeyMapHolder : public osg::Object
26  {
27  public:
29  TextKeyMapHolder(const TextKeyMapHolder& copy, const osg::CopyOp& copyop)
30  : osg::Object(copy, copyop)
31  , mTextKeys(copy.mTextKeys)
32  {}
33 
35 
36  META_Object(NifOsg, TextKeyMapHolder)
37 
38  };
39 
40  class KeyframeHolder : public osg::Object
41  {
42  public:
44  KeyframeHolder(const KeyframeHolder& copy, const osg::CopyOp& copyop)
45  : mTextKeys(copy.mTextKeys)
47  {
48  }
49 
51 
52  META_Object(OpenMW, KeyframeHolder)
53 
54  typedef std::map<std::string, osg::ref_ptr<const KeyframeController> > KeyframeControllerMap;
55  KeyframeControllerMap mKeyframeControllers;
56  };
57 
61  class Loader
62  {
63  public:
65  static osg::ref_ptr<osg::Node> load(Nif::NIFFilePtr file, Resource::ImageManager* imageManager);
66 
68  static void loadKf(Nif::NIFFilePtr kf, KeyframeHolder& target);
69 
73  static void setShowMarkers(bool show);
74 
75  static bool getShowMarkers();
76 
77  private:
78 
79  static bool sShowMarkers;
80  };
81 
82 }
83 
84 #endif
std::multimap< float, std::string > TextKeyMap
Definition: nifloader.hpp:23
static bool sShowMarkers
Definition: nifloader.hpp:79
META_Object(OpenMW, KeyframeHolder) typedef std KeyframeControllerMap mKeyframeControllers
Definition: nifloader.hpp:52
TextKeyMapHolder(const TextKeyMapHolder &copy, const osg::CopyOp &copyop)
Definition: nifloader.hpp:29
KeyframeHolder()
Definition: nifloader.hpp:43
Handles loading/caching of Images.
Definition: imagemanager.hpp:23
Definition: nifloader.hpp:40
Definition: controller.hpp:195
int load(Arguments &info)
Definition: esmtool.cpp:302
TextKeyMapHolder()
Definition: nifloader.hpp:28
Definition: nifloader.hpp:61
boost::shared_ptr< const Nif::NIFFile > NIFFilePtr
Definition: niffile.hpp:95
TextKeyMap mTextKeys
Definition: nifloader.hpp:34
TextKeyMap mTextKeys
Definition: nifloader.hpp:50
KeyframeHolder(const KeyframeHolder &copy, const osg::CopyOp &copyop)
Definition: nifloader.hpp:44
Definition: nifloader.hpp:25