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 Animation<PathSample> for FollowPath
impl Animation<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 duration(&self) -> Option<Duration>
fn duration(&self) -> Option<Duration>
Returns the finite duration, or
None for an unbounded signal.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.
Source§fn zip<OtherValue, Other>(self, other: Other) -> Zip<Self, Other>
fn zip<OtherValue, Other>(self, other: Other) -> Zip<Self, Other>
Samples in parallel; the duration is infinite if either input is infinite.
Source§fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
Delays a finite animation, holding its initial value before the offset.
Infinite signals shift their signed time instead. Negative offsets and
finite duration overflow panic at construction.
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 finite animation becomes
instantaneous. Invalid factors and unrepresentable durations panic.
Source§fn then<Next: Animation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
fn then<Next: Animation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
Runs two finite animations in sequence. The second owns their shared
boundary. Infinite sources or duration overflow panic at construction.
Source§fn reverse(self) -> Reverse<Self>where
Self: Sized,
fn reverse(self) -> Reverse<Self>where
Self: Sized,
Reverses a finite animation. Infinite sources panic at construction.
Source§fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
Plays a finite animation
count times. Intermediate boundaries restart;
the final boundary holds the target. Zero repeats hold the initial value.
Infinite sources or duration overflow panic at construction.Source§impl Clone for PathSample
impl Clone for PathSample
impl Copy for PathSample
Source§impl Debug for PathSample
impl Debug for PathSample
Source§impl PartialEq for PathSample
impl PartialEq for PathSample
impl StructuralPartialEq for PathSample
Auto Trait Implementations§
impl Forget for PathSample
impl Freeze 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