pub struct PathSample {
pub position: Point,
pub tangent: Vector2,
pub angle: f64,
}Expand description
One arc-length path sample in local geometry coordinates.
Fields§
§position: PointPosition along the path.
tangent: Vector2Normalized local tangent, or zero for degenerate geometry.
angle: f64Tangent angle in radians, zero for degenerate geometry.
Trait Implementations§
Source§impl Clone for PathSample
impl Clone for PathSample
impl Copy for PathSample
Source§impl Debug for PathSample
impl Debug for PathSample
Source§impl FiniteAnimation<PathSample> for FollowPath
impl FiniteAnimation<PathSample> for FollowPath
Source§fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
Delays the animation, holding its initial value before the offset. Read more
Source§fn try_delay(self, offset: Duration) -> Result<Delay<Self>, ValidationError>where
Self: Sized,
fn try_delay(self, offset: Duration) -> Result<Delay<Self>, ValidationError>where
Self: Sized,
Delays like
Self::delay, reporting duration overflow.Source§fn speed(self, factor: f64) -> Speed<Self>where
Self: Sized,
fn speed(self, factor: f64) -> Speed<Self>where
Self: Sized,
Changes playback speed by a finite, strictly positive factor.
Durations round to the nearest tick; a collapsed animation becomes
instantaneous. Read more
Source§fn try_speed(self, factor: f64) -> Result<Speed<Self>, ValidationError>where
Self: Sized,
fn try_speed(self, factor: f64) -> Result<Speed<Self>, ValidationError>where
Self: Sized,
Changes speed like
Self::speed, reporting an invalid factor or
unrepresentable duration.Source§fn then<Next: FiniteAnimation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
fn then<Next: FiniteAnimation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
Runs two animations in sequence. The second owns their shared
boundary. Duration overflow panics at construction.
Source§fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
Plays the animation
count times. Intermediate boundaries restart;
the final boundary holds the target. Zero repeats hold the initial value.
Duration overflow panics at construction.Source§fn ping_pong(self) -> PingPong<Self>where
Self: Sized,
fn ping_pong(self) -> PingPong<Self>where
Self: Sized,
Plays the animation forward then backward, ending at its initial
value. Duration overflow panics at construction.
Source§fn boxed_finite(self) -> Arc<dyn FiniteAnimation<Value>> ⓘwhere
Self: Sized + 'static,
fn boxed_finite(self) -> Arc<dyn FiniteAnimation<Value>> ⓘwhere
Self: Sized + 'static,
Shares a type-erased animation, retaining sampling, duration and combinators.
Source§impl PartialEq for PathSample
impl PartialEq for PathSample
Source§impl Signal<PathSample> for FollowPath
impl Signal<PathSample> for FollowPath
Source§fn sample(&self, time: Time) -> PathSample
fn sample(&self, time: Time) -> PathSample
Samples without advancing a clock or changing playback state.
Source§fn map<Output, Function>(self, function: Function) -> Map<Self, Function, Value>
fn map<Output, Function>(self, function: Function) -> Map<Self, Function, Value>
Transforms values without changing timing.
impl StructuralPartialEq for PathSample
Auto Trait Implementations§
impl Forget for PathSample
impl Freeze for PathSample
impl Move for PathSample
impl RefUnwindSafe for PathSample
impl Send for PathSample
impl Sync for PathSample
impl Unpin for PathSample
impl UnsafeUnpin for PathSample
impl UnwindSafe for PathSample
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