2022-10-17 04:17:21 +02:00
|
|
|
#include "CGLTFMeshFileLoader.h"
|
|
|
|
#include "coreutil.h"
|
|
|
|
#include "IAnimatedMesh.h"
|
|
|
|
#include "IReadFile.h"
|
|
|
|
#include "path.h"
|
2022-10-17 14:17:07 +02:00
|
|
|
#include "SAnimatedMesh.h"
|
2022-10-17 04:17:21 +02:00
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
|
|
|
|
namespace scene
|
|
|
|
{
|
|
|
|
|
|
|
|
CGLTFMeshFileLoader::CGLTFMeshFileLoader()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CGLTFMeshFileLoader::isALoadableFileExtension(
|
|
|
|
const io::path& filename) const
|
|
|
|
{
|
|
|
|
return core::hasFileExtension(filename, "gltf");
|
|
|
|
}
|
|
|
|
|
|
|
|
IAnimatedMesh* CGLTFMeshFileLoader::createMesh(io::IReadFile* file)
|
|
|
|
{
|
2022-10-17 14:17:07 +02:00
|
|
|
if (file->getSize() == 0) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// sorry Bjarne
|
|
|
|
SAnimatedMesh* mesh { new SAnimatedMesh {} };
|
|
|
|
|
|
|
|
return mesh;
|
2022-10-17 04:17:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace irr
|
|
|
|
|
|
|
|
} // namespace scene
|
|
|
|
|