diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-02-14 17:09:48 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-18 15:22:10 +0100 |
commit | b366f3d0c573468ecd0b59da43dfcbc847334b19 (patch) | |
tree | 543a781260fc23197e301c6e2e42107a0a914027 /include | |
parent | 83c78e2b5cc9b0cb737ec3785722ae280bd29b65 (diff) |
Add obj parser
Diffstat (limited to 'include')
-rw-r--r-- | include/DataView.hpp | 2 | ||||
-rw-r--r-- | include/File.hpp | 7 | ||||
-rw-r--r-- | include/model_loader/ObjModelLoader.hpp | 11 |
3 files changed, 20 insertions, 0 deletions
diff --git a/include/DataView.hpp b/include/DataView.hpp index c9e25e7..d4200c5 100644 --- a/include/DataView.hpp +++ b/include/DataView.hpp @@ -23,4 +23,6 @@ namespace amalgine T *data; usize size; }; + + using StringView = DataView<char>; } diff --git a/include/File.hpp b/include/File.hpp new file mode 100644 index 0000000..6c5212f --- /dev/null +++ b/include/File.hpp @@ -0,0 +1,7 @@ +#pragma once + +#include <stddef.h> + +namespace amalgine { + char* file_get_content(const char *filepath, size_t *filesize); +}
\ No newline at end of file diff --git a/include/model_loader/ObjModelLoader.hpp b/include/model_loader/ObjModelLoader.hpp new file mode 100644 index 0000000..3cdeb7d --- /dev/null +++ b/include/model_loader/ObjModelLoader.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "../Triangle.hpp" +#include <vector> + +namespace amalgine { + class ObjModelLoader { + public: + static void load_from_file(const char *filepath, std::vector<Triangle3D> &triangles); + }; +}
\ No newline at end of file |