aboutsummaryrefslogtreecommitdiffstats
path: root/src/scene.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2022-08-04 23:35:13 +0200
committerladevieq <ladevie.quentin@gmail.com>2022-08-04 23:35:13 +0200
commit8279a357f6f35d58a4c81d84c3c44a7da687b170 (patch)
tree20e4dae3824bb485e34a43e44f6e468ed0afffd0 /src/scene.cpp
parent969dd101a08997dc318207b6994201d5161d0bd3 (diff)
Fix most warnings
Diffstat (limited to 'src/scene.cpp')
-rw-r--r--src/scene.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/scene.cpp b/src/scene.cpp
index d32a696..d62e309 100644
--- a/src/scene.cpp
+++ b/src/scene.cpp
@@ -5,6 +5,8 @@
#include "vk-renderer.hpp"
#include "gltf.hpp"
+#include "bvh.hpp"
+#include "material.hpp"
// void scene::random_scene() {
// material ground_material = { { 0.5, 0.5, 0.5 } };
@@ -55,8 +57,20 @@
// spheres_count = spheres.size();
// }
-scene::scene(camera cam, uint32_t width, uint32_t height, vkrenderer &renderer)
- :meta(std::move(cam), width, height){
+
+scene::metadata::metadata(const camera &cam, uint32_t width, uint32_t height)
+ : cam(cam), width(width), height(height) {}
+
+scene::scene(const camera& cam, uint32_t width, uint32_t height)
+ :meta(cam, width, height){
+
+ // Geometry & BVH
+ std::vector<uint32_t> indices;
+ std::vector<float> positions;
+ std::vector<float> normals;
+ std::vector<float> uvs;
+ std::vector<material> materials;
+ std::vector<packed_bvh_node> packed_nodes;
// auto bistro_interior_path = std::filesystem::path("../models/BistroInterior");
// auto bistro_interior_filename = std::string("BistroInterior.gltf");