8 #ifndef SE_ITERATOR_HPP 9 #define SE_ITERATOR_HPP 20 template<
typename DerivedT>
38 template<
typename DerivedT>
68 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
74 DerivedT& underlying()
76 return static_cast<DerivedT&
>(*this);
78 const DerivedT& underlying()
const 80 return static_cast<const DerivedT&
>(*this);
91 std::stack<se::OctantBase*> octant_stack_;
95 OctreeType* octree_ptr_ =
nullptr;
100 template<
typename OctreeT>
110 static constexpr
bool has_ignore_condition =
false;
123 template<
typename OctreeT>
133 static constexpr
bool has_ignore_condition =
false;
146 template<
typename OctreeT>
156 static constexpr
bool has_ignore_condition =
false;
169 template<
typename OctreeT>
179 static constexpr
bool has_ignore_condition =
false;
192 template<
typename OctreeT>
203 static constexpr
bool has_ignore_condition =
true;
222 template<
typename MapT,
typename SensorT>
226 typedef typename MapT::OctreeType::NodeType
NodeType;
235 sensor_ptr_(&sensor),
249 Eigen::Vector3f octant_centre_point_M;
250 const int octant_size =
251 se::octantops::octant_to_size<typename MapT::OctreeType>(octant_ptr);
252 map_ptr_->voxelToPoint(octant_ptr->
getCoord(), octant_size, octant_centre_point_M);
254 const Eigen::Vector3f octant_centre_point_S =
255 (T_SM_ * octant_centre_point_M.homogeneous()).
template head<3>();
257 float octant_radius = std::sqrt(3.0f) / 2.0f * map_ptr_->getRes() * octant_size;
258 bool do_ignore = !sensor_ptr_->sphereInFrustum(octant_centre_point_S, octant_radius);
262 static constexpr
bool has_ignore_condition =
true;
273 template<
typename OctreeT>
283 template<
typename OctreeT>
293 template<
typename OctreeT>
303 template<
typename OctreeT>
313 template<
typename OctreeT>
321 template<
typename MapT,
typename SensorT>
324 typedef typename MapT::OctreeType::NodeType
NodeType;
331 #include "impl/iterator_impl.hpp" 333 #endif // SE_ITERATOR_HPP OctreeIterator(OctreeT *octree_ptr)
Definition: iterator.hpp:105
bool doIgnore(se::OctantBase *octant_ptr)
Definition: iterator.hpp:210
BaseTraits< DerivedT >::NodeType NodeType
Definition: iterator.hpp:42
OctreeT::NodeType NodeType
Definition: iterator.hpp:276
BaseTraits< DerivedT >::OctreeType OctreeType
Definition: iterator.hpp:41
Definition: iterator.hpp:193
int getTimeStamp() const
Get the time stamp of an octant.
Definition: octant.hpp:77
OctreeT::NodeType NodeType
Definition: iterator.hpp:316
MapT::OctreeType::NodeType NodeType
Definition: iterator.hpp:324
FrustumIterator(MapT &map, const SensorT &sensor, const Eigen::Matrix4f &T_SM)
Definition: iterator.hpp:232
OctreeT::NodeType NodeType
Definition: iterator.hpp:296
OctreeT OctreeType
Definition: iterator.hpp:275
OctreeIterator()
Definition: iterator.hpp:103
Definition: iterator.hpp:101
long difference_type
Definition: iterator.hpp:62
OctreeT OctreeType
Definition: iterator.hpp:315
MapT::OctreeType::BlockType BlockType
Definition: iterator.hpp:325
MapT::OctreeType OctreeType
Definition: iterator.hpp:323
bool isNext(se::OctantBase *octant_ptr)
Definition: iterator.hpp:135
BaseIterator & operator++()
LeavesIterator()
Definition: iterator.hpp:172
OctreeT::BlockType BlockType
Definition: iterator.hpp:307
Definition: iterator.hpp:147
OctreeT::BlockType BlockType
Definition: iterator.hpp:297
OctreeT OctreeType
Definition: iterator.hpp:295
MapT::OctreeType::BlockType BlockType
Definition: iterator.hpp:227
Definition: iterator.hpp:21
Definition: iterator.hpp:124
bool doIgnore(se::OctantBase *octant_ptr)
Definition: iterator.hpp:247
std::forward_iterator_tag iterator_category
Definition: iterator.hpp:66
BlocksIterator(OctreeT *octree_ptr)
Definition: iterator.hpp:151
bool isNext(se::OctantBase *)
Definition: iterator.hpp:112
se::OctantBase * operator*() const
const SensorT * sensor_ptr_
Definition: iterator.hpp:265
bool isNext(se::OctantBase *octant_ptr)
Definition: iterator.hpp:242
OctreeT OctreeType
Definition: iterator.hpp:305
unsigned int getChildrenMask() const
Definition: octant.hpp:114
bool operator!=(const BaseIterator &other) const
const unsigned int time_stamp_
Definition: iterator.hpp:215
LeavesIterator(OctreeT *octree_ptr)
Definition: iterator.hpp:174
OctreeT::NodeType NodeType
Definition: iterator.hpp:306
FrustumIterator()
Definition: iterator.hpp:230
MapT * map_ptr_
Definition: iterator.hpp:264
MapT::OctreeType::NodeType NodeType
Definition: iterator.hpp:226
bool isBlock() const
Verify if an octant is a block.
Definition: octant.hpp:40
OctreeT::BlockType BlockType
Definition: iterator.hpp:287
OctreeT OctreeType
Definition: iterator.hpp:285
Definition: iterator.hpp:223
Definition: iterator.hpp:170
bool isNext(se::OctantBase *octant_ptr)
Definition: iterator.hpp:158
bool isNext(se::OctantBase *octant_ptr)
Definition: iterator.hpp:205
OctreeT::BlockType BlockType
Definition: iterator.hpp:277
Iterates over all valid data in the octree at the last scale it was updated at.
Definition: iterator.hpp:39
bool isNext(se::OctantBase *octant_ptr)
Definition: iterator.hpp:181
const Eigen::Matrix4f T_SM_
Definition: iterator.hpp:266
bool operator==(const BaseIterator &other) const
NodesIterator()
Definition: iterator.hpp:126
MapT::OctreeType OctreeType
Definition: iterator.hpp:225
This class only helps to dynamic cast the octant to the right type and builds the base of nodes and b...
Definition: octant.hpp:24
OctreeT::BlockType BlockType
Definition: iterator.hpp:317
BaseTraits< DerivedT >::BlockType BlockType
Definition: iterator.hpp:43
OctreeT::NodeType NodeType
Definition: iterator.hpp:286
UpdateIterator(OctreeT *octree_ptr, const unsigned int time_stamp)
Definition: iterator.hpp:197
UpdateIterator()
Definition: iterator.hpp:195
Eigen::Vector3i getCoord() const
Get the voxel coordinates of the octant.
Definition: octant.hpp:50
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17
NodesIterator(OctreeT *octree_ptr)
Definition: iterator.hpp:128
BlocksIterator()
Definition: iterator.hpp:149