Skip to content

Commit

Permalink
Add reminder to replace fixed side length map size
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 7, 2020
1 parent b9b269e commit 9fb5182
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -222,6 +222,7 @@ class Octree {
m_side_per_depth.resize(0);

// create a side length map
// TODO: This should not be a fixed value (32)
for (int i = 0; i <= (int) 32; i++)
m_side_per_depth.push_back(m_bbox_side / (FT) (1 << i));

Expand Down
Expand Up @@ -213,7 +213,7 @@ class Efficient_RANSAC {

// typedef internal::Octree<internal::DirectPointAccessor<Traits> >
// Direct_octree;
typedef internal::Direct_octree<Traits> Direct_octree;
typedef internal::Indexed_octree<Traits> Direct_octree;
typedef internal::Indexed_octree<Traits> Indexed_octree;

//--------------------------------------------typedef
Expand Down Expand Up @@ -372,14 +372,9 @@ class Efficient_RANSAC {
m_point_pmap,
0);

std::cout << "s = " << s << std::endl;
std::cout << *(m_input_iterator_first + 0) << std::endl;

m_available_octree_sizes[s] = subsetSize;
m_direct_octrees[s]->refine(m_options.cluster_epsilon);

std::cout << *(m_input_iterator_first + 0) << std::endl;

remainingPoints -= subsetSize;
}

Expand Down Expand Up @@ -905,8 +900,9 @@ class Efficient_RANSAC {

private:
int select_random_octree_level() {
return (int) get_default_random()(
static_cast<unsigned int>(m_global_octree->maxLevel() + 1));
std::cout << m_global_octree->maxLevel() << std::endl;
auto upper_bound = static_cast<unsigned int>(m_global_octree->maxLevel() + 1);
return (int) get_default_random()(upper_bound);
}

Shape *get_best_candidate(std::vector<Shape *> &candidates,
Expand Down

0 comments on commit 9fb5182

Please sign in to comment.