Skip to content

Commit e7498df

Browse files
committed
Move all v4-alpha content into alpha/ directory
1 parent df16d50 commit e7498df

File tree

335 files changed

+35783
-8862
lines changed

Some content is hidden

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

335 files changed

+35783
-8862
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
/build/
44
/*.ppm
5+
6+
/alpha/build
7+
/alpha/*.ppm

CHANGELOG.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,6 @@
11
Change Log -- Ray Tracing in One Weekend
22
====================================================================================================
33

4-
# v4.0.0 (pending)
5-
6-
### Common
7-
- Change: Introduce new `interval` class used throughout codebase (#777)
8-
- Change: Use `class` instead of `struct` throughout for simpler C++ (#781)
9-
- Change: `hittable:hit()` methods use new interval class for ray-t parameter
10-
- Change: Class public/private access labels get two-space indents (#782)
11-
- Change: `interval::clamp()` replaces standalone `clamp` utility function
12-
- Added: `rtw_image` class for easier image data loading, better search (#807)
13-
- Change: New `scene` class manages image settings, camera, geometry, and lights (#699)
14-
- Change: Cleaned up multiple cases where the `inline` keyword was unnecessary, and reorganized
15-
some global utility functions as either private static, or in better locations.
16-
- Fix: Remove redundant `virtual` keyword for methods with `override` (#805)
17-
- Change: `aabb` class constructor treats two params as extreme points in any orientation (#733)
18-
- Change: `aabb` class uses intervals for each axis (#796)
19-
- Change: Moved all class method definitions inside class definition (#802)
20-
- Fix: CSS fix for cases where code listing overflow; change to fit content (#826)
21-
- Change: `hittable` member variable `ptr` renamed to `object`
22-
- Change: general rename of `mat_ptr` to `mat` (material)
23-
- Change: `hittable::bounding_box()` signature has changed to always return a value (#859)
24-
- Fix: Enabled compiler warnings for MSVC, Clang, GNU. Cleaned up warnings as fit (#865)
25-
- Change: replaced random vector in `isotropic` with `random_unit_vector`
26-
- Delete: `box`, `xy_rect`, `yz_rect`, `xz_rect` classes. Now replaced with new `quad` primitive
27-
(#292, #780, #681)
28-
- Fix: rect hit returning NaNs and infinities. Superseded with new `quad` primitive (#681)
29-
- Added: New 2D `quad` primitive of arbitrary orientation (#756)
30-
- Added: New `box()` utility function returns `hittable_list` of new `quad` primitives (#780)
31-
- Fix: Add `\mathit` to italic math variables to fix slight kerning issues in equations (#839)
32-
- Change: Use std::clog instead of std::cerr to log scanline progress (#935)
33-
- Fix: Added missing commas for the Bib(La)TeX entries.
34-
35-
### In One Weekend
36-
- Added: More commentary about the choice between `double` and `float` (#752)
37-
- Added: Software context around the shadow acne listing
38-
39-
### The Next Week
40-
- Change: Rearranged the texture-mapping presentation. The three types (solid, spatial, image) are
41-
now sequenced in that order, and the checker texture presented more explicitly as an
42-
illustration of a spatial texture.
43-
- Change: Broad rewrite of time management for moving objects, primarily `camera` and
44-
`moving_sphere`, but also impacting the API for `hittable::bounding_box()` (#799)
45-
- Fix: Fixed `bvh_node` constructor definition signature (#872)
46-
- Fix: Fixed scaling for final Perlin noise texture (#896).
47-
- Added: Add listing to use new `bvh_node` class in the `random_spheres` scene (#715).
48-
49-
### The Rest of Your Life
50-
- Fix: Added missing functionality for `isotropic` (#664)
51-
- Fix: Variable `direction` was used without being defined in listing 11 (#831)
52-
- Fix: Added missing functionality for `isotropic` (#664)
53-
54-
55-
----------------------------------------------------------------------------------------------------
564
# v3.2.3 (2020-12-07)
575

586
### Common

CMakeLists.txt

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

77
cmake_minimum_required ( VERSION 3.1.0...3.27.0 )
88

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

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

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

2225
set ( SOURCE_ONE_WEEKEND
23-
src/external/stb_image.h
24-
25-
src/InOneWeekend/camera.h
26-
src/InOneWeekend/color.h
26+
${COMMON_ALL}
2727
src/InOneWeekend/hittable.h
2828
src/InOneWeekend/hittable_list.h
29-
src/InOneWeekend/interval.h
3029
src/InOneWeekend/material.h
31-
src/InOneWeekend/ray.h
32-
src/InOneWeekend/rtw_stb_image.h
33-
src/InOneWeekend/rtweekend.h
3430
src/InOneWeekend/sphere.h
35-
src/InOneWeekend/vec3.h
36-
3731
src/InOneWeekend/main.cc
3832
)
3933

4034
set ( SOURCE_NEXT_WEEK
41-
src/external/stb_image.h
42-
43-
src/TheNextWeek/aabb.h
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
4443
src/TheNextWeek/bvh.h
45-
src/TheNextWeek/camera.h
46-
src/TheNextWeek/color.h
4744
src/TheNextWeek/constant_medium.h
4845
src/TheNextWeek/hittable.h
4946
src/TheNextWeek/hittable_list.h
50-
src/TheNextWeek/interval.h
5147
src/TheNextWeek/material.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
48+
src/TheNextWeek/moving_sphere.h
5749
src/TheNextWeek/sphere.h
58-
src/TheNextWeek/texture.h
59-
src/TheNextWeek/vec3.h
60-
6150
src/TheNextWeek/main.cc
6251
)
6352

6453
set ( SOURCE_REST_OF_YOUR_LIFE
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
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
7163
src/TheRestOfYourLife/hittable.h
7264
src/TheRestOfYourLife/hittable_list.h
73-
src/TheRestOfYourLife/interval.h
7465
src/TheRestOfYourLife/material.h
7566
src/TheRestOfYourLife/onb.h
7667
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
8268
src/TheRestOfYourLife/sphere.h
83-
src/TheRestOfYourLife/texture.h
84-
src/TheRestOfYourLife/vec3.h
85-
8669
src/TheRestOfYourLife/main.cc
8770
)
8871

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-
11372
# Executables
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 )
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)

0 commit comments

Comments
 (0)