alecjacobson / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
123 stars 43 forks source link

AABBTree_ray_intersect.cpp how to quarry #44

Open Alireza1997 opened 4 years ago

Alireza1997 commented 4 years ago

Are we supposed to use the textbook implementation to quarry in this case? The BFS approach described in the assignment requires us to be getting the distance to the bounding box at each subtree, but our bounding box intersection function isn't supposed to return distance information so I'm not sure if we are supposed to use this...

abhimadan commented 4 years ago

Ray intersections can use DFS. The reason DFS doesn't work as well for nearest neighbour searches is that it can vastly underestimate the minimum distance of any object contained within a particular subtree, and forces you to make greedy choices that often don't pan out.