1
#ifndef __I_SCENE_LOADER_H_INCLUDED__
2
#define __I_SCENE_LOADER_H_INCLUDED__
4
#include "IReferenceCounted.h"
16
class ISceneUserDataSerializer;
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
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")
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;
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;
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
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;
54
} // end namespace scene
55
} // end namespace irr