pub trait WithAxisProcessingPipelineExt: Sized {
// Required methods
fn reset_processing_pipeline(self) -> Self;
fn replace_processing_pipeline(
self,
processors: impl IntoIterator<Item = AxisProcessor>,
) -> Self;
fn with_processor(self, processor: impl Into<AxisProcessor>) -> Self;
// Provided methods
fn digital(self) -> Self { ... }
fn inverted(self) -> Self { ... }
fn sensitivity(self, sensitivity: f32) -> Self { ... }
fn with_bounds(self, min: f32, max: f32) -> Self { ... }
fn with_bounds_symmetric(self, threshold: f32) -> Self { ... }
fn with_deadzone(self, negative_max: f32, positive_min: f32) -> Self { ... }
fn with_deadzone_symmetric(self, threshold: f32) -> Self { ... }
fn with_deadzone_unscaled(
self,
negative_max: f32,
positive_min: f32,
) -> Self { ... }
fn with_deadzone_symmetric_unscaled(self, threshold: f32) -> Self { ... }
}Expand description
Provides methods for configuring and manipulating the processing pipeline for single-axis input.
Required Methods§
sourcefn reset_processing_pipeline(self) -> Self
fn reset_processing_pipeline(self) -> Self
Resets the processing pipeline, removing any currently applied processors.
sourcefn replace_processing_pipeline(
self,
processors: impl IntoIterator<Item = AxisProcessor>,
) -> Self
fn replace_processing_pipeline( self, processors: impl IntoIterator<Item = AxisProcessor>, ) -> Self
Replaces the current processing pipeline with the given AxisProcessors.
sourcefn with_processor(self, processor: impl Into<AxisProcessor>) -> Self
fn with_processor(self, processor: impl Into<AxisProcessor>) -> Self
Appends the given AxisProcessor as the next processing step.
Provided Methods§
sourcefn digital(self) -> Self
fn digital(self) -> Self
Appends an AxisProcessor::Digital processor as the next processing step,
similar to f32::signum but returning 0.0 for zero values.
sourcefn inverted(self) -> Self
fn inverted(self) -> Self
Appends an AxisProcessor::Inverted processor as the next processing step,
flipping the sign of values on the axis.
sourcefn sensitivity(self, sensitivity: f32) -> Self
fn sensitivity(self, sensitivity: f32) -> Self
Appends an AxisProcessor::Sensitivity processor as the next processing step,
multiplying values on the axis with the given sensitivity factor.
sourcefn with_bounds(self, min: f32, max: f32) -> Self
fn with_bounds(self, min: f32, max: f32) -> Self
Appends an AxisBounds processor as the next processing step,
restricting values within the range [min, max] on the axis.
sourcefn with_bounds_symmetric(self, threshold: f32) -> Self
fn with_bounds_symmetric(self, threshold: f32) -> Self
Appends an AxisBounds processor as the next processing step,
restricting values to a threshold magnitude.
sourcefn with_deadzone(self, negative_max: f32, positive_min: f32) -> Self
fn with_deadzone(self, negative_max: f32, positive_min: f32) -> Self
Appends an AxisDeadZone processor as the next processing step,
excluding values within the dead zone range [negative_max, positive_min] on the axis,
treating them as zeros, then normalizing non-excluded input values into the “live zone”,
the remaining range within the AxisBounds::magnitude(1.0)
after dead zone exclusion.
sourcefn with_deadzone_symmetric(self, threshold: f32) -> Self
fn with_deadzone_symmetric(self, threshold: f32) -> Self
Appends an AxisDeadZone processor as the next processing step,
excluding values within the dead zone range [-threshold, threshold] on the axis,
treating them as zeros, then normalizing non-excluded input values into the “live zone”,
the remaining range within the AxisBounds::magnitude(1.0)
after dead zone exclusion.
sourcefn with_deadzone_unscaled(self, negative_max: f32, positive_min: f32) -> Self
fn with_deadzone_unscaled(self, negative_max: f32, positive_min: f32) -> Self
Appends an AxisExclusion processor as the next processing step,
ignoring values within the dead zone range [negative_max, positive_min] on the axis,
treating them as zeros.
sourcefn with_deadzone_symmetric_unscaled(self, threshold: f32) -> Self
fn with_deadzone_symmetric_unscaled(self, threshold: f32) -> Self
Appends an AxisExclusion processor as the next processing step,
ignoring values within the dead zone range [-threshold, threshold] on the axis,
treating them as zeros.