Skip to content

Commit 8bb3112

Browse files
committed
Move v3 content to v3/ directory, hoist alpha/
The v4 alpha release is already a large improvement over the v3 release, so I'm using v4 as the primary project content, and moving the v3 content into its own directory. All project documentation (changelog, readme, web index) still remains to be updated before release.
1 parent 5a9f48d commit 8bb3112

File tree

377 files changed

+27230
-27050
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

377 files changed

+27230
-27050
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Git Ignore Rules for raytracing.github.io
22

3-
/build/
3+
build/
44
/*.ppm
55

6-
/alpha/build
7-
/alpha/*.ppm
6+
/v3/*.ppm

CHANGELOG.md

Lines changed: 397 additions & 309 deletions
Large diffs are not rendered by default.

CMakeLists.txt

Lines changed: 81 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,78 +6,118 @@
66

77
cmake_minimum_required ( VERSION 3.1.0...3.27.0 )
88

9-
project ( RTWeekend
10-
VERSION 3.0.0
11-
LANGUAGES CXX
12-
)
9+
project ( RTWeekend LANGUAGES CXX )
1310

14-
# Set to c++11
15-
set ( CMAKE_CXX_STANDARD 11 )
11+
# Set to C++11
12+
set ( CMAKE_CXX_STANDARD 11 )
13+
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
14+
set ( CMAKE_CXX_EXTENSIONS OFF )
1615

1716
# Source
18-
set ( COMMON_ALL
19-
src/common/rtweekend.h
20-
src/common/camera.h
21-
src/common/ray.h
22-
src/common/vec3.h
17+
18+
set ( EXTERNAL
19+
src/external/stb_image.h
2320
)
2421

2522
set ( SOURCE_ONE_WEEKEND
26-
${COMMON_ALL}
23+
src/external/stb_image.h
24+
25+
src/InOneWeekend/camera.h
26+
src/InOneWeekend/color.h
2727
src/InOneWeekend/hittable.h
2828
src/InOneWeekend/hittable_list.h
29+
src/InOneWeekend/interval.h
2930
src/InOneWeekend/material.h
31+
src/InOneWeekend/ray.h
32+
src/InOneWeekend/rtw_stb_image.h
33+
src/InOneWeekend/rtweekend.h
3034
src/InOneWeekend/sphere.h
35+
src/InOneWeekend/vec3.h
36+
3137
src/InOneWeekend/main.cc
3238
)
3339

3440
set ( SOURCE_NEXT_WEEK
35-
${COMMON_ALL}
36-
src/common/aabb.h
37-
src/common/external/stb_image.h
38-
src/common/perlin.h
39-
src/common/rtw_stb_image.h
40-
src/common/texture.h
41-
src/TheNextWeek/aarect.h
42-
src/TheNextWeek/box.h
41+
src/external/stb_image.h
42+
43+
src/TheNextWeek/aabb.h
4344
src/TheNextWeek/bvh.h
45+
src/TheNextWeek/camera.h
46+
src/TheNextWeek/color.h
4447
src/TheNextWeek/constant_medium.h
4548
src/TheNextWeek/hittable.h
4649
src/TheNextWeek/hittable_list.h
50+
src/TheNextWeek/interval.h
4751
src/TheNextWeek/material.h
48-
src/TheNextWeek/moving_sphere.h
52+
src/TheNextWeek/perlin.h
53+
src/TheNextWeek/quad.h
54+
src/TheNextWeek/ray.h
55+
src/TheNextWeek/rtw_stb_image.h
56+
src/TheNextWeek/rtweekend.h
4957
src/TheNextWeek/sphere.h
58+
src/TheNextWeek/texture.h
59+
src/TheNextWeek/vec3.h
60+
5061
src/TheNextWeek/main.cc
5162
)
5263

5364
set ( SOURCE_REST_OF_YOUR_LIFE
54-
${COMMON_ALL}
55-
src/common/aabb.h
56-
src/common/external/stb_image.h
57-
src/common/perlin.h
58-
src/common/rtw_stb_image.h
59-
src/common/texture.h
60-
src/TheRestOfYourLife/aarect.h
61-
src/TheRestOfYourLife/box.h
62-
src/TheRestOfYourLife/bvh.h
65+
src/external/stb_image.h
66+
67+
src/TheRestOfYourLife/aabb.h
68+
src/TheRestOfYourLife/camera.h
69+
src/TheRestOfYourLife/color.h
70+
src/TheRestOfYourLife/constant_medium.h
6371
src/TheRestOfYourLife/hittable.h
6472
src/TheRestOfYourLife/hittable_list.h
73+
src/TheRestOfYourLife/interval.h
6574
src/TheRestOfYourLife/material.h
6675
src/TheRestOfYourLife/onb.h
6776
src/TheRestOfYourLife/pdf.h
77+
src/TheRestOfYourLife/perlin.h
78+
src/TheRestOfYourLife/quad.h
79+
src/TheRestOfYourLife/ray.h
80+
src/TheRestOfYourLife/rtw_stb_image.h
81+
src/TheRestOfYourLife/rtweekend.h
6882
src/TheRestOfYourLife/sphere.h
83+
src/TheRestOfYourLife/texture.h
84+
src/TheRestOfYourLife/vec3.h
85+
6986
src/TheRestOfYourLife/main.cc
7087
)
7188

89+
include_directories(src)
90+
91+
# Specific compiler flags below. We're not going to add options for all possible compilers, but if
92+
# you're new to CMake (like we are), the following may be a helpful example if you're using a
93+
# different compiler or want to set different compiler options.
94+
95+
message (STATUS "Compiler ID: " ${CMAKE_CXX_COMPILER_ID})
96+
97+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
98+
add_compile_options("/we 4265") # Class has virtual functions, but its non-trivial destructor is not virtual
99+
add_compile_options("/w3 5038") # Data member will be initialized after [other] data member
100+
add_compile_options("/we 5204") # Class has virtual functions, but its trivial destructor is not virtual
101+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
102+
add_compile_options(-Wnon-virtual-dtor) # Class has virtual functions, but its destructor is not virtual
103+
add_compile_options(-Wreorder) # Data member will be initialized after [other] data member
104+
add_compile_options(-Wmaybe-uninitialized) # Variable improperly initialized
105+
add_compile_options(-Wunused-variable) # Variable is defined but unused
106+
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
107+
add_compile_options(-Wnon-virtual-dtor) # Class has virtual functions, but its destructor is not virtual
108+
add_compile_options(-Wreorder) # Data member will be initialized after [other] data member
109+
add_compile_options(-Wsometimes-uninitialized) # Variable improperly initialized
110+
add_compile_options(-Wunused-variable) # Variable is defined but unused
111+
endif()
112+
72113
# Executables
73-
add_executable(inOneWeekend ${SOURCE_ONE_WEEKEND})
74-
add_executable(theNextWeek ${SOURCE_NEXT_WEEK})
75-
add_executable(theRestOfYourLife ${SOURCE_REST_OF_YOUR_LIFE})
76-
add_executable(cos_cubed src/TheRestOfYourLife/cos_cubed.cc ${COMMON_ALL})
77-
add_executable(cos_density src/TheRestOfYourLife/cos_density.cc ${COMMON_ALL})
78-
add_executable(integrate_x_sq src/TheRestOfYourLife/integrate_x_sq.cc ${COMMON_ALL})
79-
add_executable(pi src/TheRestOfYourLife/pi.cc ${COMMON_ALL})
80-
add_executable(sphere_importance src/TheRestOfYourLife/sphere_importance.cc ${COMMON_ALL})
81-
add_executable(sphere_plot src/TheRestOfYourLife/sphere_plot.cc ${COMMON_ALL})
82-
83-
include_directories(src/common)
114+
add_executable(inOneWeekend ${EXTERNAL} ${SOURCE_ONE_WEEKEND})
115+
add_executable(theNextWeek ${EXTERNAL} ${SOURCE_NEXT_WEEK})
116+
add_executable(theRestOfYourLife ${EXTERNAL} ${SOURCE_REST_OF_YOUR_LIFE})
117+
add_executable(cos_cubed src/TheRestOfYourLife/cos_cubed.cc )
118+
add_executable(cos_density src/TheRestOfYourLife/cos_density.cc )
119+
add_executable(integrate_x_sq src/TheRestOfYourLife/integrate_x_sq.cc )
120+
add_executable(pi src/TheRestOfYourLife/pi.cc )
121+
add_executable(estimate_halfway src/TheRestOfYourLife/estimate_halfway.cc )
122+
add_executable(sphere_importance src/TheRestOfYourLife/sphere_importance.cc )
123+
add_executable(sphere_plot src/TheRestOfYourLife/sphere_plot.cc )

0 commit comments

Comments
 (0)