Skip to content

Commit 3d446cc

Browse files
committed
included ray tracing with shadow
1 parent 2e0affa commit 3d446cc

8 files changed

+527
-240
lines changed

Diff for: A4Q1.cpp

-235
This file was deleted.

Diff for: A4Q1.vcxproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@
133133
</Link>
134134
</ItemDefinitionGroup>
135135
<ItemGroup>
136-
<ClCompile Include="A4Q1.cpp" />
136+
<ClCompile Include="MyMain.cpp" />
137+
<ClCompile Include="Program1.cpp" />
138+
<ClCompile Include="Program2.cpp" />
137139
<ClCompile Include="plane.cpp" />
138140
<ClCompile Include="vector3.cpp" />
139141
</ItemGroup>

Diff for: A4Q1.vcxproj.filters

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</Filter>
1616
</ItemGroup>
1717
<ItemGroup>
18-
<ClCompile Include="A4Q1.cpp">
18+
<ClCompile Include="Program1.cpp">
1919
<Filter>Source Files</Filter>
2020
</ClCompile>
2121
<ClCompile Include="plane.cpp">
@@ -24,6 +24,12 @@
2424
<ClCompile Include="vector3.cpp">
2525
<Filter>Source Files</Filter>
2626
</ClCompile>
27+
<ClCompile Include="Program2.cpp">
28+
<Filter>Source Files</Filter>
29+
</ClCompile>
30+
<ClCompile Include="MyMain.cpp">
31+
<Filter>Source Files</Filter>
32+
</ClCompile>
2733
</ItemGroup>
2834
<ItemGroup>
2935
<ClInclude Include="plane.h">

Diff for: MyMain.cpp

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
3+
#include "Program1.cpp"
4+
#include "Program2.cpp"
5+
6+
int main(int argc, char** argv) {
7+
8+
// ask user to select a program
9+
int programNumber = 0;
10+
std::cout << "Please select a program to run: " << std::endl;
11+
std::cout << "1. Program 1: Recursive Ray Tracing" << std::endl;
12+
std::cout << "2. Program 2: Recursive Ray Tracing With Shadow" << std::endl;
13+
14+
std::cin >> programNumber;
15+
16+
// run the selected program
17+
switch (programNumber) {
18+
case 1:
19+
return Program1::main(argc, argv);
20+
case 2:
21+
return Program2::main(argc, argv);
22+
}
23+
24+
return EXIT_SUCCESS;
25+
}
26+
27+
28+

0 commit comments

Comments
 (0)