Skip to content

Commit 366f642

Browse files
committed
BVH-BVH: add todo on copying BVHModels (???)
1 parent 55c5131 commit 366f642

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/collision_func_matrix.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ std::size_t BVHCollide(const CollisionGeometry* o1, const Transform3f& tf1,
217217
CollisionResult& result) {
218218
if (request.isSatisfied(result)) return result.numContacts();
219219

220+
// TODO(louis): each time we call collide on BVH-BVH, we:
221+
// - Allocate 2 new BVHs
222+
// - Copy and transform the vertices in both BVHs so that they are in the
223+
// same frame
224+
// - Recompute BVs of the BVH structure
225+
// -> all that just to avoid doing (a few) rotations/translations of AABBs.
226+
// Is it really worth it?
220227
MeshCollisionTraversalNode<T_BVH> node(request);
221228
const BVHModel<T_BVH>* obj1 = static_cast<const BVHModel<T_BVH>*>(o1);
222229
const BVHModel<T_BVH>* obj2 = static_cast<const BVHModel<T_BVH>*>(o2);

0 commit comments

Comments
 (0)