Skip to content

Commit

Permalink
Replace Index() with dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 4, 2020
1 parent 46ac050 commit a330f28
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -1036,7 +1036,7 @@ class Efficient_RANSAC {

FT diag = CGAL::sqrt(FT(3) * width * width) + epsilon;

FT dist = candidate->squared_distance(cell->barycenter());
FT dist = candidate->squared_distance(octree->barycenter(*cell));

if (dist > (diag * diag))
continue;
Expand All @@ -1047,8 +1047,8 @@ class Efficient_RANSAC {
std::vector<std::size_t> indices;
indices.reserve(cell->size());
for (std::size_t i = 0; i < cell->size(); i++) {
if (shapeIndex[octree->index(cell->first + i)] == -1) {
indices.push_back(octree->index(cell->first + i));
if (shapeIndex[*(cell->points().begin() + i)] == -1) {
indices.push_back(*(cell->points().begin() + i));
}
}

Expand Down

0 comments on commit a330f28

Please sign in to comment.