Template Class GenericCloudIteratorBase

Inheritance Relationships

Base Type

  • public sensor_msgs::impl::PointCloud2IteratorBase< T, TT, U, C, V >

Class Documentation

template<typename T, typename TT, typename U, typename C, template<typename> class V>
class GenericCloudIteratorBase : public sensor_msgs::impl::PointCloud2IteratorBase<T, TT, U, C, V>

Base of a generic cloud iterator which can return the data in the raw type.

Template Parameters:
  • T – Type of the value on which the child class will be templated.

  • TT – Type of the value to be retrieved (same as T except for constness).

  • U – Type of the raw data in PointCloud2 (only uchar and const uchar are supported).

  • C – Type of the pointcloud to intialize from (const or not).

  • V – The derived class (yop, curiously recurring template pattern).

Public Functions

GenericCloudIteratorBase(C &cloudMsg, const ::std::string &fieldName)
Parameters:
  • cloud_msg[in] The PointCloud2 to iterate upon.

  • field_name[in] The field to iterate upon.

inline size_t getFieldSize() const

Get the byte size of the field which this iterator iterates.

Returns:

Size in bytes.

U *rawData() const

Return a pointer to the raw data of this field. Only getFieldSize() bytes after this pointer are valid.

Returns:

The pointer.

Protected Attributes

size_t fieldSize = 0

The byte size of the field which this iterator iterates.