Skip to content

Commit

Permalink
Merge branch 'dev-major'
Browse files Browse the repository at this point in the history
  • Loading branch information
hollasch committed Aug 6, 2023
2 parents 6e19852 + 6632111 commit 9d4e978
Show file tree
Hide file tree
Showing 338 changed files with 39,628 additions and 11,915 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Git Ignore Rules for raytracing.github.io

/build/
build/
/*.ppm

/v3/*.ppm
706 changes: 397 additions & 309 deletions CHANGELOG.md

Large diffs are not rendered by default.

122 changes: 81 additions & 41 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,78 +6,118 @@

cmake_minimum_required ( VERSION 3.1.0...3.27.0 )

project ( RTWeekend
VERSION 3.0.0
LANGUAGES CXX
)
project ( RTWeekend LANGUAGES CXX )

# Set to c++11
set ( CMAKE_CXX_STANDARD 11 )
# Set to C++11
set ( CMAKE_CXX_STANDARD 11 )
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
set ( CMAKE_CXX_EXTENSIONS OFF )

# Source
set ( COMMON_ALL
src/common/rtweekend.h
src/common/camera.h
src/common/ray.h
src/common/vec3.h

set ( EXTERNAL
src/external/stb_image.h
)

set ( SOURCE_ONE_WEEKEND
${COMMON_ALL}
src/external/stb_image.h

src/InOneWeekend/camera.h
src/InOneWeekend/color.h
src/InOneWeekend/hittable.h
src/InOneWeekend/hittable_list.h
src/InOneWeekend/interval.h
src/InOneWeekend/material.h
src/InOneWeekend/ray.h
src/InOneWeekend/rtw_stb_image.h
src/InOneWeekend/rtweekend.h
src/InOneWeekend/sphere.h
src/InOneWeekend/vec3.h

src/InOneWeekend/main.cc
)

set ( SOURCE_NEXT_WEEK
${COMMON_ALL}
src/common/aabb.h
src/common/external/stb_image.h
src/common/perlin.h
src/common/rtw_stb_image.h
src/common/texture.h
src/TheNextWeek/aarect.h
src/TheNextWeek/box.h
src/external/stb_image.h

src/TheNextWeek/aabb.h
src/TheNextWeek/bvh.h
src/TheNextWeek/camera.h
src/TheNextWeek/color.h
src/TheNextWeek/constant_medium.h
src/TheNextWeek/hittable.h
src/TheNextWeek/hittable_list.h
src/TheNextWeek/interval.h
src/TheNextWeek/material.h
src/TheNextWeek/moving_sphere.h
src/TheNextWeek/perlin.h
src/TheNextWeek/quad.h
src/TheNextWeek/ray.h
src/TheNextWeek/rtw_stb_image.h
src/TheNextWeek/rtweekend.h
src/TheNextWeek/sphere.h
src/TheNextWeek/texture.h
src/TheNextWeek/vec3.h

src/TheNextWeek/main.cc
)

set ( SOURCE_REST_OF_YOUR_LIFE
${COMMON_ALL}
src/common/aabb.h
src/common/external/stb_image.h
src/common/perlin.h
src/common/rtw_stb_image.h
src/common/texture.h
src/TheRestOfYourLife/aarect.h
src/TheRestOfYourLife/box.h
src/TheRestOfYourLife/bvh.h
src/external/stb_image.h

src/TheRestOfYourLife/aabb.h
src/TheRestOfYourLife/camera.h
src/TheRestOfYourLife/color.h
src/TheRestOfYourLife/constant_medium.h
src/TheRestOfYourLife/hittable.h
src/TheRestOfYourLife/hittable_list.h
src/TheRestOfYourLife/interval.h
src/TheRestOfYourLife/material.h
src/TheRestOfYourLife/onb.h
src/TheRestOfYourLife/pdf.h
src/TheRestOfYourLife/perlin.h
src/TheRestOfYourLife/quad.h
src/TheRestOfYourLife/ray.h
src/TheRestOfYourLife/rtw_stb_image.h
src/TheRestOfYourLife/rtweekend.h
src/TheRestOfYourLife/sphere.h
src/TheRestOfYourLife/texture.h
src/TheRestOfYourLife/vec3.h

src/TheRestOfYourLife/main.cc
)

include_directories(src)

# Specific compiler flags below. We're not going to add options for all possible compilers, but if
# you're new to CMake (like we are), the following may be a helpful example if you're using a
# different compiler or want to set different compiler options.

message (STATUS "Compiler ID: " ${CMAKE_CXX_COMPILER_ID})

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options("/we 4265") # Class has virtual functions, but its non-trivial destructor is not virtual
add_compile_options("/w3 5038") # Data member will be initialized after [other] data member
add_compile_options("/we 5204") # Class has virtual functions, but its trivial destructor is not virtual
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wnon-virtual-dtor) # Class has virtual functions, but its destructor is not virtual
add_compile_options(-Wreorder) # Data member will be initialized after [other] data member
add_compile_options(-Wmaybe-uninitialized) # Variable improperly initialized
add_compile_options(-Wunused-variable) # Variable is defined but unused
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wnon-virtual-dtor) # Class has virtual functions, but its destructor is not virtual
add_compile_options(-Wreorder) # Data member will be initialized after [other] data member
add_compile_options(-Wsometimes-uninitialized) # Variable improperly initialized
add_compile_options(-Wunused-variable) # Variable is defined but unused
endif()

# Executables
add_executable(inOneWeekend ${SOURCE_ONE_WEEKEND})
add_executable(theNextWeek ${SOURCE_NEXT_WEEK})
add_executable(theRestOfYourLife ${SOURCE_REST_OF_YOUR_LIFE})
add_executable(cos_cubed src/TheRestOfYourLife/cos_cubed.cc ${COMMON_ALL})
add_executable(cos_density src/TheRestOfYourLife/cos_density.cc ${COMMON_ALL})
add_executable(integrate_x_sq src/TheRestOfYourLife/integrate_x_sq.cc ${COMMON_ALL})
add_executable(pi src/TheRestOfYourLife/pi.cc ${COMMON_ALL})
add_executable(sphere_importance src/TheRestOfYourLife/sphere_importance.cc ${COMMON_ALL})
add_executable(sphere_plot src/TheRestOfYourLife/sphere_plot.cc ${COMMON_ALL})

include_directories(src/common)
add_executable(inOneWeekend ${EXTERNAL} ${SOURCE_ONE_WEEKEND})
add_executable(theNextWeek ${EXTERNAL} ${SOURCE_NEXT_WEEK})
add_executable(theRestOfYourLife ${EXTERNAL} ${SOURCE_REST_OF_YOUR_LIFE})
add_executable(cos_cubed src/TheRestOfYourLife/cos_cubed.cc )
add_executable(cos_density src/TheRestOfYourLife/cos_density.cc )
add_executable(integrate_x_sq src/TheRestOfYourLife/integrate_x_sq.cc )
add_executable(pi src/TheRestOfYourLife/pi.cc )
add_executable(estimate_halfway src/TheRestOfYourLife/estimate_halfway.cc )
add_executable(sphere_importance src/TheRestOfYourLife/sphere_importance.cc )
add_executable(sphere_plot src/TheRestOfYourLife/sphere_plot.cc )
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ The easiest way to help out is to log any issues you find in the books. Unclear
all kinds, even better ways to present something -- just go to the [issues page][].

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

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

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

Note the code philosophy outlined in the first section of the first book. In short, the code is
intended to be clear for everyone, using simple C/C++ idioms as much as possible. We have chosen to
adopt _some_ modern conventions where we feel it makes the code more accessible to non-C++
programmers. Please follow the existing coding style and simplicity when offering your suggested
changes.

If anything above sounds daunting, note that you'll get _massive_ credit for actually reading the
CONTRIBUTING.md and following the process above -- so we'd be delighted to answer any questions and
guide you through the process.
Expand Down
43 changes: 29 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ Ray Tracing in One Weekend Book Series
Getting the Books
------------------
The _Ray Tracing in One Weekend_ series of books are now available to the public for free directly
from the web:
from the web.

We are currently hosting both the older v3.2.3 version and the v4.0.0-alpha.1 versions in the same
project. The older v3 version is provide for readers who are in the middle of going through the
series so you can maintain continuity. For new readers, or readers newly starting one of the books,
we strongly recommend that you jump above the v4 train.

### Version 3.2.3
- [Ray Tracing in One Weekend][web1-v3]
- [Ray Tracing: The Next Week][web2-v3]
- [Ray Tracing: The Rest of Your Life][web3-v3]

### Version 4.0.0-alpha.1

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

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

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

- [v4.0.0 Book 1](https://github.com/RayTracing/raytracing.github.io/milestone/20)
- [v4.0.0 Book 1 Release](https://github.com/RayTracing/raytracing.github.io/milestone/21)
- [v4.0.0 Book 2](https://github.com/RayTracing/raytracing.github.io/milestone/24)
- [v4.0.0 Book 3](https://github.com/RayTracing/raytracing.github.io/milestone/22)
- [v4.0.0 Books 2 & 3 Release](https://github.com/RayTracing/raytracing.github.io/milestone/23)
- [v4.0.0](https://github.com/RayTracing/raytracing.github.io/milestone/16)
- [v4.0.0-release](https://github.com/RayTracing/raytracing.github.io/milestone/19)

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

- `v3/` --
All content (same general structure) for the v3.2.3 release (from December 2020).


Source Code
-----------
Expand Down Expand Up @@ -166,9 +178,9 @@ _**please review the [CONTRIBUTING][] document for the most effective way to pro
[book2]: books/RayTracingTheNextWeek.html
[book3]: books/RayTracingTheRestOfYourLife.html
[CONTRIBUTING]: CONTRIBUTING.md
[cover1]: images/RTOneWeekend-small.jpg
[cover2]: images/RTNextWeek-small.jpg
[cover3]: images/RTRestOfYourLife-small.jpg
[cover1]: images/cover/CoverRTW1-small.jpg
[cover2]: images/cover/CoverRTW2-small.jpg
[cover3]: images/cover/CoverRTW3-small.jpg
[discussions]: https://github.com/RayTracing/raytracing.github.io/discussions/
[GitHub home]: https://github.com/RayTracing/raytracing.github.io/
[ImageMagick]: https://imagemagick.org/
Expand All @@ -177,5 +189,8 @@ _**please review the [CONTRIBUTING][] document for the most effective way to pro
[milestone 19]: https://github.com/RayTracing/raytracing.github.io/milestone/19
[v3.2.3]: https://github.com/RayTracing/raytracing.github.io/releases/tag/v3.2.3
[web1]: https://raytracing.github.io/books/RayTracingInOneWeekend.html
[web1-v3]: https://raytracing.github.io/books/v3/RayTracingInOneWeekend.html
[web2]: https://raytracing.github.io/books/RayTracingTheNextWeek.html
[web2-v3]: https://raytracing.github.io/books/v3/RayTracingTheNextWeek.html
[web3]: https://raytracing.github.io/books/RayTracingTheRestOfYourLife.html
[web3-v3]: https://raytracing.github.io/books/v3/RayTracingTheRestOfYourLife.html
Loading

0 comments on commit 9d4e978

Please sign in to comment.