Skip to content

Commit 9d4e978

Browse files
committed
Merge branch 'dev-major'
2 parents 6e19852 + 6632111 commit 9d4e978

File tree

338 files changed

+39628
-11915
lines changed

Some content is hidden

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

338 files changed

+39628
-11915
lines changed

.gitignore

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

3-
/build/
3+
build/
4+
/*.ppm
5+
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 )

CONTRIBUTING.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ The easiest way to help out is to log any issues you find in the books. Unclear
2424
all kinds, even better ways to present something -- just go to the [issues page][].
2525

2626
**Before creating a new issue**, please review existing issues to see if someone has already
27-
submitted the same one. Odds are you're not the first to encounter something, so a little quick
27+
submitted the same one. Chances are you're not the first to encounter something, so a little quick
2828
research can save everyone some hassle. It's also a good idea to verify that problems still exist in
29-
the `development` branch when creating new issues.
29+
the development branch (which will be one of `dev-patch`, `dev-minor` or `dev-major`) when creating
30+
new issues.
3031

3132
When entering a new issue, please include all relevant information. For content issues, include the
3233
book or books this applies to, and specific locations that should be reviewed. Similarly for code:
@@ -55,6 +56,12 @@ To contribute a change to the project, *please follow these steps*:
5556

5657
7. When ready, create your pull request and request a review from "rt-contributors".
5758

59+
Note the code philosophy outlined in the first section of the first book. In short, the code is
60+
intended to be clear for everyone, using simple C/C++ idioms as much as possible. We have chosen to
61+
adopt _some_ modern conventions where we feel it makes the code more accessible to non-C++
62+
programmers. Please follow the existing coding style and simplicity when offering your suggested
63+
changes.
64+
5865
If anything above sounds daunting, note that you'll get _massive_ credit for actually reading the
5966
CONTRIBUTING.md and following the process above -- so we'd be delighted to answer any questions and
6067
guide you through the process.

README.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@ Ray Tracing in One Weekend Book Series
99
Getting the Books
1010
------------------
1111
The _Ray Tracing in One Weekend_ series of books are now available to the public for free directly
12-
from the web:
12+
from the web.
13+
14+
We are currently hosting both the older v3.2.3 version and the v4.0.0-alpha.1 versions in the same
15+
project. The older v3 version is provide for readers who are in the middle of going through the
16+
series so you can maintain continuity. For new readers, or readers newly starting one of the books,
17+
we strongly recommend that you jump above the v4 train.
18+
19+
### Version 3.2.3
20+
- [Ray Tracing in One Weekend][web1-v3]
21+
- [Ray Tracing: The Next Week][web2-v3]
22+
- [Ray Tracing: The Rest of Your Life][web3-v3]
23+
24+
### Version 4.0.0-alpha.1
1325

1426
- [Ray Tracing in One Weekend][web1]
1527
- [Ray Tracing: The Next Week][web2]
@@ -21,18 +33,15 @@ versions, use the print function in your browser.
2133

2234
Project Status
2335
---------------
24-
We are driving toward our v4.0.0 release for book 1 by SIGGRAPH 2023 (August 6). It's been a long
25-
journey from v3.2.3, released December 2020, but we're seeing the finish line. We hope to have books
26-
2 & 3 ready by the end of 2023.
36+
Version v4.0.0-alpha.1 is now released for SIGGRAPH 2023. Book 1 is largely completed, and we are
37+
driving books 2 and 3 to completion, with a final release date by the end of 2023. It's been a long
38+
journey from v3.2.3, released December 2020, but we're seeing the finish line.
2739

28-
If you'd like to check out the latest and watch our progress, we're on the `dev-major` branch. Our
29-
relevant milestones are
40+
If you'd like to check out the latest updates and watch our progress, we're on the `dev-major`
41+
branch. Our relevant milestones are
3042

31-
- [v4.0.0 Book 1](https://github.com/RayTracing/raytracing.github.io/milestone/20)
32-
- [v4.0.0 Book 1 Release](https://github.com/RayTracing/raytracing.github.io/milestone/21)
33-
- [v4.0.0 Book 2](https://github.com/RayTracing/raytracing.github.io/milestone/24)
34-
- [v4.0.0 Book 3](https://github.com/RayTracing/raytracing.github.io/milestone/22)
35-
- [v4.0.0 Books 2 & 3 Release](https://github.com/RayTracing/raytracing.github.io/milestone/23)
43+
- [v4.0.0](https://github.com/RayTracing/raytracing.github.io/milestone/16)
44+
- [v4.0.0-release](https://github.com/RayTracing/raytracing.github.io/milestone/19)
3645

3746
Let us know if you'd like to help out. If you have a change you'd like to contribute,
3847
_**[please see our contribution guidelines][CONTRIBUTING]**_.
@@ -69,6 +78,9 @@ The organization of this repository is meant to be simple and self-evident at a
6978
Contains the source specific to any one book. There is no sharing of source outside of the
7079
common directory.
7180

81+
- `v3/` --
82+
All content (same general structure) for the v3.2.3 release (from December 2020).
83+
7284

7385
Source Code
7486
-----------
@@ -166,9 +178,9 @@ _**please review the [CONTRIBUTING][] document for the most effective way to pro
166178
[book2]: books/RayTracingTheNextWeek.html
167179
[book3]: books/RayTracingTheRestOfYourLife.html
168180
[CONTRIBUTING]: CONTRIBUTING.md
169-
[cover1]: images/RTOneWeekend-small.jpg
170-
[cover2]: images/RTNextWeek-small.jpg
171-
[cover3]: images/RTRestOfYourLife-small.jpg
181+
[cover1]: images/cover/CoverRTW1-small.jpg
182+
[cover2]: images/cover/CoverRTW2-small.jpg
183+
[cover3]: images/cover/CoverRTW3-small.jpg
172184
[discussions]: https://github.com/RayTracing/raytracing.github.io/discussions/
173185
[GitHub home]: https://github.com/RayTracing/raytracing.github.io/
174186
[ImageMagick]: https://imagemagick.org/
@@ -177,5 +189,8 @@ _**please review the [CONTRIBUTING][] document for the most effective way to pro
177189
[milestone 19]: https://github.com/RayTracing/raytracing.github.io/milestone/19
178190
[v3.2.3]: https://github.com/RayTracing/raytracing.github.io/releases/tag/v3.2.3
179191
[web1]: https://raytracing.github.io/books/RayTracingInOneWeekend.html
192+
[web1-v3]: https://raytracing.github.io/books/v3/RayTracingInOneWeekend.html
180193
[web2]: https://raytracing.github.io/books/RayTracingTheNextWeek.html
194+
[web2-v3]: https://raytracing.github.io/books/v3/RayTracingTheNextWeek.html
181195
[web3]: https://raytracing.github.io/books/RayTracingTheRestOfYourLife.html
196+
[web3-v3]: https://raytracing.github.io/books/v3/RayTracingTheRestOfYourLife.html

0 commit comments

Comments
 (0)