Include sceneChooser function

This commit is contained in:
CJSatnarine
2024-10-19 20:01:03 -04:00
parent 2c98cc7791
commit 1c1b6c68aa

View File

@@ -319,7 +319,7 @@ void cornellSmoke() {
cam.aspectRatio = 1.0; cam.aspectRatio = 1.0;
cam.imageWidth = 600; cam.imageWidth = 600;
cam.samplesPerPixel = 200; cam.samplesPerPixel = 600;
cam.maxDepth = 50; cam.maxDepth = 50;
cam.background = colour(0,0,0); cam.background = colour(0,0,0);
@@ -406,9 +406,7 @@ void finalScene(int imageWidth, int samplesPerPixel, int maxDepth) {
cam.render(world); cam.render(world);
} }
int main(void) { void sceneChooser(int sceneToShow) {
int sceneToShow = 4;
switch (sceneToShow) { switch (sceneToShow) {
case 1: case 1:
bouncingSpheres(); bouncingSpheres();
@@ -444,4 +442,10 @@ int main(void) {
finalScene(400, 250, 40); finalScene(400, 250, 40);
break; break;
} }
}
int main(void) {
// Choose a scene to render.
sceneChooser(1);
} }