Template Struct AveragePointBucket¶
Defined in File voxel_hash_map.h
Struct Documentation¶
-
template<typename T>
struct AveragePointBucket¶ Per-voxel bucket that accumulates all inserted points into a single running sum.
Pair with accumulate_strategy so that every inserted point contributes to the sum, and with pointcloud() / pointcloud_vector() to retrieve the per-voxel average (sum / count).
Public Members
-
std::size_t count¶
Number of points accumulated so far; 0 means the bucket is empty.
Public Static Functions
-
template<typename MapType>
static inline void init_voxel(const MapType &map, AveragePointBucket<T> &b) noexcept¶ Zero-initialise the running sum to the correct size and reset the count.
- Parameters:
map[in] The owning VoxelHashMap; queried for point_cols.
b[out] The bucket to initialise.
-
template<typename MapType, typename Func>
static inline void visit_voxel(const MapType &map, const AveragePointBucket<T> &b, Func &&func)¶ Invoke
funcwith the per-voxel average if the bucket meets the minimum points threshold required by the map.- Parameters:
map[in] The owning VoxelHashMap; queried for min_pts_threshold.
b[in] Bucket holding the running sum and count.
func[in] Callable invoked with the per-voxel average point.
-
template<typename MapType>
static inline std::size_t point_count(const MapType &map, const AveragePointBucket<T> &b) noexcept¶ Return 1 if the bucket meets the minimum points threshold, 0 otherwise.
- Parameters:
map[in] The owning VoxelHashMap; queried for min_pts_threshold.
b[in] The bucket to query.
- Returns:
1 if count >= min_pts_threshold, 0 otherwise.
-
std::size_t count¶