23 using std::unique_ptr;
41 vector<string> ModelReader::extensions = {{
"dae",
"fbx",
"glb",
"gltf",
"tm",
"tmodel"}};
43 const vector<string>& ModelReader::getModelExtensions() {
50 if (StringTools::endsWith(StringTools::toLowerCase(fileName),
".dae") ==
true) {
53 if (StringTools::endsWith(StringTools::toLowerCase(fileName),
".fbx") ==
true) {
56 if (StringTools::endsWith(StringTools::toLowerCase(fileName),
".glb") ==
true) {
59 if (StringTools::endsWith(StringTools::toLowerCase(fileName),
".gltf") ==
true) {
62 if (StringTools::endsWith(StringTools::toLowerCase(fileName),
".tm") ==
true) {
63 return TMReader::read(pathName, fileName, useBC7TextureCompression);
65 if (StringTools::endsWith(StringTools::toLowerCase(fileName),
".tmodel") ==
true) {
66 unique_ptr<Prototype> prototype(PrototypeReader::read(pathName, fileName));
67 if (prototype !=
nullptr && prototype->getModel() !=
nullptr) {
68 auto model = prototype->unsetModel();
77 Console::println(
"ModelReader::read(): Could not load model: " + pathName +
"/" + fileName +
": " + exception.what());
Collada DAE model reader.
static Model * read(const string &pathName, const string &fileName, bool useBC7TextureCompression=true)
Reads Collada DAE file.
static Model * read(const string &pathName, const string &fileName, bool useBC7TextureCompression=true)
Reads FBX file.
static Model * read(const string &pathName, const string &fileName, bool useBC7TextureCompression=true)
Reads GLTF file.
static STATIC_DLL_IMPEXT vector< string > extensions
static Model * read(const string &pathName, const string &fileName, bool useBC7TextureCompression=true)
Reads a model.
static Model * read(const string &pathName, const string &fileName, bool useBC7TextureCompression=true)
TDME model format reader.
Representation of a 3D model.
File system singleton class.
std::exception Exception
Exception base class.