#ifndef __GLTF_HPP_ #define __GLTF_HPP_ #include #include #include using json = nlohmann::json; #include struct mesh_part { std::vector indices; std::vector positions; std::vector normals; }; struct mesh { std::vector> nodes; }; class gltf { public: static mesh load(std::filesystem::path &path, std::string &filename); private: static void load_node(json &gltf_json, json &node, std::vector> &buffers_content, mesh& gltf_mesh); static void load_primitive(json &gltf_json, json &primitive, std::vector> &buffers_content, mesh& gltf_mesh); }; #endif