Add 3 new type of object: Sphere, Object and Intersect.

Add Intersect object as a way to report where a ray intersect another object and which one it is.
Add an Object base class for all object that can be rendered.
Add the Sphere object.
This commit is contained in:
Godzil
2020-02-17 11:16:20 +00:00
parent 8faf1db3be
commit 01a0de09ab
11 changed files with 323 additions and 4 deletions

View File

@@ -3,7 +3,8 @@ project(DoRayTested)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set(TESTS_SRC tuple_test.cpp colour_test.cpp canvas_test.cpp matrix_test.cpp transformation_test.cpp ray_test.cpp)
set(TESTS_SRC tuple_test.cpp colour_test.cpp canvas_test.cpp matrix_test.cpp transformation_test.cpp ray_test.cpp
intersect_test.cpp sphere_test.cpp)
add_executable(testMyRays)
target_include_directories(testMyRays PUBLIC ${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})