pub struct Reverse<P> { /* private fields */ }Expand description
A path traversed in the opposite direction.
Sampling at arc-length s returns the position the inner path would have
at length - s. Tangent vectors are negated; signed curvature is negated.
Implementations§
Trait Implementations§
Source§impl<P: Path> Path for Reverse<P>
impl<P: Path> Path for Reverse<P>
Source§type Scalar = <P as Path>::Scalar
type Scalar = <P as Path>::Scalar
The scalar type for arc-length, parameter, and distance computations.
Source§type Error = <P as Path>::Error
type Error = <P as Path>::Error
The error type for fallible operations. Must be convertible from
PathError<Self::Scalar>.Source§fn sample_at(&self, s: Self::Scalar) -> Result<Self::Point, Self::Error>
fn sample_at(&self, s: Self::Scalar) -> Result<Self::Point, Self::Error>
Sample the path at arc-length
s ∈ [0, length]. Read moreSource§fn start(&self) -> Result<Self::Point, Self::Error>
fn start(&self) -> Result<Self::Point, Self::Error>
The start point of the path, equivalent to
sample_at(0).Source§fn end(&self) -> Result<Self::Point, Self::Error>
fn end(&self) -> Result<Self::Point, Self::Error>
The end point of the path, equivalent to
sample_at(length).Source§fn domain(&self) -> RangeInclusive<Self::Scalar>
fn domain(&self) -> RangeInclusive<Self::Scalar>
The valid domain for arc-length sampling:
[0, length].Auto Trait Implementations§
impl<P> Freeze for Reverse<P>where
P: Freeze,
impl<P> RefUnwindSafe for Reverse<P>where
P: RefUnwindSafe,
impl<P> Send for Reverse<P>where
P: Send,
impl<P> Sync for Reverse<P>where
P: Sync,
impl<P> Unpin for Reverse<P>where
P: Unpin,
impl<P> UnsafeUnpin for Reverse<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Reverse<P>where
P: UnwindSafe,
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