Skip to content

Commit

Permalink
Octrees use vectors of sizes rather than Input_range as Point_range
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 4, 2020
1 parent a3eb226 commit 2099d72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Expand Up @@ -1083,9 +1083,7 @@ class Efficient_RANSAC {

if (cur) {
std::size_t enough = 0;
for (auto pointIndex : cur->points()) {

std::size_t j = *pointIndex;
for (auto j : cur->points()) {
if (shapeIndex[j] == -1) {
enough++;
if (enough >= requiredSamples)
Expand Down
Expand Up @@ -32,7 +32,7 @@ namespace internal {


template<class Traits>
class Direct_octree : public Octree::Octree<typename Traits::Input_range, typename Traits::Point_map> {
class Direct_octree : public Octree::Octree<std::vector<std::size_t>, typename Traits::Point_map> {

Traits m_traits;
std::size_t m_offset;
Expand All @@ -47,7 +47,7 @@ class Direct_octree : public Octree::Octree<typename Traits::Input_range, typena
const Input_iterator &end,
Point_map &point_map,
std::size_t offset = 0) :
Octree::Octree<typename Traits::Input_range, typename Traits::Point_map>({begin, end}, point_map),
Octree::Octree<std::vector<std::size_t>, typename Traits::Point_map>({}, point_map),
m_traits(traits),
m_offset(offset) {

Expand Down Expand Up @@ -76,7 +76,7 @@ class Direct_octree : public Octree::Octree<typename Traits::Input_range, typena
};

template<class Traits>
class Indexed_octree : public Octree::Octree<typename Traits::Input_range, typename Traits::Point_map> {
class Indexed_octree : public Octree::Octree<std::vector<std::size_t>, typename Traits::Point_map> {

Traits m_traits;

Expand All @@ -89,7 +89,7 @@ class Indexed_octree : public Octree::Octree<typename Traits::Input_range, typen
const Input_iterator &begin,
const Input_iterator &end,
Point_map &point_map) :
Octree::Octree<typename Traits::Input_range, typename Traits::Point_map>({begin, end}, point_map),
Octree::Octree<std::vector<std::size_t>, typename Traits::Point_map>({}, point_map),
m_traits(traits) {

}
Expand Down

0 comments on commit 2099d72

Please sign in to comment.