diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-09-26 23:57:26 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-09-26 23:57:26 +0200 |
| commit | c5119193ffaedf4ac94fecfb434a3292a4746259 (patch) | |
| tree | 398031c5d1e920fec21e53feacd1d55ba8a79dad /include/gltf.hpp | |
| parent | bbba71cfe5a9545f1a87c70eb3cab3b6b08b1b25 (diff) | |
Refactor gltf loading and triangles attributes
Diffstat (limited to 'include/gltf.hpp')
| -rw-r--r-- | include/gltf.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/gltf.hpp b/include/gltf.hpp index 0a63ba6..7df5e7a 100644 --- a/include/gltf.hpp +++ b/include/gltf.hpp @@ -16,14 +16,18 @@ using json = nlohmann::json; struct mesh_part {
std::vector<uint16_t> indices;
- std::vector<vec3> positions;
- std::vector<vec3> normals;
- std::vector<vec3> uvs;
+ std::vector<float> positions;
+ std::vector<float> normals;
+ std::vector<float> uvs;
material mat;
+ uint32_t triangles_count = 0;
+ uint32_t vertices_count = 0;
};
struct mesh {
std::vector<mesh_part> parts;
+ uint32_t triangles_count = 0;
+ uint32_t vertices_count = 0;
};
struct node {
|
