diff --git a/src/pe/ccd/HashGrids.h b/src/pe/ccd/HashGrids.h index af953cc487708c397e9949a751e63b2ee1666dfa..305a2590624d10145d075a9ebb1f549074cf94ad 100644 --- a/src/pe/ccd/HashGrids.h +++ b/src/pe/ccd/HashGrids.h @@ -782,19 +782,12 @@ BodyID HashGrids::getClosestBodyIntersectingWithRay(const raytracing::Ray& ray, } } - for (auto gridIt = gridList_.rbegin(); gridIt != gridList_.rend(); ++gridIt) { - body_local = (*gridIt)->getRayIntersectingBody<BodyTuple>(ray, blockAABB, t_closest, n_closest); - if (body_local != NULL){ - body_closest = body_local; - } - } - - /*for(auto grid: gridList_) { + for(auto grid: gridList_) { body_local = grid->getRayIntersectingBody<BodyTuple>(ray, blockAABB, t_closest, n_closest); if (body_local != NULL){ body_closest = body_local; } - }*/ + } t = t_closest; n = n_closest;