I tried ./intersections ../data/knight.obj ../data/cheburashka.obj
I got the following.. It seems like the brute force is only using triangle_triangle_intersection function, but for that function, I basically just run 6 calls to the ray_intersect_triangle... It should not be that slow...What could be the reason?
I am confused by the Distance Query section, should we use bfs for AABBTree_ray_intersect.cpp? If so, what should we use as the distance for deciding the left or right child? I suppose the t value in ray_intersect_box should do the job, but the function is not returning it.
I implemented it following the pseudo code on the textbook, but I found the runtime not very satisfying, it's even slower than the brute force.
When I try to run rays.cpp in Visual Studio 2019, I get this compile time error that occurs in visualize_aabbtree.h on line 135. After I commented this line out, my code works properly and the Viewer properly renders my AABB tree. However, I think the background color is different than the example pictures.
I am not sure what part of my code causes this error to happen.