From 12c36c61c3f8d19c44cb2e5ffdf3ed812a0390d2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 29 Feb 2020 03:05:36 +0100 Subject: Implement .a3d model loader (amalgine specific format) --- include/ModelLoader.hpp | 15 +++++++++++++++ include/model_loader/ObjModelLoader.hpp | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 include/ModelLoader.hpp (limited to 'include') diff --git a/include/ModelLoader.hpp b/include/ModelLoader.hpp new file mode 100644 index 0000000..bdbc458 --- /dev/null +++ b/include/ModelLoader.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "Triangle.hpp" +#include "Vec.hpp" +#include + +namespace amalgine { + class Image; + + // A model loader for .a3d files + class ModelLoader { + public: + static bool load_from_file(const char *filepath, std::vector &triangles, std::vector &texture_coords, Image **image); + }; +} \ No newline at end of file diff --git a/include/model_loader/ObjModelLoader.hpp b/include/model_loader/ObjModelLoader.hpp index 5078244..1020348 100644 --- a/include/model_loader/ObjModelLoader.hpp +++ b/include/model_loader/ObjModelLoader.hpp @@ -9,6 +9,6 @@ namespace amalgine { class ObjModelLoader { public: - static void load_from_file(const char *filepath, std::vector &triangles, std::vector &texture_coords, Image **image); + static bool load_from_file(const char *filepath, std::vector &triangles, std::vector &texture_coords, Image **image); }; } \ No newline at end of file -- cgit v1.2.3