pub struct VoxelGridDownsampleConfig {
pub leaf_size: f32,
pub origin: Option<Vec3<f32>>,
pub mode: VoxelAggregationMode,
pub attribute_policy: AttributeAggregation,
pub gpu_min_points: Option<usize>,
}Expand description
Configuration for voxel-grid downsampling.
Fields§
§leaf_size: f32Voxel edge length in meters.
origin: Option<Vec3<f32>>Optional grid origin. Defaults to the cloud minimum corner.
mode: VoxelAggregationModePosition aggregation mode.
attribute_policy: AttributeAggregationAggregation policy for other fields.
gpu_min_points: Option<usize>Minimum input point count before GPU execution is considered worthwhile.
None always uses GPU when requested. Defaults follow local bench results:
centroid ~500k, approximate-first ~2M (1M end-to-end still CPU-favored).
Approximate-first Auto also consults the input schema: clouds with
APPROXIMATE_HEAVY_F32_ATTRIBUTE_CHANNELS or more non-position F32 fields
(e.g. point_xyzinormal) use DEFAULT_GPU_MIN_POINTS_APPROXIMATE_HEAVY.
Implementations§
Source§impl VoxelGridDownsampleConfig
impl VoxelGridDownsampleConfig
Sourcepub fn centroid(leaf_size: f32) -> Self
pub fn centroid(leaf_size: f32) -> Self
Creates a centroid downsampling config with uniform leaf size.
Sourcepub fn approximate(leaf_size: f32) -> Self
pub fn approximate(leaf_size: f32) -> Self
Creates an approximate first-point downsampling config.
Sourcepub const fn without_gpu_min_points(self) -> Self
pub const fn without_gpu_min_points(self) -> Self
Disables the GPU point-count heuristic so GPU is always used when requested.
Sourcepub fn effective_gpu_min_points(&self, schema: &PointSchema) -> Option<usize>
pub fn effective_gpu_min_points(&self, schema: &PointSchema) -> Option<usize>
Returns the point-count threshold used by ExecutionPolicy::Auto.
Approximate-first mode raises the effective threshold to
DEFAULT_GPU_MIN_POINTS_APPROXIMATE_HEAVY when the schema carries many F32
attributes (Epic 38 regression, Epic 46 crossover at 1M+).
Trait Implementations§
Source§impl Clone for VoxelGridDownsampleConfig
impl Clone for VoxelGridDownsampleConfig
Source§fn clone(&self) -> VoxelGridDownsampleConfig
fn clone(&self) -> VoxelGridDownsampleConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more