dilevin / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
6 stars 7 forks source link

Find All Intersecting Pairs Base Case #111

Closed grandrx10 closed 1 month ago

grandrx10 commented 1 month ago

Hi, I am working with the find all intersecting pairs file and I am having some trouble writing the base case. If both subtrees are leaves, how do I know if they are intersecting? I can't use box box intersection because 2 triangles wouldn't necessarily be touching even if their boxes are intersecting. Is there something I'm missing?

image

milomg commented 1 month ago

Find all intersecting box pairs

Zhecheng-Wang commented 1 month ago

This function is meant to find box box intersection pairs as the "broad phase". AABB is used to avoid computing every pair of triangle triangle intersection after all. We only computer triangle triangle intersection if their bounding box intersects.

grandrx10 commented 1 month ago

OHHHH! Thanks very much.