From 1c1b6c68aa451cc81457e3178cc8b414a7f0aa8b Mon Sep 17 00:00:00 2001 From: CJSatnarine Date: Sat, 19 Oct 2024 20:01:03 -0400 Subject: [PATCH] Include sceneChooser function --- main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index 7ee915b..dcedc92 100644 --- a/main.cpp +++ b/main.cpp @@ -319,7 +319,7 @@ void cornellSmoke() { cam.aspectRatio = 1.0; cam.imageWidth = 600; - cam.samplesPerPixel = 200; + cam.samplesPerPixel = 600; cam.maxDepth = 50; cam.background = colour(0,0,0); @@ -406,9 +406,7 @@ void finalScene(int imageWidth, int samplesPerPixel, int maxDepth) { cam.render(world); } -int main(void) { - int sceneToShow = 4; - +void sceneChooser(int sceneToShow) { switch (sceneToShow) { case 1: bouncingSpheres(); @@ -444,4 +442,10 @@ int main(void) { finalScene(400, 250, 40); break; } +} + +int main(void) { + + // Choose a scene to render. + sceneChooser(1); } \ No newline at end of file