ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::geometry::VoxelAssignment Struct Reference

Per-input-point assignment to an output voxel bucket. More...

#include <downsample.hpp>

Collaboration diagram for reusex::geometry::VoxelAssignment:

Public Attributes

float leaf_size = 0.0f
 Voxel edge length used to bucket points.
uint32_t bucket_count = 0
 Number of unique occupied voxels (== output cloud size).
double origin_x = 0.0
 Minimum corner of the input cloud's bounding box (over finite points).
double origin_y = 0.0
double origin_z = 0.0
std::vector< uint32_t > point_to_bucket
 For each input point: the bucket id it falls into, or kSkippedPoint if the point was non-finite (and therefore dropped).

Static Public Attributes

static constexpr uint32_t kSkippedPoint
 Sentinel marking input points that were skipped during assignment.

Detailed Description

Per-input-point assignment to an output voxel bucket.

Built once from a cloud of positions, then reused to downsample any parallel cloud (e.g. normals) with the same row count so output rows stay aligned position-for-position with the primary downsampled cloud.

All voxel math is done in double precision relative to the cloud's bounding-box minimum, so georeferenced coordinates (e.g. UTM eastings around 10^6 m) bucket correctly. Voxel indices are packed into a uint64 hash key, sidestepping the int32 overflow that pcl::VoxelGrid hits on multi-billion-point inputs when (n_x * n_y * n_z) exceeds INT_MAX.

Definition at line 25 of file downsample.hpp.

Member Data Documentation

◆ bucket_count

uint32_t reusex::geometry::VoxelAssignment::bucket_count = 0

Number of unique occupied voxels (== output cloud size).

Definition at line 30 of file downsample.hpp.

◆ kSkippedPoint

uint32_t reusex::geometry::VoxelAssignment::kSkippedPoint
staticconstexpr
Initial value:
=
static_cast<uint32_t>(-1)

Sentinel marking input points that were skipped during assignment.

Definition at line 43 of file downsample.hpp.

◆ leaf_size

float reusex::geometry::VoxelAssignment::leaf_size = 0.0f

Voxel edge length used to bucket points.

Definition at line 27 of file downsample.hpp.

◆ origin_x

double reusex::geometry::VoxelAssignment::origin_x = 0.0

Minimum corner of the input cloud's bounding box (over finite points).

Voxel coordinates are computed relative to this origin.

Definition at line 34 of file downsample.hpp.

◆ origin_y

double reusex::geometry::VoxelAssignment::origin_y = 0.0

Definition at line 35 of file downsample.hpp.

◆ origin_z

double reusex::geometry::VoxelAssignment::origin_z = 0.0

Definition at line 36 of file downsample.hpp.

◆ point_to_bucket

std::vector<uint32_t> reusex::geometry::VoxelAssignment::point_to_bucket

For each input point: the bucket id it falls into, or kSkippedPoint if the point was non-finite (and therefore dropped).

Definition at line 40 of file downsample.hpp.


The documentation for this struct was generated from the following file: