~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to source/Irrlicht/CSceneLoaderIrr.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __C_SCENE_LOADER_IRR_H_INCLUDED__
 
2
#define __C_SCENE_LOADER_IRR_H_INCLUDED__
 
3
 
 
4
#include "ISceneLoader.h"
 
5
 
 
6
#include "IXMLReader.h"
 
7
 
 
8
namespace irr
 
9
{
 
10
 
 
11
namespace io
 
12
{
 
13
        class IFileSystem;
 
14
}
 
15
 
 
16
namespace scene
 
17
{
 
18
 
 
19
class ISceneManager;
 
20
 
 
21
//! Class which can load a scene into the scene manager.
 
22
class CSceneLoaderIrr : public virtual ISceneLoader
 
23
{
 
24
public:
 
25
 
 
26
        //! Constructor
 
27
        CSceneLoaderIrr(ISceneManager *smgr, io::IFileSystem* fs);
 
28
 
 
29
        //! Destructor
 
30
        virtual ~CSceneLoaderIrr();
 
31
 
 
32
        //! Returns true if the class might be able to load this file.
 
33
        virtual bool isALoadableFileExtension(const io::path& filename) const;
 
34
 
 
35
        //! Returns true if the class might be able to load this file.
 
36
        virtual bool isALoadableFileFormat(io::IReadFile *file) const;
 
37
 
 
38
        //! Loads the scene into the scene manager.
 
39
        virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0,
 
40
                               ISceneNode* rootNode=0);
 
41
 
 
42
private:
 
43
 
 
44
        //! Recursively reads nodes from the xml file
 
45
        void readSceneNode(io::IXMLReader* reader, ISceneNode* parent,
 
46
                ISceneUserDataSerializer* userDataSerializer);
 
47
 
 
48
        //! read a node's materials
 
49
        void readMaterials(io::IXMLReader* reader, ISceneNode* node);
 
50
 
 
51
        //! read a node's animators
 
52
        void readAnimators(io::IXMLReader* reader, ISceneNode* node);
 
53
 
 
54
        //! read any other data into the user serializer
 
55
        void readUserData(io::IXMLReader* reader, ISceneNode* node,
 
56
                ISceneUserDataSerializer* userDataSerializer);
 
57
 
 
58
        ISceneManager   *SceneManager;
 
59
        io::IFileSystem *FileSystem;
 
60
 
 
61
        //! constants for reading and writing XML.
 
62
        //! Not made static due to portability problems.
 
63
        // TODO: move to own header
 
64
        const core::stringw IRR_XML_FORMAT_SCENE;
 
65
        const core::stringw IRR_XML_FORMAT_NODE;
 
66
        const core::stringw IRR_XML_FORMAT_NODE_ATTR_TYPE;
 
67
        const core::stringw IRR_XML_FORMAT_ATTRIBUTES;
 
68
        const core::stringw IRR_XML_FORMAT_MATERIALS;
 
69
        const core::stringw IRR_XML_FORMAT_ANIMATORS;
 
70
        const core::stringw IRR_XML_FORMAT_USERDATA;
 
71
};
 
72
 
 
73
 
 
74
} // end namespace scene
 
75
} // end namespace irr
 
76
 
 
77
#endif
 
78