irrlicht/source/Irrlicht/CB3DJSONMeshFileLoader.cpp

48 lines
1.0 KiB
C++
Raw Normal View History

2023-11-26 08:53:55 +01:00
#include "CB3DJSONMeshFileLoader.h"
#include "coreutil.h"
2023-11-26 07:43:26 +01:00
#include "IAnimatedMesh.h"
#include "IReadFile.h"
#include "path.h"
2023-11-26 08:39:42 +01:00
#include "json/json.hpp"
2023-11-26 07:48:13 +01:00
namespace irr
{
namespace scene
{
2023-11-26 09:09:50 +01:00
//! Remember to remove this function. It's very dumb.
void println(const char* data) {
printf(data, "\n");
}
2023-11-26 08:53:55 +01:00
// Class methods.
2023-11-26 08:03:32 +01:00
CB3DJSONMeshFileLoader::CB3DJSONMeshFileLoader()
{
2023-11-26 08:53:55 +01:00
2023-11-26 08:03:32 +01:00
}
2023-11-26 07:48:13 +01:00
2023-11-26 08:03:32 +01:00
bool CB3DJSONMeshFileLoader::isALoadableFileExtension(
const io::path& fileName) const
{
2023-11-26 08:53:55 +01:00
//* we could do multiple accepted extensions, like b3dj jb3d, j3d, etc. Talk with core devs about this.
2023-11-26 08:03:32 +01:00
return core::hasFileExtension(fileName, "b3djson");
}
2023-11-26 07:48:13 +01:00
2023-11-26 08:53:55 +01:00
IAnimatedMesh* CB3DJSONMeshFileLoader::createMesh(io::IReadFile* file) {
2023-11-26 09:09:50 +01:00
println("I am loading your cool file, yay");
printf("the file is called: ");
println(file->getFileName().c_str());
// Less than zero? What is this file a black hole?
if (file->getSize() <= 0) {
return nullptr;
}
2023-11-26 08:53:55 +01:00
//! I'm sure this isn't a horrible idea!
return nullptr;
}
2023-11-26 07:48:13 +01:00
} // namespace scene
} // namespace irr