#include "Renderer.hpp" #include "Scene.hpp" #include "Triangle.hpp" #include "Vector.hpp" #include "global.hpp" #include // In the main function of the program, we create the scene (create objects and // lights) as well as set the options for the render (image width and height, // maximum recursion depth, field-of-view, etc.). We then call the render // function(). int main(int argc, char** argv) { Scene scene(1280, 960); MeshTriangle bunny("../models/bunny/bunny.obj"); scene.Add(&bunny); scene.Add(std::make_unique(Vector3f(-20, 70, 20), 1)); scene.Add(std::make_unique(Vector3f(20, 70, 20), 1)); scene.buildBVH(); Renderer r; auto start = std::chrono::system_clock::now(); r.Render(scene); auto stop = std::chrono::system_clock::now(); std::cout << "Render complete: \n"; std::cout << "Time taken: " << std::chrono::duration_cast(stop - start).count() << " hours\n"; std::cout << " : " << std::chrono::duration_cast(stop - start).count() << " minutes\n"; std::cout << " : " << std::chrono::duration_cast(stop - start).count() << " seconds\n"; return 0; }