aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/ISceneLoader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/ISceneLoader.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/ISceneLoader.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/ISceneLoader.h b/src/others/irrlicht-1.8.1/include/ISceneLoader.h
new file mode 100644
index 0000000..c71c15d
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/ISceneLoader.h
@@ -0,0 +1,62 @@
1// Copyright (C) 2010-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_SCENE_LOADER_H_INCLUDED__
6#define __I_SCENE_LOADER_H_INCLUDED__
7
8#include "IReferenceCounted.h"
9#include "path.h"
10
11namespace irr
12{
13namespace io
14{
15 class IReadFile;
16} // end namespace io
17namespace scene
18{
19 class ISceneNode;
20 class ISceneUserDataSerializer;
21
22//! Class which can load a scene into the scene manager.
23/** If you want Irrlicht to be able to load currently unsupported
24scene file formats (e.g. .vrml), then implement this and add your
25new Sceneloader to the engine with ISceneManager::addExternalSceneLoader(). */
26class ISceneLoader : public virtual IReferenceCounted
27{
28public:
29
30 //! Returns true if the class might be able to load this file.
31 /** This decision should be based on the file extension (e.g. ".vrml")
32 only.
33 \param filename Name of the file to test.
34 \return True if the extension is a recognised type. */
35 virtual bool isALoadableFileExtension(const io::path& filename) const = 0;
36
37 //! Returns true if the class might be able to load this file.
38 /** This decision will be based on a quick look at the contents of the file.
39 \param file The file to test.
40 \return True if the extension is a recognised type. */
41 virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0;
42
43 //! Loads the scene into the scene manager.
44 /** \param file File which contains the scene.
45 \param userDataSerializer: If you want to load user data which may be attached
46 to some some scene nodes in the file, implement the ISceneUserDataSerializer
47 interface and provide it as parameter here. Otherwise, simply specify 0 as this
48 parameter.
49 \param rootNode The node to load the scene into, if none is provided then the
50 scene will be loaded into the root node.
51 \return Returns true on success, false on failure. Returns 0 if loading failed. */
52 virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0,
53 ISceneNode* rootNode=0) = 0;
54
55};
56
57
58} // end namespace scene
59} // end namespace irr
60
61#endif
62