[][src]Struct mutiny::animation::path_follower::Path

pub struct Path(_);

Methods from Deref<Target = Polyline>

returns the area of the polygon, only works if the polyline represents a polygon

centroid of the polyline, should work for any collection of points although it will only make sense if it's a polygon

mark this polyline as being a closed shape, although not necesarily a polygon. Any rendering or calculation will take into account that the first and last points are joined

returns true if the polyline is closed

returns total number of points

add a new point at the end of the polyline

Returns a smoothed version of the polyline.

window_size is the size of the smoothing window. So if window_size is 2, then 2 points from the left, 1 in the center, and 2 on the right (5 total) will be used for smoothing each point.

window_shape describes whether to use a triangular window (0) or box window (1) or something in between (for example, .5).

Returns the point at an index + a normalized pct

Returns the length of the segment at the passed index or None if such segment doesn't exist

Returns the square length of the segment at the passed index or None if such segment doesn't exist

Removes all points from the polyline

Returns an index wrapped around a closed polygon or clamped on a polyline. Will return None if the polyline is empty

Finds the next segment which length is different than 0 starting from the passed index and wrapping around on closed polygons

Finds the previous segment which length is different than 0 starting from the passed index and wrapping around on closed polygons

Tangent at the point in the passed index if it exists

Tangent at the lerped point at the passed index + normalized pct

Trait Implementations

impl Clone for Path
[src]

Performs copy-assignment from source. Read more

impl Debug for Path
[src]

impl Deref for Path
[src]

The resulting type after dereferencing.

impl DerefMut for Path
[src]

impl Component for Path
[src]

impl<'a> DebugParameter for Path
[src]

impl Serialize for Path
[src]

impl<'de> Deserialize<'de> for Path
[src]

Auto Trait Implementations

impl Send for Path

impl Sync for Path

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<C> ComponentSend for C where
    C: Component + Send
[src]

impl<C> ComponentThreadLocal for C where
    C: Component
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> SetParameter for T
[src]

Sets value as a parameter of self.

impl<T> Same for T
[src]

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<V> IntoVec for V
[src]

impl<V> IntoPnt for V
[src]

impl<B, P> IntoControlBuilder for P where
    B: BuilderFromProperty<P>, 
[src]

impl<T, U> IntoDuration for T where
    U: FromDuration<T>, 
[src]