TODO: avoid BVH-BVH copy in `collide`?
Opened this issue · 0 comments
lmontaut commented
BVH-BVH makes a full copy of both BVHs + BV fitting before calling collide
:
hpp-fcl/src/collision_func_matrix.cpp
Lines 214 to 229 in aa3c40a
Doing this not only copies two BVHs (which can have thousands or even hundreds of thousands of vertices) but also fits them with a new BVs structure.
I think the original idea was to transform both BVH in the world frame, hence avoiding having to transform each AABB when doing the collision between leafs of the BVHs.
In practice, when doing BVH-BVH collision, there are only a few AABB collision checks, and transforming an AABB is very cheap. Is it really worth copying/fitting two BVHs in order to avoid these on-the-fly transformations?