diff --git a/src/scene.cc b/src/scene.cc index 8288a8a..5beefc7 100644 --- a/src/scene.cc +++ b/src/scene.cc @@ -150,6 +150,8 @@ Scene::render() { LOG_INFO << "Rendering scene with " << shapes.size() << " objects."; printf("Rendering scene with %lu objects.\n", shapes.size()); + LogObjects(); + std::chrono::time_point start, end; start = std::chrono::system_clock::now(); @@ -326,3 +328,17 @@ Scene::trace_ray(const Ray &ray, return out_color; } + + +void +Scene::LogObjects() + const +{ + LOG_DEBUG << "BEGIN SCENE OBJECTS"; + + for (Object::Ptr obj : shapes) { + LOG_DEBUG << *obj; + } + + LOG_DEBUG << "END SCENE OBJECTS"; +} diff --git a/src/scene.h b/src/scene.h index 93ae813..0dbeb6a 100644 --- a/src/scene.h +++ b/src/scene.h @@ -53,6 +53,8 @@ public: private: Color trace_ray(const Ray &ray, const int depth = 0, const float weight = 1.0); + void LogObjects() const; + // Pixel dimensions of the image. int width, height;