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

#include <nrt/PointCloud2/PointCloud2.H>

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

An iterator over geometry and other fields.

Creating one of these iterators may cause a deep copy of the underlying data to occur if not the sole owner of the data. When possible, constant iterators should be used as these do not incur a deep copy penalty

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 PointCloud2DataRef that contains references to the actual data in the point cloud. Modifying this PointCloud2DataRef will change the data in the point cloud directly.

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: IteratorBase for empty template instantiation and IteratorVariadic for variadic instantiation.

Definition at line 414 of file PointCloud2.H.


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