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 remains on CPU pending a new crossover; approximate-first uses
its separately measured thresholds.
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) -> VoxelGridDownsampleConfig
pub fn centroid(leaf_size: f32) -> VoxelGridDownsampleConfig
Creates a centroid downsampling config with uniform leaf size.
Sourcepub fn approximate(leaf_size: f32) -> VoxelGridDownsampleConfig
pub fn approximate(leaf_size: f32) -> VoxelGridDownsampleConfig
Creates an approximate first-point downsampling config.
Sourcepub const fn without_gpu_min_points(self) -> VoxelGridDownsampleConfig
pub const fn without_gpu_min_points(self) -> VoxelGridDownsampleConfig
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VoxelGridDownsampleConfig
impl Debug for VoxelGridDownsampleConfig
Source§impl PartialEq for VoxelGridDownsampleConfig
impl PartialEq for VoxelGridDownsampleConfig
Source§fn eq(&self, other: &VoxelGridDownsampleConfig) -> bool
fn eq(&self, other: &VoxelGridDownsampleConfig) -> bool
self and other values to be equal, and is used by ==.impl Copy for VoxelGridDownsampleConfig
impl StructuralPartialEq for VoxelGridDownsampleConfig
Auto Trait Implementations§
impl Freeze for VoxelGridDownsampleConfig
impl RefUnwindSafe for VoxelGridDownsampleConfig
impl Send for VoxelGridDownsampleConfig
impl Sync for VoxelGridDownsampleConfig
impl Unpin for VoxelGridDownsampleConfig
impl UnsafeUnpin for VoxelGridDownsampleConfig
impl UnwindSafe for VoxelGridDownsampleConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more