From 5692f616c6201b39184e4353b6a4cb850a84a450 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 15 Jun 2022 23:02:29 +0200 Subject: Fix formatting and linting --- include/gltf.hpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'include/gltf.hpp') diff --git a/include/gltf.hpp b/include/gltf.hpp index 7df5e7a..0364ca8 100644 --- a/include/gltf.hpp +++ b/include/gltf.hpp @@ -10,46 +10,46 @@ using json = nlohmann::json; #include "material.hpp" -#include "vec3.hpp" #include "vk-renderer.hpp" struct mesh_part { - std::vector indices; - std::vector positions; - std::vector normals; - std::vector uvs; - material mat; - uint32_t triangles_count = 0; - uint32_t vertices_count = 0; + std::vector indices; + std::vector positions; + std::vector normals; + std::vector uvs; + material mat; + uint32_t triangles_count = 0; + uint32_t vertices_count = 0; }; struct mesh { std::vector parts; - uint32_t triangles_count = 0; - uint32_t vertices_count = 0; + uint32_t triangles_count = 0; + uint32_t vertices_count = 0; }; struct node { - std::vector children; + std::vector children; std::optional mesh; }; class gltf { -public: + public: static node load(std::filesystem::path &path, std::string &filename, vkrenderer &renderer); -private: - + private: static void load_node(json &gltf_json, uint32_t index, node &parent, std::vector &meshes); - static std::vector load_meshes(json &gltf_json, std::vector> &buffers_content, std::vector &materials); + static std::vector load_meshes( + json &gltf_json, std::vector> &buffers_content, std::vector &materials); static std::vector load_textures(json &gltf_json, std::filesystem::path &path, vkrenderer &renderer); static std::vector load_materials(json &gltf_json, std::vector &textures); - static mesh_part load_primitive(json &gltf_json, json &primitive, std::vector> &buffers_content, std::vector &materials); + static mesh_part load_primitive(json &gltf_json, json &primitive, + std::vector> &buffers_content, std::vector &materials); }; #endif -- cgit v1.3