pub struct AnyAnglePath { /* private fields */ }Expand description
Non-empty polyline in grid coordinates with Euclidean traversal cost.
Implementations§
Source§impl AnyAnglePath
impl AnyAnglePath
Sourcepub fn from_points(
points: Vec<Point2>,
) -> Result<AnyAnglePath, AnyAnglePathBuildError>
pub fn from_points( points: Vec<Point2>, ) -> Result<AnyAnglePath, AnyAnglePathBuildError>
Builds a path and sets cost to the sum of consecutive Euclidean segments.
§Errors
Returns AnyAnglePathBuildError::Empty when points is empty.
Sourcepub fn from_points_with_cost(
points: Vec<Point2>,
cost: f64,
) -> Result<AnyAnglePath, AnyAnglePathBuildError>
pub fn from_points_with_cost( points: Vec<Point2>, cost: f64, ) -> Result<AnyAnglePath, AnyAnglePathBuildError>
Builds a path with an explicit cost (callers must ensure consistency with geometry).
§Errors
Returns AnyAnglePathBuildError::Empty when points is empty.
Sourcepub fn points(&self) -> &[Point2]
pub fn points(&self) -> &[Point2]
Ordered continuous vertices from start through goal (inclusive).
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Always false for successfully constructed paths (from_points* reject empty).
Trait Implementations§
Source§impl Clone for AnyAnglePath
impl Clone for AnyAnglePath
Source§fn clone(&self) -> AnyAnglePath
fn clone(&self) -> AnyAnglePath
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AnyAnglePath
impl Debug for AnyAnglePath
Source§impl PartialEq for AnyAnglePath
impl PartialEq for AnyAnglePath
Source§impl SearchPathCost for AnyAnglePath
impl SearchPathCost for AnyAnglePath
Source§fn path_cost(&self) -> <AnyAnglePath as SearchPathCost>::Cost
fn path_cost(&self) -> <AnyAnglePath as SearchPathCost>::Cost
Returns the path’s domain-specific traversal cost.
impl StructuralPartialEq for AnyAnglePath
Auto Trait Implementations§
impl Freeze for AnyAnglePath
impl RefUnwindSafe for AnyAnglePath
impl Send for AnyAnglePath
impl Sync for AnyAnglePath
impl Unpin for AnyAnglePath
impl UnsafeUnpin for AnyAnglePath
impl UnwindSafe for AnyAnglePath
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more