diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2022-08-19 12:13:16 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2022-08-19 12:13:16 +0200 |
| commit | ae0ea5fb65b0340eabf4e9e424ba79787600dc1b (patch) | |
| tree | ee2d117c2baead26308b2fa240a90c080b191452 /include | |
| parent | d78200b71b259b87f401b24906385af4e2553fbe (diff) | |
Generate BVH using new mesh data structure
Diffstat (limited to 'include')
| -rw-r--r-- | include/mesh.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mesh.hpp b/include/mesh.hpp index 34f2df8..03dbcfc 100644 --- a/include/mesh.hpp +++ b/include/mesh.hpp @@ -68,6 +68,14 @@ public: [[nodiscard]] inline uint32_t triangle_count() const { return index_count / 3; }; [[nodiscard]] inline uint32_t vertices_count() const { return vertex_count; }; + [[nodiscard]] inline const std::vector<submesh_info>& get_submeshes() const { return submeshes; }; + + [[nodiscard]] inline const std::vector<float>& get_attribute(enum ATTRIBUTE_TYPE attribute_type) const { + return attributes[(uint32_t)attribute_type]; + }; + + [[nodiscard]] inline const std::vector<uint16_t>& get_indices() const { return indices; } + static void register_mesh(const Mesh& mesh); |
