~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to include/ISceneLoader.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 __I_SCENE_LOADER_H_INCLUDED__
 
2
#define __I_SCENE_LOADER_H_INCLUDED__
 
3
 
 
4
#include "IReferenceCounted.h"
 
5
#include "path.h"
 
6
 
 
7
namespace irr
 
8
{
 
9
namespace io
 
10
{
 
11
        class IReadFile;
 
12
} // end namespace io
 
13
namespace scene
 
14
{
 
15
        class ISceneNode;
 
16
        class ISceneUserDataSerializer;
 
17
 
 
18
//! Class which can load a scene into the scene manager.
 
19
/** If you want Irrlicht to be able to load currently unsupported
 
20
scene file formats (e.g. .vrml), then implement this and add your
 
21
new Sceneloader to the engine with ISceneManager::addExternalSceneLoader(). */
 
22
class ISceneLoader : public virtual IReferenceCounted
 
23
{
 
24
public:
 
25
 
 
26
        //! Returns true if the class might be able to load this file.
 
27
        /** This decision should be based on the file extension (e.g. ".vrml")
 
28
        only.
 
29
        \param fileName Name of the file to test.
 
30
        \return True if the extension is a recognised type. */
 
31
        virtual bool isALoadableFileExtension(const io::path& filename) const = 0;
 
32
 
 
33
        //! Returns true if the class might be able to load this file.
 
34
        /** This decision will be based on a quick look at the contents of the file.
 
35
        \param file The file to test.
 
36
        \return True if the extension is a recognised type. */
 
37
        virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0;
 
38
 
 
39
        //! Loads the scene into the scene manager.
 
40
        /** \param file File which contains the scene.
 
41
        \param userDataSerializer: If you want to load user data which may be attached
 
42
        to some some scene nodes in the file, implement the ISceneUserDataSerializer
 
43
        interface and provide it as parameter here. Otherwise, simply specify 0 as this
 
44
        parameter.
 
45
        \param rootNode The node to load the scene into, if none is provided then the
 
46
        scene will be loaded into the root node.
 
47
        \return Returns true on success, false on failure. Returns 0 if loading failed. */
 
48
        virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0,
 
49
                               ISceneNode* rootNode=0) = 0;
 
50
 
 
51
};
 
52
 
 
53
 
 
54
} // end namespace scene
 
55
} // end namespace irr
 
56
 
 
57
#endif
 
58