Autoware.Auto
|
|
A simple class to accumulate points for a voxel and emit the centroid. More...
#include <voxel.hpp>
Public Types | |
using | point_t = PointT |
Public Member Functions | |
Voxel () | |
Default constructor, corresponds to an empty/uninitialized voxel. More... | |
Voxel (const PointT &pt) | |
Point constructor, voxel is assumed to be created based on this point. More... | |
operator bool () const | |
Conversion operator to bool, pass through to occupied. More... | |
operator PointT () const | |
Conversion operator to PointT, pass through to get. More... | |
bool | occupied () const |
Whether or not this object has at least one point associated with it. More... | |
void | clear () |
Resets the centroid for incremental updating. More... | |
const PointT & | get () const |
Emit the centroid. More... | |
uint32_t | count () const |
Get the current number of points associated with this voxel. More... | |
Protected Member Functions | |
void | set_count (const uint32_t next) |
Sets the count. This is to properly encapsulate the member variables. Intended to be used by child classes. More... | |
void | set_centroid (const PointT &pt) |
Sets the centroid. This is to properly encapsulate the member variables. Intended to be used by child classes. More... | |
A simple class to accumulate points for a voxel and emit the centroid.
The VoxelGrid data structure assumes the voxel type subclasses from this class, and adds one additional function with the signature void add_observation(const PointT & pt);
PointT | The point type, must have float32_t members x, y, and z |
using autoware::perception::filters::voxel_grid::Voxel< PointT >::point_t = PointT |
|
inline |
Default constructor, corresponds to an empty/uninitialized voxel.
|
inlineexplicit |
Point constructor, voxel is assumed to be created based on this point.
|
inline |
Resets the centroid for incremental updating.
|
inline |
Get the current number of points associated with this voxel.
|
inline |
Emit the centroid.
std::out_of_range | If voxel is not occupied |
|
inline |
Whether or not this object has at least one point associated with it.
|
inlineexplicit |
Conversion operator to bool, pass through to occupied.
|
inlineexplicit |
Conversion operator to PointT, pass through to get.
std::out_of_range | If voxel is not occupied |
|
inlineprotected |
Sets the centroid. This is to properly encapsulate the member variables. Intended to be used by child classes.
[in] | pt | The new centroid |
|
inlineprotected |
Sets the count. This is to properly encapsulate the member variables. Intended to be used by child classes.
[in] | next | The new count to set the number points |