pub struct PathConfigBuilder { /* private fields */ }Expand description
Builder for PathConfig with fluent API and validation
§Examples
use tp_lib_core::PathConfig;
let config = PathConfig::builder()
.distance_scale(15.0)
.heading_scale(3.0)
.cutoff_distance(500.0)
.heading_cutoff(10.0)
.probability_threshold(0.3)
.resampling_distance(Some(10.0))
.max_candidates(5)
.build()?;Implementations§
Source§impl PathConfigBuilder
impl PathConfigBuilder
Sourcepub fn distance_scale(self, value: f64) -> Self
pub fn distance_scale(self, value: f64) -> Self
Set distance scale parameter
Sourcepub fn heading_scale(self, value: f64) -> Self
pub fn heading_scale(self, value: f64) -> Self
Set heading scale parameter
Sourcepub fn cutoff_distance(self, value: f64) -> Self
pub fn cutoff_distance(self, value: f64) -> Self
Set cutoff distance
Sourcepub fn heading_cutoff(self, value: f64) -> Self
pub fn heading_cutoff(self, value: f64) -> Self
Set heading cutoff
Sourcepub fn probability_threshold(self, value: f64) -> Self
pub fn probability_threshold(self, value: f64) -> Self
Set probability threshold
Sourcepub fn resampling_distance(self, value: Option<f64>) -> Self
pub fn resampling_distance(self, value: Option<f64>) -> Self
Set resampling distance
Sourcepub fn max_candidates(self, value: usize) -> Self
pub fn max_candidates(self, value: usize) -> Self
Set maximum candidates
Sourcepub fn path_only(self, value: bool) -> Self
pub fn path_only(self, value: bool) -> Self
Set path_only mode (calculate path without projecting positions)
Sourcepub fn debug_mode(self, value: bool) -> Self
pub fn debug_mode(self, value: bool) -> Self
Set debug mode (collect debug information during path calculation)
Sourcepub fn edge_zone_distance(self, value: f64) -> Self
pub fn edge_zone_distance(self, value: f64) -> Self
Set edge-zone distance threshold (meters)
Sourcepub fn turn_scale(self, value: f64) -> Self
pub fn turn_scale(self, value: f64) -> Self
Set turn-angle scale parameter (degrees)
Sourcepub fn build(self) -> Result<PathConfig, ProjectionError>
pub fn build(self) -> Result<PathConfig, ProjectionError>
Build and validate the PathConfig
Trait Implementations§
Source§impl Clone for PathConfigBuilder
impl Clone for PathConfigBuilder
Source§fn clone(&self) -> PathConfigBuilder
fn clone(&self) -> PathConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathConfigBuilder
impl Debug for PathConfigBuilder
Auto Trait Implementations§
impl Freeze for PathConfigBuilder
impl RefUnwindSafe for PathConfigBuilder
impl Send for PathConfigBuilder
impl Sync for PathConfigBuilder
impl Unpin for PathConfigBuilder
impl UnsafeUnpin for PathConfigBuilder
impl UnwindSafe for PathConfigBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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