pub enum FrictionModel {
Isotropic,
ToblerHiking,
SymmetricSlope {
slope_weight: f64,
},
AsymmetricSlope {
uphill_weight: f64,
downhill_weight: f64,
},
}Expand description
Anisotropic friction model for direction-dependent costs
Variants§
Isotropic
Isotropic: same cost in all directions (default)
ToblerHiking
Tobler’s hiking function: speed = 6 * exp(-3.5 * |tan(slope) + 0.05|) Cost is inversely proportional to speed.
SymmetricSlope
Symmetric slope friction: cost increases with absolute slope gradient cost_factor = 1 + |dz| * slope_weight / distance
AsymmetricSlope
Asymmetric friction: uphill is harder than downhill cost_factor_uphill = 1 + dz * uphill_weight / distance (if dz > 0) cost_factor_downhill = 1 + |dz| * downhill_weight / distance (if dz < 0)
Trait Implementations§
Source§impl Clone for FrictionModel
impl Clone for FrictionModel
Source§fn clone(&self) -> FrictionModel
fn clone(&self) -> FrictionModel
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 FrictionModel
impl Debug for FrictionModel
Source§impl Default for FrictionModel
impl Default for FrictionModel
Source§fn default() -> FrictionModel
fn default() -> FrictionModel
Returns the “default value” for a type. Read more
Source§impl PartialEq for FrictionModel
impl PartialEq for FrictionModel
impl Copy for FrictionModel
impl StructuralPartialEq for FrictionModel
Auto Trait Implementations§
impl Freeze for FrictionModel
impl RefUnwindSafe for FrictionModel
impl Send for FrictionModel
impl Sync for FrictionModel
impl Unpin for FrictionModel
impl UnsafeUnpin for FrictionModel
impl UnwindSafe for FrictionModel
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