From b366f3d0c573468ecd0b59da43dfcbc847334b19 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 14 Feb 2020 17:09:48 +0100 Subject: Add obj parser --- include/DataView.hpp | 2 ++ include/File.hpp | 7 +++++++ include/model_loader/ObjModelLoader.hpp | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100644 include/File.hpp create mode 100644 include/model_loader/ObjModelLoader.hpp (limited to 'include') 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; } 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 + +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 + +namespace amalgine { + class ObjModelLoader { + public: + static void load_from_file(const char *filepath, std::vector &triangles); + }; +} \ No newline at end of file -- cgit v1.2.3