#ifndef __C_SCENE_LOADER_IRR_H_INCLUDED__
#define __C_SCENE_LOADER_IRR_H_INCLUDED__
#include "ISceneLoader.h"
#include "IXMLReader.h"
namespace irr
{
namespace io
{
class IFileSystem;
}
namespace scene
{
class ISceneManager;
class CSceneLoaderIrr : public virtual ISceneLoader
{
public:
CSceneLoaderIrr(ISceneManager *smgr, io::IFileSystem* fs);
virtual ~CSceneLoaderIrr();
virtual bool isALoadableFileExtension(const io::path& filename) const;
virtual bool isALoadableFileFormat(io::IReadFile *file) const;
virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0,
ISceneNode* rootNode=0);
private:
void readSceneNode(io::IXMLReader* reader, ISceneNode* parent,
ISceneUserDataSerializer* userDataSerializer);
void readMaterials(io::IXMLReader* reader, ISceneNode* node);
void readAnimators(io::IXMLReader* reader, ISceneNode* node);
void readUserData(io::IXMLReader* reader, ISceneNode* node,
ISceneUserDataSerializer* userDataSerializer);
ISceneManager *SceneManager;
io::IFileSystem *FileSystem;
const core::stringw IRR_XML_FORMAT_SCENE;
const core::stringw IRR_XML_FORMAT_NODE;
const core::stringw IRR_XML_FORMAT_NODE_ATTR_TYPE;
const core::stringw IRR_XML_FORMAT_ATTRIBUTES;
const core::stringw IRR_XML_FORMAT_MATERIALS;
const core::stringw IRR_XML_FORMAT_ANIMATORS;
const core::stringw IRR_XML_FORMAT_USERDATA;
};
}
}
#endif