39 #ifndef PCL_POINT_CLOUD_ITERATOR_HPP_
40 #define PCL_POINT_CLOUD_ITERATOR_HPP_
42 #include <pcl/cloud_iterator.h>
49 template <
class Po
intT>
55 , iterator_ (cloud.begin ())
80 return (&(*iterator_));
85 return (iterator_ - cloud_.begin ());
90 return (iterator_ - cloud_.begin ());
95 return cloud_.size ();
100 iterator_ = cloud_.begin ();
105 return (iterator_ != cloud_.end ());
115 template <
class Po
intT>
122 , iterator_ (indices_.begin ())
128 , indices_ (indices.indices)
129 , iterator_ (indices_.begin ())
147 return (cloud_.points [*iterator_]);
152 return (&(cloud_.points [*iterator_]));
162 return (iterator_ - indices_.begin ());
167 return indices_.size ();
172 iterator_ = indices_.begin ();
177 return (iterator_ != indices_.end ());
183 Indices::iterator iterator_;
189 template <
class Po
intT>
195 , iterator_ (cloud.begin ())
220 return (&(*iterator_));
225 return (
unsigned (iterator_ - cloud_.begin ()));
230 return (
unsigned (iterator_ - cloud_.begin ()));
233 std::size_t
size ()
const override
235 return cloud_.size ();
240 iterator_ = cloud_.begin ();
245 return (iterator_ != cloud_.end ());
255 template <
class Po
intT>
263 , iterator_ (indices_.begin ())
270 , indices_ (indices.indices)
271 , iterator_ (indices_.begin ())
289 return (cloud_[*iterator_]);
294 return (&(cloud_.points [*iterator_]));
299 return (
unsigned (*iterator_));
304 return (
unsigned (iterator_ - indices_.begin ()));
307 std::size_t
size ()
const override
309 return indices_.size ();
314 iterator_ = indices_.begin ();
319 return (iterator_ != indices_.end ());
325 Indices::iterator iterator_;
330 template <
class Po
intT>
337 template <
class Po
intT>
345 template <
class Po
intT>
353 template <
class Po
intT>
358 indices.reserve (corrs.size ());
361 for (
const auto &corr : corrs)
362 indices.push_back (corr.index_query);
366 for (
const auto &corr : corrs)
367 indices.push_back (corr.index_match);
373 template <
class Po
intT>
380 template <
class Po
intT>
void
383 iterator_->operator++ ();
387 template <
class Po
intT>
void
390 iterator_->operator++ (0);
394 template <
class Po
intT>
PointT&
397 return (iterator_->operator * ());
401 template <
class Po
intT>
PointT*
404 return (iterator_->operator-> ());
408 template <
class Po
intT>
unsigned
411 return (iterator_->getCurrentPointIndex ());
415 template <
class Po
intT>
unsigned
418 return (iterator_->getCurrentIndex ());
422 template <
class Po
intT> std::size_t
425 return (iterator_->size ());
429 template <
class Po
intT>
void
436 template <
class Po
intT>
bool
439 return (iterator_->isValid ());
444 template <
class Po
intT>
451 template <
class Po
intT>
459 template <
class Po
intT>
467 template <
class Po
intT>
472 indices.reserve (corrs.size ());
475 for (
const auto &corr : corrs)
476 indices.push_back (corr.index_query);
480 for (
const auto &corr : corrs)
481 indices.push_back (corr.index_match);
487 template <
class Po
intT>
494 template <
class Po
intT>
void
497 iterator_->operator++ ();
501 template <
class Po
intT>
void
504 iterator_->operator++ (0);
508 template <
class Po
intT>
const PointT&
511 return (iterator_->operator * ());
515 template <
class Po
intT>
const PointT*
518 return (iterator_->operator-> ());
522 template <
class Po
intT>
unsigned
525 return (iterator_->getCurrentPointIndex ());
529 template <
class Po
intT>
unsigned
532 return (iterator_->getCurrentIndex ());
536 template <
class Po
intT> std::size_t
539 return (iterator_->size ());
543 template <
class Po
intT>
void
550 template <
class Po
intT>
bool
553 return (iterator_->isValid ());
556 #endif // PCL_POINT_CLOUD_ITERATOR_HPP_