39 #ifndef PCL_OUTOFCORE_DEPTH_FIRST_ITERATOR_IMPL_H_
40 #define PCL_OUTOFCORE_DEPTH_FIRST_ITERATOR_IMPL_H_
47 template<
typename Po
intT,
typename ContainerT>
59 template<
typename Po
intT,
typename ContainerT>
64 template<
typename Po
intT,
typename ContainerT>
69 if (this->currentNode_)
76 auto* currentBranch =
static_cast<BranchNode*
> (this->currentNode_);
78 if (currentChildIdx_ < 8)
80 itNode = this->octree_.getBranchChildPtr (*currentBranch, currentChildIdx_);
83 while ((currentChildIdx_ < 7) && !(itNode))
87 itNode = this->octree_.getBranchChildPtr (*currentBranch, currentChildIdx_);
107 if (!stack_.empty ())
109 std::pair<OutofcoreOctreeBaseNode<ContainerT, PointT>*,
unsigned char>& stackEntry = stack_.back ();
112 this->currentNode_ = stackEntry.first;
113 currentChildIdx_ = stackEntry.second;
116 this->currentOctreeDepth_--;
120 this->currentNode_ =
nullptr;
126 std::pair<OutofcoreOctreeBaseNode<ContainerT, PointT>*,
unsigned char> newStackEntry;
127 newStackEntry.first = this->currentNode_;
128 newStackEntry.second =
static_cast<unsigned char> (currentChildIdx_+1);
130 stack_.push_back (newStackEntry);
134 this->currentOctreeDepth_++;
136 this->currentNode_ = itNode;
std::vector< std::pair< OctreeDiskNode *, unsigned char > > stack_
~OutofcoreDepthFirstIterator() override
OutofcoreDepthFirstIterator(OctreeDisk &octree_arg)
OutofcoreDepthFirstIterator & operator++()
Abstract octree iterator class.
This code defines the octree used for point storage at Urban Robotics.
std::uint64_t getTreeDepth() const
OutofcoreOctreeBaseNode Class internally representing nodes of an outofcore octree,...
A point structure representing Euclidean xyz coordinates, and the RGB color.