iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::PointCloud2::ConstIterator< Fields > Class Template Reference

#include <nrt/PointCloud2/PointCloud2.H>

template<class... Fields>
class nrt::PointCloud2::ConstIterator< Fields >

A constant iterator over geometry and other fields.

Constant iterators do not need to perform deep copies since they cannot modify the data. Thus these will in general be much more efficient to use if multiple references to the underlying data exist.

Iterators will always include a reference to the geometry and this needs not be specified during their creation.

Dereferencing an iterator works in a similar fashion to the get() and at() functions of PointCloud2 - this will return a constant PointCloud2DataRef that contains references to the actual data in the point cloud. Modifying this PointCloud2DataRef is not possible and data cannot be changed in the original point cloud.

Iterators provide two additional functions, sparse(), which returns true if the iterator includes sparse data, and index(), which returns the index of the current value in the point cloud. index() is especially useful if traversing over sparse data or a subset, since it gives a way to index back into the original point cloud.

Also see: ConstIteratorBase for empty template instantiation and ConstIteratorVariadic for variadic instantiation.

Definition at line 437 of file PointCloud2.H.

The documentation for this class was generated from the following file: