aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-02-29 03:05:36 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-18 15:22:10 +0100
commit12c36c61c3f8d19c44cb2e5ffdf3ed812a0390d2 (patch)
tree5c45ed12702335ba5a30706ba413daab95995af9 /include
parentc3453fedbd270afe8d9dfc7f288ea7205f029b86 (diff)
Implement .a3d model loader (amalgine specific format)
Diffstat (limited to 'include')
-rw-r--r--include/ModelLoader.hpp15
-rw-r--r--include/model_loader/ObjModelLoader.hpp2
2 files changed, 16 insertions, 1 deletions
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 <vector>
+
+namespace amalgine {
+ class Image;
+
+ // A model loader for .a3d files
+ class ModelLoader {
+ public:
+ static bool load_from_file(const char *filepath, std::vector<Triangle3D> &triangles, std::vector<vec2f> &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<Triangle3D> &triangles, std::vector<vec2f> &texture_coords, Image **image);
+ static bool load_from_file(const char *filepath, std::vector<Triangle3D> &triangles, std::vector<vec2f> &texture_coords, Image **image);
};
} \ No newline at end of file