BVH appears to be working now
Added multi-hit intersection. A ray will now return all objects which it intersects with. It's slower then optimal but based on the console output it appears to be still much faster than without a BVH. More testing is required.main
parent
e0569f4f29
commit
2ea273a4a3
Binary file not shown.
|
@ -2,39 +2,24 @@
|
||||||
2354 4138 1668362751805609008 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o dc4b23b5e01a8208
|
2354 4138 1668362751805609008 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o dc4b23b5e01a8208
|
||||||
3 942 1668362748605515989 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 7e874136640e6898
|
3 942 1668362748605515989 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 7e874136640e6898
|
||||||
1763 3332 1668362750997585518 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o cf522ea42b0f8fd3
|
1763 3332 1668362750997585518 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o cf522ea42b0f8fd3
|
||||||
2 3339 1668365991263948976 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb
|
2 3172 1668366128939903794 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb
|
||||||
2 2094 1668366099451055673 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d5972a669671ede
|
1 1710 1668366127479861791 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d5972a669671ede
|
||||||
1 3358 1668366100719092131 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295
|
1 3509 1668366129275913460 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295
|
||||||
2 1588 1668366098951041296 CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o 6b49c8b248d04bb6
|
2 1484 1668366127251855229 CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o 6b49c8b248d04bb6
|
||||||
2082 2569 1668362750237563426 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o 6f5a39b3d5d543ae
|
2082 2569 1668362750237563426 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o 6f5a39b3d5d543ae
|
||||||
1 1669 1668366099031043596 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 3e7c95bef1d0ddaa
|
1 1317 1668366127087850511 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 3e7c95bef1d0ddaa
|
||||||
1 2165 1668366099527057858 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b
|
1 2037 1668366127807871226 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b
|
||||||
2 2553 1668365990479926493 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554
|
1 2203 1668366127971875944 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554
|
||||||
1631 5297 1668362752961642610 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o f152a6b2309aba93
|
1631 5297 1668362752961642610 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o f152a6b2309aba93
|
||||||
4329 4545 1668365992471983622 Step_3 7f6959eaebe4da02
|
3984 4314 1668366130079936592 Step_3 7f6959eaebe4da02
|
||||||
2023 2244 1668362749909553892 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 35f01a0bb2fddead
|
2023 2244 1668362749909553892 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 35f01a0bb2fddead
|
||||||
1 3322 1668365991247948517 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd
|
1 3051 1668366128819900341 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd
|
||||||
1670 2845 1668366100207077409 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 10752ac78f398bdb
|
1484 2793 1668366128559892860 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 10752ac78f398bdb
|
||||||
1849 4534 1668362752197620402 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o 707f99c685c75a0f
|
1849 4534 1668362752197620402 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o 707f99c685c75a0f
|
||||||
2466 5248 1668362752913641215 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o d81abd5f968f8f53
|
2466 5248 1668362752913641215 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o d81abd5f968f8f53
|
||||||
1643 4329 1668365992255977427 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888
|
|
||||||
3 2388 1668366099751064298 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c
|
|
||||||
2244 2466 1668362750133560403 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o 45a2ee53269bffeb
|
|
||||||
3 2409 1668366099771064875 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6
|
|
||||||
1 3762 1668365991687961136 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525
|
|
||||||
2 2096 1668366099455055788 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o e9e3fe6fe9a4de66
|
|
||||||
1 1317 1668366127087850511 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 3e7c95bef1d0ddaa
|
|
||||||
2 1484 1668366127251855229 CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o 6b49c8b248d04bb6
|
|
||||||
1 1710 1668366127479861791 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d5972a669671ede
|
|
||||||
2 1916 1668366127683867658 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o e9e3fe6fe9a4de66
|
|
||||||
1 2037 1668366127807871226 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b
|
|
||||||
2 2162 1668366127931874794 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6
|
|
||||||
1 2203 1668366127971875944 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554
|
|
||||||
2 2309 1668366128079879051 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c
|
|
||||||
1484 2793 1668366128559892860 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 10752ac78f398bdb
|
|
||||||
1 3051 1668366128819900341 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd
|
|
||||||
2 3172 1668366128939903794 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb
|
|
||||||
1 3358 1668366129123909087 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525
|
|
||||||
1 3509 1668366129275913460 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295
|
|
||||||
1317 3983 1668366129751927157 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888
|
1317 3983 1668366129751927157 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888
|
||||||
3984 4314 1668366130079936592 Step_3 7f6959eaebe4da02
|
2 2309 1668366128079879051 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o c67f39c07aae8f1c
|
||||||
|
2244 2466 1668362750133560403 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o 45a2ee53269bffeb
|
||||||
|
2 2162 1668366127931874794 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 67f44a482b45cec6
|
||||||
|
1 3358 1668366129123909087 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525
|
||||||
|
2 1916 1668366127683867658 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o e9e3fe6fe9a4de66
|
||||||
|
|
|
@ -70,6 +70,13 @@ build CMakeFiles/Step_3.dir/src/engine/main.cpp.o: CXX_COMPILER__Step_3_Debug /h
|
||||||
OBJECT_DIR = CMakeFiles/Step_3.dir
|
OBJECT_DIR = CMakeFiles/Step_3.dir
|
||||||
OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine
|
OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine
|
||||||
|
|
||||||
|
build CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o: CXX_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/engine/math/bvh.cpp || cmake_object_order_depends_target_Step_3
|
||||||
|
DEP_FILE = CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o.d
|
||||||
|
FLAGS = -fsanitize=address -g -march=native -g -fsanitize=address -std=gnu++20
|
||||||
|
INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-debug" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include"
|
||||||
|
OBJECT_DIR = CMakeFiles/Step_3.dir
|
||||||
|
OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine/math
|
||||||
|
|
||||||
build CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o: CXX_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/engine/math/colliders.cpp || cmake_object_order_depends_target_Step_3
|
build CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o: CXX_COMPILER__Step_3_Debug /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/engine/math/colliders.cpp || cmake_object_order_depends_target_Step_3
|
||||||
DEP_FILE = CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o.d
|
DEP_FILE = CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o.d
|
||||||
FLAGS = -fsanitize=address -g -march=native -g -fsanitize=address -std=gnu++20
|
FLAGS = -fsanitize=address -g -march=native -g -fsanitize=address -std=gnu++20
|
||||||
|
@ -218,7 +225,7 @@ build CMakeFiles/Step_3.dir/src/graphics/input.cpp.o: CXX_COMPILER__Step_3_Debug
|
||||||
#############################################
|
#############################################
|
||||||
# Link the executable Step_3
|
# Link the executable Step_3
|
||||||
|
|
||||||
build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Debug CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Debug CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
||||||
FLAGS = -fsanitize=address -g -march=native -g
|
FLAGS = -fsanitize=address -g -march=native -g
|
||||||
LINK_FLAGS = -fsanitize=address
|
LINK_FLAGS = -fsanitize=address
|
||||||
LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
"configurations" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"directories" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"build" : ".",
|
|
||||||
"jsonFile" : "directory-.-Release-f5ebdc15457944623624.json",
|
|
||||||
"minimumCMakeVersion" :
|
|
||||||
{
|
|
||||||
"string" : "3.22"
|
|
||||||
},
|
|
||||||
"projectIndex" : 0,
|
|
||||||
"source" : ".",
|
|
||||||
"targetIndexes" :
|
|
||||||
[
|
|
||||||
0
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name" : "Release",
|
|
||||||
"projects" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"directoryIndexes" :
|
|
||||||
[
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"name" : "Step_3",
|
|
||||||
"targetIndexes" :
|
|
||||||
[
|
|
||||||
0
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"targets" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"directoryIndex" : 0,
|
|
||||||
"id" : "Step_3::@6890427a1f51a3e7e1df",
|
|
||||||
"jsonFile" : "target-Step_3-Release-83fb7e48c8979bb1d44e.json",
|
|
||||||
"name" : "Step_3",
|
|
||||||
"projectIndex" : 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind" : "codemodel",
|
|
||||||
"paths" :
|
|
||||||
{
|
|
||||||
"build" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release",
|
|
||||||
"source" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3"
|
|
||||||
},
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 4
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,108 +0,0 @@
|
||||||
{
|
|
||||||
"cmake" :
|
|
||||||
{
|
|
||||||
"generator" :
|
|
||||||
{
|
|
||||||
"multiConfig" : false,
|
|
||||||
"name" : "Ninja"
|
|
||||||
},
|
|
||||||
"paths" :
|
|
||||||
{
|
|
||||||
"cmake" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cmake",
|
|
||||||
"cpack" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/cpack",
|
|
||||||
"ctest" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/bin/ctest",
|
|
||||||
"root" : "/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23"
|
|
||||||
},
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"isDirty" : false,
|
|
||||||
"major" : 3,
|
|
||||||
"minor" : 23,
|
|
||||||
"patch" : 2,
|
|
||||||
"string" : "3.23.2",
|
|
||||||
"suffix" : ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"objects" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"jsonFile" : "codemodel-v2-db503620ae0542c04861.json",
|
|
||||||
"kind" : "codemodel",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 4
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "cache-v2-88302202c72d508e6a1c.json",
|
|
||||||
"kind" : "cache",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "cmakeFiles-v1-3d5910708a3db438cefd.json",
|
|
||||||
"kind" : "cmakeFiles",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "toolchains-v1-a68c232ca45b00aa6bba.json",
|
|
||||||
"kind" : "toolchains",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"reply" :
|
|
||||||
{
|
|
||||||
"cache-v2" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "cache-v2-88302202c72d508e6a1c.json",
|
|
||||||
"kind" : "cache",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cmakeFiles-v1" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "cmakeFiles-v1-3d5910708a3db438cefd.json",
|
|
||||||
"kind" : "cmakeFiles",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"codemodel-v2" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "codemodel-v2-db503620ae0542c04861.json",
|
|
||||||
"kind" : "codemodel",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 4
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toolchains-v1" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "toolchains-v1-a68c232ca45b00aa6bba.json",
|
|
||||||
"kind" : "toolchains",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,404 +0,0 @@
|
||||||
{
|
|
||||||
"artifacts" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"path" : "Step_3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"backtrace" : 1,
|
|
||||||
"backtraceGraph" :
|
|
||||||
{
|
|
||||||
"commands" :
|
|
||||||
[
|
|
||||||
"add_executable",
|
|
||||||
"target_link_libraries",
|
|
||||||
"set_target_properties",
|
|
||||||
"find_package",
|
|
||||||
"include_directories"
|
|
||||||
],
|
|
||||||
"files" :
|
|
||||||
[
|
|
||||||
"CMakeLists.txt",
|
|
||||||
"/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/share/cmake-3.23/Modules/FindOpenGL.cmake"
|
|
||||||
],
|
|
||||||
"nodes" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"file" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 0,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 94,
|
|
||||||
"parent" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 1,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 96,
|
|
||||||
"parent" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 1,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 100,
|
|
||||||
"parent" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 1,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 105,
|
|
||||||
"parent" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 1,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 109,
|
|
||||||
"parent" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 3,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 48,
|
|
||||||
"parent" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file" : 1,
|
|
||||||
"parent" : 6
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 2,
|
|
||||||
"file" : 1,
|
|
||||||
"line" : 510,
|
|
||||||
"parent" : 7
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 4,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 36,
|
|
||||||
"parent" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command" : 4,
|
|
||||||
"file" : 0,
|
|
||||||
"line" : 90,
|
|
||||||
"parent" : 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"compileGroups" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"compileCommandFragments" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"fragment" : " -march=native -O3 -DNDEBUG"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fragment" : "-std=gnu++20"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"includes" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"backtrace" : 9,
|
|
||||||
"path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 10,
|
|
||||||
"path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"language" : "CXX",
|
|
||||||
"languageStandard" :
|
|
||||||
{
|
|
||||||
"backtraces" :
|
|
||||||
[
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"standard" : "20"
|
|
||||||
},
|
|
||||||
"sourceIndexes" :
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
16,
|
|
||||||
17,
|
|
||||||
18,
|
|
||||||
19,
|
|
||||||
20,
|
|
||||||
21,
|
|
||||||
22
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"compileCommandFragments" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"fragment" : "-O3 -DNDEBUG"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"includes" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"backtrace" : 9,
|
|
||||||
"path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 10,
|
|
||||||
"path" : "/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"language" : "C",
|
|
||||||
"sourceIndexes" :
|
|
||||||
[
|
|
||||||
10
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"id" : "Step_3::@6890427a1f51a3e7e1df",
|
|
||||||
"link" :
|
|
||||||
{
|
|
||||||
"commandFragments" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"fragment" : "-march=native -O3 -DNDEBUG",
|
|
||||||
"role" : "flags"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fragment" : "",
|
|
||||||
"role" : "flags"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 2,
|
|
||||||
"fragment" : "-lpthread",
|
|
||||||
"role" : "libraries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 3,
|
|
||||||
"fragment" : "/usr/lib/x86_64-linux-gnu/libGLU.so",
|
|
||||||
"role" : "libraries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 3,
|
|
||||||
"fragment" : "/usr/lib/x86_64-linux-gnu/libGLX.so",
|
|
||||||
"role" : "libraries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 4,
|
|
||||||
"fragment" : "/usr/lib/x86_64-linux-gnu/libglfw.so.3.3",
|
|
||||||
"role" : "libraries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 5,
|
|
||||||
"fragment" : "/usr/lib/x86_64-linux-gnu/libOpenCL.so",
|
|
||||||
"role" : "libraries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 3,
|
|
||||||
"fragment" : "/usr/lib/x86_64-linux-gnu/libGLX.so",
|
|
||||||
"role" : "libraries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 8,
|
|
||||||
"fragment" : "/usr/lib/x86_64-linux-gnu/libOpenGL.so",
|
|
||||||
"role" : "libraries"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"language" : "CXX"
|
|
||||||
},
|
|
||||||
"name" : "Step_3",
|
|
||||||
"nameOnDisk" : "Step_3",
|
|
||||||
"paths" :
|
|
||||||
{
|
|
||||||
"build" : ".",
|
|
||||||
"source" : "."
|
|
||||||
},
|
|
||||||
"sourceGroups" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "Source Files",
|
|
||||||
"sourceIndexes" :
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
16,
|
|
||||||
17,
|
|
||||||
18,
|
|
||||||
19,
|
|
||||||
20,
|
|
||||||
21,
|
|
||||||
22
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"sources" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/globals.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/image/image.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/main.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/math/colliders.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/raytracing.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/util/debug.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/util/models.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/util/parser.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/engine/world.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/debug_gui.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 1,
|
|
||||||
"path" : "src/graphics/gl/gl.c",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/gl/gl.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/gl/shader.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/graphics.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui_demo.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui_draw.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui_impl_glfw.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui_impl_opengl3.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui_impl_x11.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui_tables.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/imgui/imgui_widgets.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backtrace" : 1,
|
|
||||||
"compileGroupIndex" : 0,
|
|
||||||
"path" : "src/graphics/input.cpp",
|
|
||||||
"sourceGroupIndex" : 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type" : "EXECUTABLE"
|
|
||||||
}
|
|
Binary file not shown.
|
@ -2,103 +2,51 @@
|
||||||
374 3235 1668323538168825062 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o f6dab204e07e8dcf
|
374 3235 1668323538168825062 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o f6dab204e07e8dcf
|
||||||
2 2022 1668323499583713805 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 30ab06816e8637c1
|
2 2022 1668323499583713805 CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o 30ab06816e8637c1
|
||||||
4 3390 1668323512856096078 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o 7798aba97da63e31
|
4 3390 1668323512856096078 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o 7798aba97da63e31
|
||||||
3 2443 1668624863468056087 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
2 1991 1668626445150369433 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
||||||
2 1641 1668366223598629532 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d86a254d2bce8f74
|
2 1641 1668366223598629532 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d86a254d2bce8f74
|
||||||
1 6863 1668489146695541389 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b
|
1 6863 1668489146695541389 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b
|
||||||
2 1301 1668366223258619732 CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o 9493619f74acd06a
|
2 1301 1668366223258619732 CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o 9493619f74acd06a
|
||||||
4 605 1668323535536749264 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o d1e9a2fcb31e2ec8
|
4 605 1668323535536749264 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o d1e9a2fcb31e2ec8
|
||||||
0 26 1668358519550031316 build.ninja ccb5de0c063412ab
|
0 26 1668626511144238740 build.ninja ccb5de0c063412ab
|
||||||
1 1437 1668553279255395930 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 4ef77d2224f86511
|
1 1437 1668553279255395930 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 4ef77d2224f86511
|
||||||
1 894 1668624669410339888 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 39e9f435096d066b
|
1 894 1668624669410339888 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 39e9f435096d066b
|
||||||
2 1680 1668624862704033582 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
2 1674 1668626444830360386 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
||||||
3 6633 1668323516100189511 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o 55e7538fd27b47be
|
3 6633 1668323516100189511 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o 55e7538fd27b47be
|
||||||
2847 2941 1668624863964070696 Step_3 f055ce2b85635598
|
2741 2809 1668626445966392496 Step_3 f055ce2b85635598
|
||||||
4 521 1668323535452746847 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 6aef9db88eb3d76d
|
4 521 1668323535452746847 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o 6aef9db88eb3d76d
|
||||||
2 2546 1668624863572059151 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
1 2086 1668626445246372145 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
||||||
1 827 1668366742693637470 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 510001b0955ab019
|
1 827 1668366742693637470 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 510001b0955ab019
|
||||||
5 4715 1668323514180134213 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o f89fa3d7b779872a
|
5 4715 1668323514180134213 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o f89fa3d7b779872a
|
||||||
3 1806 1668624862832037352 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
521 6249 1668323541180911801 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o 84017388bc7af144
|
521 6249 1668323541180911801 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o 84017388bc7af144
|
||||||
|
2 1815 1668626444974364458 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
||||||
1 1651 1668553279471402444 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o 330ad35a6abf06c3
|
1 1651 1668553279471402444 CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o 330ad35a6abf06c3
|
||||||
4 374 1668323535308742700 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o 1b5f0fbe3cf8ce4e
|
4 374 1668323535308742700 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o 1b5f0fbe3cf8ce4e
|
||||||
2 1655 1668489141487439674 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 2553d57dba16057b
|
2 1655 1668489141487439674 CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o 2553d57dba16057b
|
||||||
1 2847 1668624863872067988 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
1 2741 1668626445898390573 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
||||||
2 2095 1668366224050642556 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o 1007c86c207ac940
|
2 2095 1668366224050642556 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o 1007c86c207ac940
|
||||||
2 1502 1668624886008720074 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
1 1042 1668626620015338709 CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o 7d05e3e63b85d471
|
||||||
2 1640 1668624886144724078 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
1 1549 1668626620523353215 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
||||||
2 1933 1668624886440732800 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
2 1681 1668626620655356986 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
||||||
2 1952 1668624886456733272 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
1 1965 1668626620939365097 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
||||||
2 2605 1668624887112752596 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
1 2240 1668626621211372864 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
||||||
2606 2691 1668624887196755071 Step_3 f055ce2b85635598
|
1 2932 1668626621903392627 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
||||||
1 1606 1668624923021810389 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
2932 3003 1668626621975394684 Step_3 9d5d6ad8db7a0552
|
||||||
1 2012 1668624923429822407 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
2 1428 1668628077489660064 CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o 7d05e3e63b85d471
|
||||||
1 2049 1668624923465823468 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
2 1839 1668628077901672111 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
||||||
1 2133 1668624923549825943 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
2 1862 1668628077925672810 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
||||||
1 3050 1668624924465852926 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
2 2040 1668628078101677955 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
||||||
3050 3124 1668624924537855046 Step_3 f055ce2b85635598
|
2 2509 1668628078569691639 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
||||||
1 1488 1668625031885017292 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
1 3191 1668628079253711634 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
||||||
2 1670 1668625032069022712 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
3191 3330 1668628079389715610 Step_3 9d5d6ad8db7a0552
|
||||||
2 2398 1668625032797044162 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
1 1126 1668628304228306826 CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o 7d05e3e63b85d471
|
||||||
1 2506 1668625032905047343 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
1126 1200 1668628304300309045 Step_3 9d5d6ad8db7a0552
|
||||||
1 2608 1668625033005050287 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
1 1390 1668628319148766801 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
||||||
2608 2677 1668625033073052290 Step_3 f055ce2b85635598
|
1390 1463 1668628319220769019 Step_3 9d5d6ad8db7a0552
|
||||||
2 1815 1668625107987259169 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
1 1069 1668628428808130406 CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o 7d05e3e63b85d471
|
||||||
2 1892 1668625108067261527 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
1069 1150 1668628428888132849 Step_3 9d5d6ad8db7a0552
|
||||||
1 2104 1668625108275267655 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
1 1145 1668628493142091376 CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o 7d05e3e63b85d471
|
||||||
2 2122 1668625108295268244 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
1145 1230 1668628493226093931 Step_3 9d5d6ad8db7a0552
|
||||||
1 3088 1668625109263296760 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
1 1292 1668628542051576911 CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o 7d05e3e63b85d471
|
||||||
3089 3165 1668625109335298882 Step_3 f055ce2b85635598
|
1293 1371 1668628542127579215 Step_3 9d5d6ad8db7a0552
|
||||||
1 2065 1668625179621369449 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
1 1142 1668628564072244382 CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o 7d05e3e63b85d471
|
||||||
2 2633 1668625180189386184 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
1142 1242 1668628564172247411 Step_3 9d5d6ad8db7a0552
|
||||||
1 2665 1668625180221387125 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
2 2849 1668625180405392545 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
1 3316 1668625180869406215 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
3316 3397 1668625180953408691 Step_3 f055ce2b85635598
|
|
||||||
2 1886 1668625239263126467 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
3 1886 1668625239263126467 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
2 2073 1668625239451132003 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
3 2272 1668625239647137779 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
2 2823 1668625240199154041 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2823 2897 1668625240271156163 Step_3 f055ce2b85635598
|
|
||||||
2 1598 1668625273312129535 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
2 1859 1668625273572137198 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
2 2039 1668625273752142497 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
2 2144 1668625273856145561 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
1 2695 1668625274408161827 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2695 2769 1668625274480163945 Step_3 f055ce2b85635598
|
|
||||||
1 1715 1668625321753556615 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
2 1908 1668625321945562270 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
1 2177 1668625322213570165 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
1 2255 1668625322293572524 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
1 2819 1668625322857589138 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2819 2893 1668625322929591261 Step_3 f055ce2b85635598
|
|
||||||
2 2050 1668625704280826069 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
2 2056 1668625704284826190 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
2 2499 1668625704732839388 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
2 2529 1668625704756840096 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
1 2897 1668625705128851055 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2897 2996 1668625705228854002 Step_3 f055ce2b85635598
|
|
||||||
2 1604 1668625838336775507 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
2 1701 1668625838432778334 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
2 2085 1668625838816789649 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
2 2123 1668625838852790710 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
1 2839 1668625839568811805 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2839 2913 1668625839644814044 Step_3 f055ce2b85635598
|
|
||||||
1 1573 1668626125589238351 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
1 1824 1668626125841245776 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
1 2013 1668626126029251315 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
1 2040 1668626126057252141 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
1 2622 1668626126641269346 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2623 2695 1668626126713271469 Step_3 f055ce2b85635598
|
|
||||||
12 1766 1668626191207171554 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
3 1797 1668626191239172498 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
2 2059 1668626191499180157 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
12 2184 1668626191627183929 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
2 2688 1668626192131198777 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2688 2765 1668626192203200899 Step_3 f055ce2b85635598
|
|
||||||
2 1914 1668626213395825267 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d
|
|
||||||
2 1934 1668626213419825973 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072
|
|
||||||
2 2175 1668626213659833045 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4
|
|
||||||
2 2397 1668626213879839526 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca
|
|
||||||
2 2891 1668626214371854021 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e
|
|
||||||
2891 2971 1668626214451856381 Step_3 f055ce2b85635598
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,3 @@
|
||||||
Start testing: Nov 16 14:16 EST
|
Start testing: Nov 16 14:56 EST
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
End testing: Nov 16 14:16 EST
|
End testing: Nov 16 14:56 EST
|
||||||
|
|
|
@ -70,6 +70,13 @@ build CMakeFiles/Step_3.dir/src/engine/main.cpp.o: CXX_COMPILER__Step_3_Release
|
||||||
OBJECT_DIR = CMakeFiles/Step_3.dir
|
OBJECT_DIR = CMakeFiles/Step_3.dir
|
||||||
OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine
|
OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine
|
||||||
|
|
||||||
|
build CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o: CXX_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/engine/math/bvh.cpp || cmake_object_order_depends_target_Step_3
|
||||||
|
DEP_FILE = CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o.d
|
||||||
|
FLAGS = -march=native -O3 -DNDEBUG -std=gnu++20
|
||||||
|
INCLUDES = -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/cmake-build-release" -I"/home/brett/Documents/Brock/CS 3P93/Project/Step 3/include"
|
||||||
|
OBJECT_DIR = CMakeFiles/Step_3.dir
|
||||||
|
OBJECT_FILE_DIR = CMakeFiles/Step_3.dir/src/engine/math
|
||||||
|
|
||||||
build CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o: CXX_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/engine/math/colliders.cpp || cmake_object_order_depends_target_Step_3
|
build CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o: CXX_COMPILER__Step_3_Release /home/brett/Documents/Brock/CS$ 3P93/Project/Step$ 3/src/engine/math/colliders.cpp || cmake_object_order_depends_target_Step_3
|
||||||
DEP_FILE = CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o.d
|
DEP_FILE = CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o.d
|
||||||
FLAGS = -march=native -O3 -DNDEBUG -std=gnu++20
|
FLAGS = -march=native -O3 -DNDEBUG -std=gnu++20
|
||||||
|
@ -218,7 +225,7 @@ build CMakeFiles/Step_3.dir/src/graphics/input.cpp.o: CXX_COMPILER__Step_3_Relea
|
||||||
#############################################
|
#############################################
|
||||||
# Link the executable Step_3
|
# Link the executable Step_3
|
||||||
|
|
||||||
build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Release CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
build Step_3: CXX_EXECUTABLE_LINKER__Step_3_Release CMakeFiles/Step_3.dir/src/engine/globals.cpp.o CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o CMakeFiles/Step_3.dir/src/engine/main.cpp.o CMakeFiles/Step_3.dir/src/engine/math/bvh.cpp.o CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o CMakeFiles/Step_3.dir/src/engine/world.cpp.o CMakeFiles/Step_3.dir/src/graphics/debug_gui.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.c.o CMakeFiles/Step_3.dir/src/graphics/gl/gl.cpp.o CMakeFiles/Step_3.dir/src/graphics/gl/shader.cpp.o CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_glfw.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_opengl3.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_impl_x11.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o CMakeFiles/Step_3.dir/src/graphics/input.cpp.o | /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
||||||
FLAGS = -march=native -O3 -DNDEBUG
|
FLAGS = -march=native -O3 -DNDEBUG
|
||||||
LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
LINK_LIBRARIES = -lpthread /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libOpenCL.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so
|
||||||
OBJECT_DIR = CMakeFiles/Step_3.dir
|
OBJECT_DIR = CMakeFiles/Step_3.dir
|
||||||
|
|
|
@ -9,7 +9,7 @@ Size=550,680
|
||||||
Collapsed=1
|
Collapsed=1
|
||||||
|
|
||||||
[Window][Debug Menu]
|
[Window][Debug Menu]
|
||||||
Pos=114,55
|
Pos=36,38
|
||||||
Size=339,226
|
Size=339,226
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,8 @@ namespace Raytracing {
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
struct BVHHitData {
|
struct BVHHitData {
|
||||||
BVHNode* ptr;
|
BVHNode* ptr{};
|
||||||
AABBHitData data;
|
AABBHitData data{};
|
||||||
bool hit = false;
|
bool hit = false;
|
||||||
};
|
};
|
||||||
std::vector<BVHObject> objs;
|
std::vector<BVHObject> objs;
|
||||||
|
@ -68,39 +68,7 @@ namespace Raytracing {
|
||||||
left(left), right(right) {
|
left(left), right(right) {
|
||||||
index = count++;
|
index = count++;
|
||||||
}
|
}
|
||||||
BVHHitData doesRayIntersect(const Ray& r, PRECISION_TYPE min, PRECISION_TYPE max){
|
BVHHitData firstHitRayIntersectTraversal(const Ray& r, PRECISION_TYPE min, PRECISION_TYPE max);
|
||||||
auto ourHitData = aabb.intersects(r, min, max);
|
|
||||||
if (!ourHitData.hit)
|
|
||||||
return {this, ourHitData, false};
|
|
||||||
|
|
||||||
this->hit = 2;
|
|
||||||
|
|
||||||
BVHHitData leftHit{};
|
|
||||||
leftHit.hit = false;
|
|
||||||
BVHHitData rightHit{};
|
|
||||||
rightHit.hit = false;
|
|
||||||
if (left != nullptr)
|
|
||||||
leftHit = left->doesRayIntersect(r, min, ourHitData.tMax);
|
|
||||||
if (right != nullptr)
|
|
||||||
rightHit = right->doesRayIntersect(r, min, leftHit.hit ? leftHit.data.tMin : ourHitData.tMax);
|
|
||||||
|
|
||||||
//tlog << "On the left we " << (leftHit.hit ? "hit" : "didn't hit") << ". with tmax " << leftHit.data.tMax << " and tmin " << leftHit.data.tMin << "\n";
|
|
||||||
//tlog << "On the right we " << (rightHit.hit ? "hit" : "didn't hit") << ". with tmax " << rightHit.data.tMax << " and tmin " << rightHit.data.tMin << "\n";
|
|
||||||
|
|
||||||
if (leftHit.hit && (leftHit.data.tMax < rightHit.data.tMax || !rightHit.hit))
|
|
||||||
return leftHit;
|
|
||||||
else if (rightHit.hit && (rightHit.data.tMax < leftHit.data.tMax || !leftHit.hit))
|
|
||||||
return rightHit;
|
|
||||||
|
|
||||||
//tlog << index << "I " << leftHit.hit << " ? " << rightHit.hit << " " << left << " " << right << " : " << objs.size() << " is empty? " << objs.empty() << "\n" ;
|
|
||||||
this->hit = !objs.empty();
|
|
||||||
if (objs.empty()){
|
|
||||||
//tlog << "we hit an empty box " << index << "\n";
|
|
||||||
return {this, ourHitData, false};
|
|
||||||
}
|
|
||||||
//tlog << "We hit a box with objects " << objs.size() << " ! " << index << "\n";
|
|
||||||
return {this, ourHitData, true};
|
|
||||||
}
|
|
||||||
#ifdef COMPILE_GUI
|
#ifdef COMPILE_GUI
|
||||||
void draw(Shader& worldShader) {
|
void draw(Shader& worldShader) {
|
||||||
worldShader.setVec3("color", {1.0, 1.0, 1.0});
|
worldShader.setVec3("color", {1.0, 1.0, 1.0});
|
||||||
|
@ -176,18 +144,7 @@ namespace Raytracing {
|
||||||
BVHNode* root = nullptr;
|
BVHNode* root = nullptr;
|
||||||
|
|
||||||
// splits the objs in the vector based on the provided AABBs
|
// splits the objs in the vector based on the provided AABBs
|
||||||
static BVHPartitionedSpace partition(const std::pair<AABB, AABB>& aabbs, const std::vector<BVHObject>& objs) {
|
static BVHPartitionedSpace partition(const std::pair<AABB, AABB>& aabbs, const std::vector<BVHObject>& objs);
|
||||||
BVHPartitionedSpace space;
|
|
||||||
for (const auto& obj: objs) {
|
|
||||||
// if this object doesn't have an AABB, we cannot use a BVH on it. If this ever fails we have a problem with the implementation.
|
|
||||||
RTAssert(!obj.aabb.isEmpty());
|
|
||||||
if (aabbs.first.intersects(obj.aabb))
|
|
||||||
space.left.push_back(obj);
|
|
||||||
else if (aabbs.second.intersects(obj.aabb))
|
|
||||||
space.right.push_back(obj);
|
|
||||||
}
|
|
||||||
return space;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool vectorEquals(const BVHPartitionedSpace& oldSpace, const BVHPartitionedSpace& newSpace){
|
static bool vectorEquals(const BVHPartitionedSpace& oldSpace, const BVHPartitionedSpace& newSpace){
|
||||||
if (oldSpace.left.size() != newSpace.left.size() || oldSpace.right.size() != newSpace.right.size())
|
if (oldSpace.left.size() != newSpace.left.size() || oldSpace.right.size() != newSpace.right.size())
|
||||||
|
@ -292,15 +249,8 @@ namespace Raytracing {
|
||||||
root = addObjectsRecur(objs, {});
|
root = addObjectsRecur(objs, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<BVHObject> rayIntersect(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) {
|
std::vector<BVHObject> rayFirstHitIntersect(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max);
|
||||||
RTAssert(root != nullptr);
|
std::vector<BVHObject> rayAnyHitIntersect(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max);
|
||||||
auto results = root->doesRayIntersect(ray, min, max);
|
|
||||||
RTAssert(results.ptr != nullptr);
|
|
||||||
if (results.hit)
|
|
||||||
return results.ptr->objs;
|
|
||||||
else
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
void resetNodes(){
|
void resetNodes(){
|
||||||
reset(root);
|
reset(root);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* Created by Brett Terpstra 6920201 on 16/11/22.
|
||||||
|
* Copyright (c) 2022 Brett Terpstra. All Rights Reserved.
|
||||||
|
*/
|
||||||
|
#include <engine/math/bvh.h>
|
||||||
|
#include <queue>
|
||||||
|
|
||||||
|
namespace Raytracing {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BVH Node Class
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the first bounding tree with objects in it hit by the provided ray.
|
||||||
|
* @param r the ray to check for intersection with
|
||||||
|
* @param min the min t allowed in intersection
|
||||||
|
* @param max the max t value allowed in intersection
|
||||||
|
* @return BVHHitData, a structure containing the node, AABB intersection and whether we actually hit anything or not.
|
||||||
|
*/
|
||||||
|
BVHNode::BVHHitData BVHNode::firstHitRayIntersectTraversal(const Ray& r, PRECISION_TYPE min, PRECISION_TYPE max) {
|
||||||
|
// first we need to check if the ray actually intersects with this node,
|
||||||
|
auto ourHitData = aabb.intersects(r, min, max);
|
||||||
|
// if it doesn't we need to immediately return, which prunes all subtrees to this node.
|
||||||
|
if (!ourHitData.hit)
|
||||||
|
return {this, ourHitData, false};
|
||||||
|
// storage for left and right subtree results.
|
||||||
|
BVHHitData leftHit{};
|
||||||
|
BVHHitData rightHit{};
|
||||||
|
// make sure we actually have a left or right node, and if we do traverse them recursively
|
||||||
|
if (left != nullptr)
|
||||||
|
leftHit = left->firstHitRayIntersectTraversal(r, min, max);
|
||||||
|
if (right != nullptr)
|
||||||
|
rightHit = right->firstHitRayIntersectTraversal(r, min, max);
|
||||||
|
// once we are either in a bounding box with objects or we are not.
|
||||||
|
// to ensure that we keep order and return the first bounding box with objects hit by the ray,
|
||||||
|
// we must check if the left tree is closer than the right tree, or we didn't hit the right tree.
|
||||||
|
// if we didn't hit the right tree than we can propagate the left tree up
|
||||||
|
if (leftHit.hit && (leftHit.data.tMax < rightHit.data.tMax || !rightHit.hit))
|
||||||
|
return leftHit;
|
||||||
|
// the same goes for the right tree. if we reach this point the left tree didn't get it or was farther than the right tree
|
||||||
|
// and so we do the same check. make sure that the right tree is closer, or we didn't hit the left tree.
|
||||||
|
else if (rightHit.hit && (rightHit.data.tMax < leftHit.data.tMax || !leftHit.hit))
|
||||||
|
return rightHit;
|
||||||
|
// if we hit neither tree in all likelihood this is a leaf node, and we can return accordingly
|
||||||
|
// but if this isn't a leaf node there will be problems. So if this isn't a leaf node (doesn't have objects)
|
||||||
|
// we can pretend like we didn't hit anything.
|
||||||
|
return {this, ourHitData, !objs.empty()};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BVH Node Class
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Splits the objects into the two distinct spaces provided in the aabbs param based on their intersection
|
||||||
|
* This is left side based and produces two vectors which are unique.
|
||||||
|
* @param aabbs the two spaces which to split the objs vector into
|
||||||
|
* @param objs object vector to be split into aabbs
|
||||||
|
* @return BVHPartitionedSpace, a structure with two vectors containing the split objects. Is left side based and unique.
|
||||||
|
*/
|
||||||
|
BVHPartitionedSpace BVHTree::partition(const std::pair<AABB, AABB>& aabbs, const std::vector<BVHObject>& objs) {
|
||||||
|
BVHPartitionedSpace space;
|
||||||
|
for (const auto& obj: objs) {
|
||||||
|
// if this object doesn't have an AABB, we cannot use a BVH on it. If this ever fails we have a problem with the implementation.
|
||||||
|
RTAssert(!obj.aabb.isEmpty());
|
||||||
|
if (aabbs.first.intersects(obj.aabb))
|
||||||
|
space.left.push_back(obj);
|
||||||
|
else if (aabbs.second.intersects(obj.aabb))
|
||||||
|
space.right.push_back(obj);
|
||||||
|
}
|
||||||
|
return space;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the object array from the first bounding tree with objects in it hit by the provided ray.
|
||||||
|
* @firstHitRayIntersectTraversal for more information.
|
||||||
|
*/
|
||||||
|
std::vector<BVHObject> BVHTree::rayFirstHitIntersect(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) {
|
||||||
|
RTAssert(root != nullptr);
|
||||||
|
auto results = root->firstHitRayIntersectTraversal(ray, min, max);
|
||||||
|
RTAssert(results.ptr != nullptr);
|
||||||
|
if (results.hit)
|
||||||
|
return results.ptr->objs;
|
||||||
|
else
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param ray
|
||||||
|
* @param min
|
||||||
|
* @param max
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
std::vector<BVHObject> BVHTree::rayAnyHitIntersect(const Ray& ray, PRECISION_TYPE min, PRECISION_TYPE max) {
|
||||||
|
std::queue<BVHNode*> nodes{};
|
||||||
|
std::vector<BVHObject> objects;
|
||||||
|
|
||||||
|
nodes.push(root);
|
||||||
|
|
||||||
|
while (!nodes.empty()) {
|
||||||
|
auto* node = nodes.front();
|
||||||
|
|
||||||
|
auto AABB = node->aabb;
|
||||||
|
auto nodeHitData = AABB.intersects(ray, min, max);
|
||||||
|
if (nodeHitData.hit) {
|
||||||
|
if (node->left != nullptr)
|
||||||
|
nodes.push(node->left);
|
||||||
|
if (node->right != nullptr)
|
||||||
|
nodes.push(node->right);
|
||||||
|
|
||||||
|
if (!node->objs.empty()) {
|
||||||
|
for (const auto& obj: node->objs)
|
||||||
|
objects.push_back(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nodes.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
return objects;
|
||||||
|
}
|
||||||
|
}
|
|
@ -62,11 +62,7 @@ namespace Raytracing {
|
||||||
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
auto hResult = HitData{false, Vec4(), Vec4(), max};
|
||||||
Object* objPtr = nullptr;
|
Object* objPtr = nullptr;
|
||||||
|
|
||||||
auto intersected = bvhObjects->rayIntersect(ray, min, max);
|
auto intersected = bvhObjects->rayAnyHitIntersect(ray, min, max);
|
||||||
|
|
||||||
//tlog << " Our intersections found: " << intersected.size() << " objs\n";
|
|
||||||
|
|
||||||
//dlog << "Intersections " << intersected.objs.size() << " " << ray << "\n";
|
|
||||||
|
|
||||||
for (const auto& ptr : intersected) {
|
for (const auto& ptr : intersected) {
|
||||||
auto cResult = ptr.ptr->checkIfHit(ray, min, hResult.length);
|
auto cResult = ptr.ptr->checkIfHit(ray, min, hResult.length);
|
||||||
|
|
|
@ -562,7 +562,7 @@ namespace Raytracing {
|
||||||
auto ray = m_camera.projectRay((PRECISION_TYPE) m_window.displayWidth() / 2, (PRECISION_TYPE) m_window.displayHeight() / 2);
|
auto ray = m_camera.projectRay((PRECISION_TYPE) m_window.displayWidth() / 2, (PRECISION_TYPE) m_window.displayHeight() / 2);
|
||||||
|
|
||||||
//auto results = m_world.checkIfHit(ray, 0, 1000).first;
|
//auto results = m_world.checkIfHit(ray, 0, 1000).first;
|
||||||
auto bvh = m_world.getBVH()->rayIntersect(ray, 0, 1000);
|
auto bvh = m_world.getBVH()->rayAnyHitIntersect(ray, 0, 1000);
|
||||||
//if (results.hit)
|
//if (results.hit)
|
||||||
// ilog << "World Results: " << results.hitPoint << " " << results.length << "\n";
|
// ilog << "World Results: " << results.hitPoint << " " << results.length << "\n";
|
||||||
//else
|
//else
|
||||||
|
|
Loading…
Reference in New Issue