#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_MD3_LOADER_
#include "CMD3MeshFileLoader.h"
#include "CAnimatedMeshMD3.h"
#include "irrString.h"
namespace irr
{
namespace scene
{
CMD3MeshFileLoader::CMD3MeshFileLoader( scene::ISceneManager* smgr)
: SceneManager(smgr)
{
}
CMD3MeshFileLoader::~CMD3MeshFileLoader()
{
}
bool CMD3MeshFileLoader::isALoadableFileExtension(const io::path& filename) const
{
return core::hasFileExtension ( filename, "md3" );
}
IAnimatedMesh* CMD3MeshFileLoader::createMesh(io::IReadFile* file)
{
CAnimatedMeshMD3 * mesh = new CAnimatedMeshMD3();
if ( mesh->loadModelFile ( 0, file, SceneManager->getFileSystem(), SceneManager->getVideoDriver() ) )
return mesh;
mesh->drop ();
return 0;
}
}
}
#endif