PointCloudPackedIterator< FieldType > Class Template Reference
Class that can iterate over a PointCloudPacked message. More...
#include <PointCloudPackedUtils.hh>
Public Member Functions | |
PointCloudPackedIterator (PointCloudPacked &_cloudMsg, const std::string &_fieldName) | |
Detailed Description
template<typename FieldType>
class ignition::msgs::PointCloudPackedIterator< FieldType >
Class that can iterate over a PointCloudPacked message.
E.g, you create your message and reserve space for data as follows:
{{"a", PointCloudPacked::Field::FLOAT32}});
For iterating over "a", you do :
ignition::msgs::PointCloudPackedIterator<float> iterA(pcMsg, "a");
And then access it through iterA[0] or *iterA.
For iterating over RGBA, you can access each element as uint8_t:
ignition::msgs::PointCloudPackedIterator<uint8_t> iterR(pcMsg, "r");
ignition::msgs::PointCloudPackedIterator<uint8_t> iterG(pcMsg, "g");
ignition::msgs::PointCloudPackedIterator<uint8_t> iterB(pcMsg, "b");
ignition::msgs::PointCloudPackedIterator<uint8_t> iterA(pcMsg, "a");
- Template Parameters
-
FieldType Type of the element being iterated upon
Constructor & Destructor Documentation
◆ PointCloudPackedIterator()
|
inline |
The documentation for this class was generated from the following file:
T resize(T... args)
::std::string * mutable_data()
Definition: build/ignition-msgs8/include/ignition/msgs/pointcloud_packed.pb.h:749
::google::protobuf::uint32 point_step() const
Definition: build/ignition-msgs8/include/ignition/msgs/pointcloud_packed.pb.h:692
static const DataType FLOAT32
Definition: build/ignition-msgs8/include/ignition/msgs/pointcloud_packed.pb.h:207
Definition: build/ignition-msgs8/include/ignition/msgs/pointcloud_packed.pb.h:279
void InitPointCloudPacked(msgs::PointCloudPacked &_msg, const std::string &_frameId, bool _memoryAligned, const std::vector< std::pair< std::string, msgs::PointCloudPacked::Field::DataType >> &_fields)
This function will set the header and field members of a PointCloudPacked message....
Class that can iterate over a PointCloudPacked message.
Definition: ignition/msgs/PointCloudPackedUtils.hh:68