From 1791848aba163489cbe33145a5254083fcdab782 Mon Sep 17 00:00:00 2001 From: Lukas Werner <lks.werner@fau.de> Date: Fri, 9 Mar 2018 22:31:26 +0100 Subject: [PATCH] Fix check all cell neighbors macro --- src/pe/ccd/HashGrids.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pe/ccd/HashGrids.h b/src/pe/ccd/HashGrids.h index 14dc612ca..af953cc48 100644 --- a/src/pe/ccd/HashGrids.h +++ b/src/pe/ccd/HashGrids.h @@ -534,10 +534,6 @@ const BodyID HashGrids::HashGrid::getBodyIntersectionForBlockCell(const Vector3< const Cell& centerCell = cell_[cellHash]; std::vector<offset_t> relevantNeighborIndices; - -#ifdef HASHGRIDS_RAYTRACING_CHECK_ALL_NEIGHBORS - cellNormalAxis = BLOCKCELL_NORMAL_INDETERMINATE; -#endif if (cellNormalAxis == 0) { if (cellNormalDir == -1) { @@ -566,6 +562,14 @@ const BodyID HashGrids::HashGrid::getBodyIntersectionForBlockCell(const Vector3< }; } +#ifdef HASHGRIDS_RAYTRACING_CHECK_ALL_NEIGHBORS + relevantNeighborIndices = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26 + }; +#endif + for (uint i = 0; i < relevantNeighborIndices.size(); ++i) { const offset_t neighborIndex = relevantNeighborIndices[i]; const Cell* nbCell = ¢erCell + centerCell.neighborOffset_[neighborIndex]; -- GitLab