Template Struct DefaultVoxelBucket

Struct Documentation

template<typename T>
struct DefaultVoxelBucket

Default per-voxel bucket.

Stores only a collection of points with no additional metadata. sizeof(DefaultVoxelBucket<T>) == sizeof(std::vector<T>).

Public Types

using points_type = std::vector<T>

Concrete container type used to store the points in this bucket.

Public Members

std::vector<T> points

Points admitted into this voxel, up to max_points_per_voxel.

Public Static Functions

template<typename MapType>
static inline void init_voxel(const MapType &map, DefaultVoxelBucket<T> &b) noexcept

Reserve storage for the maximum expected number of points per voxel.

Parameters:
  • map[in] The owning VoxelHashMap; queried for max_points_per_voxel.

  • b[out] The bucket to initialise.

template<typename MapType, typename Func>
static inline void visit_voxel(const MapType&, const DefaultVoxelBucket<T> &b, Func &&func)

Invoke func for every point stored in the bucket.

Parameters:
  • b[in] Bucket whose points are visited.

  • func[in] Callable invoked with each stored point.

template<typename MapType>
static inline std::size_t point_count(const MapType&, const DefaultVoxelBucket<T> &b) noexcept

Return the number of points currently stored in the bucket.

Parameters:

b[in] The bucket to query.

Returns:

Number of points in the bucket.