pub struct PotentialConfig {
pub attractive_gain: f64,
pub repulsive_gain: f64,
pub influence_radius: f64,
pub step_size: f64,
pub max_iterations: usize,
pub seed: Option<u64>,
pub goal_threshold: f64,
pub use_fast_path: bool,
pub min_force_threshold: f64,
}Expand description
Configuration for potential field pathfinding
Fields§
§attractive_gain: f64Gain parameter for attractive forces (goal)
repulsive_gain: f64Gain parameter for repulsive forces (obstacles)
influence_radius: f64Influence radius for obstacles
step_size: f64Maximum step size for path following
max_iterations: usizeMaximum number of iterations
seed: Option<u64>Random seed for any stochastic components
goal_threshold: f64Goal threshold - how close to consider goal reached
use_fast_path: boolFast path option - try direct path first
min_force_threshold: f64Minimum force threshold for detecting local minima
Implementations§
Source§impl PotentialConfig
impl PotentialConfig
Sourcepub fn with_attractive_gain(self, gain: f64) -> Self
pub fn with_attractive_gain(self, gain: f64) -> Self
Set the attractive gain (force towards goal)
Sourcepub fn with_repulsive_gain(self, gain: f64) -> Self
pub fn with_repulsive_gain(self, gain: f64) -> Self
Set the repulsive gain (force away from obstacles)
Sourcepub fn with_influence_radius(self, radius: f64) -> Self
pub fn with_influence_radius(self, radius: f64) -> Self
Set the influence radius of obstacles
Sourcepub fn with_step_size(self, stepsize: f64) -> Self
pub fn with_step_size(self, stepsize: f64) -> Self
Set the step size for path following
Sourcepub fn with_max_iterations(self, maxiterations: usize) -> Self
pub fn with_max_iterations(self, maxiterations: usize) -> Self
Set the maximum number of iterations
Sourcepub fn with_min_force_threshold(self, threshold: f64) -> Self
pub fn with_min_force_threshold(self, threshold: f64) -> Self
Set the minimum force threshold for detecting local minima
Sourcepub fn with_goal_threshold(self, threshold: f64) -> Self
pub fn with_goal_threshold(self, threshold: f64) -> Self
Set goal threshold distance
Sourcepub fn with_use_fast_path(self, use_fastpath: bool) -> Self
pub fn with_use_fast_path(self, use_fastpath: bool) -> Self
Enable/disable fast path option
Trait Implementations§
Source§impl Clone for PotentialConfig
impl Clone for PotentialConfig
Source§fn clone(&self) -> PotentialConfig
fn clone(&self) -> PotentialConfig
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 PotentialConfig
impl Debug for PotentialConfig
Auto Trait Implementations§
impl Freeze for PotentialConfig
impl RefUnwindSafe for PotentialConfig
impl Send for PotentialConfig
impl Sync for PotentialConfig
impl Unpin for PotentialConfig
impl UnwindSafe for PotentialConfig
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,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.