[−][src]Struct mutiny::animation::path_follower::Path
Methods from Deref<Target = Polyline>
pub fn area(&self) -> T[src]
pub fn area(&self) -> Treturns the area of the polygon, only works if the polyline represents a polygon
pub fn centroid(&self) -> Point<T, U2>[src]
pub fn centroid(&self) -> Point<T, U2>centroid of the polyline, should work for any collection of points although it will only make sense if it's a polygon
pub fn close(&mut self)[src]
pub fn close(&mut self)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
pub fn is_closed(&self) -> bool[src]
pub fn is_closed(&self) -> boolreturns true if the polyline is closed
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizereturns total number of points
pub fn push(&mut self, p: Point<T, U2>)[src]
pub fn push(&mut self, p: Point<T, U2>)add a new point at the end of the polyline
pub fn smoothed(&self, window_size: usize, window_shape: T) -> Polyline<T>[src]
pub fn smoothed(&self, window_size: usize, window_shape: T) -> Polyline<T>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).
pub fn subdivide_linear(&self, resolution: usize) -> Polyline<T>[src]
pub fn subdivide_linear(&self, resolution: usize) -> Polyline<T>pub fn iter(&self) -> Iter<Point<T, U2>>[src]
pub fn iter(&self) -> Iter<Point<T, U2>>pub fn first(&self) -> Option<&Point<T, U2>>[src]
pub fn first(&self) -> Option<&Point<T, U2>>pub fn first_mut(&mut self) -> Option<&mut Point<T, U2>>[src]
pub fn first_mut(&mut self) -> Option<&mut Point<T, U2>>pub fn last(&self) -> Option<&Point<T, U2>>[src]
pub fn last(&self) -> Option<&Point<T, U2>>pub fn last_mut(&mut self) -> Option<&mut Point<T, U2>>[src]
pub fn last_mut(&mut self) -> Option<&mut Point<T, U2>>pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolpub fn lerped_point_at(&self, fidx: T) -> Option<Point<T, U2>>[src]
pub fn lerped_point_at(&self, fidx: T) -> Option<Point<T, U2>>Returns the point at an index + a normalized pct
pub fn segment_length(&self, idx: usize) -> Option<T>[src]
pub fn segment_length(&self, idx: usize) -> Option<T>Returns the length of the segment at the passed index or None if such segment doesn't exist
pub fn segment_length_squared(&self, idx: usize) -> Option<T>[src]
pub fn segment_length_squared(&self, idx: usize) -> Option<T>Returns the square length of the segment at the passed index or None if such segment doesn't exist
pub fn clear(&mut self)[src]
pub fn clear(&mut self)Removes all points from the polyline
pub fn wrap_index(&self, idx: isize) -> Option<usize>[src]
pub fn wrap_index(&self, idx: isize) -> Option<usize>Returns an index wrapped around a closed polygon or clamped on a polyline. Will return None if the polyline is empty
pub fn next_non_zero_segment(&self, idx: usize) -> Option<usize>[src]
pub fn next_non_zero_segment(&self, idx: usize) -> Option<usize>Finds the next segment which length is different than 0 starting from the passed index and wrapping around on closed polygons
pub fn prev_non_zero_segment(&self, idx: usize) -> Option<usize>[src]
pub fn prev_non_zero_segment(&self, idx: usize) -> Option<usize>Finds the previous segment which length is different than 0 starting from the passed index and wrapping around on closed polygons
pub fn tangent_at(
&self,
idx: usize
) -> Option<Matrix<T, U2, U1, <DefaultAllocator as Allocator<T, U2, U1>>::Buffer>>[src]
pub fn tangent_at(
&self,
idx: usize
) -> Option<Matrix<T, U2, U1, <DefaultAllocator as Allocator<T, U2, U1>>::Buffer>>Tangent at the point in the passed index if it exists
pub fn lerped_tangent_at(
&self,
fidx: T
) -> Option<Matrix<T, U2, U1, <DefaultAllocator as Allocator<T, U2, U1>>::Buffer>>[src]
pub fn lerped_tangent_at(
&self,
fidx: T
) -> Option<Matrix<T, U2, U1, <DefaultAllocator as Allocator<T, U2, U1>>::Buffer>>Tangent at the lerped point at the passed index + normalized pct
Trait Implementations
impl Clone for Path[src]
impl Clone for Pathfn clone(&self) -> Path[src]
fn clone(&self) -> Pathfn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Path[src]
impl Debug for Pathimpl Deref for Path[src]
impl Deref for Pathimpl DerefMut for Path[src]
impl DerefMut for Pathimpl Component for Path[src]
impl Component for Pathimpl<'a> DebugParameter for Path[src]
impl<'a> DebugParameter for Pathfn debug<S: Serializer>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>[src]
fn debug<S: Serializer>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>impl Serialize for Path[src]
impl Serialize for Pathfn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, impl<'de> Deserialize<'de> for Path[src]
impl<'de> Deserialize<'de> for Pathfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<C> ComponentSend for C where
C: Component + Send, [src]
impl<C> ComponentSend for C where
C: Component + Send, impl<C> ComponentThreadLocal for C where
C: Component, [src]
impl<C> ComponentThreadLocal for C where
C: Component, impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, impl<T> Serialize for T where
T: Serialize + ?Sized, [src]
impl<T> Serialize for T where
T: Serialize + ?Sized, fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>[src]
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>impl<T> Any for T where
T: Any, [src]
impl<T> Any for T where
T: Any, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T> SetParameter for T[src]
impl<T> SetParameter for Tfn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>, [src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>, Sets value as a parameter of self.
impl<T> Same for T[src]
impl<T> Same for Ttype Output = T
Should always be Self
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>, [src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>, fn to_subset(&self) -> Option<SS>[src]
fn to_subset(&self) -> Option<SS>fn is_in_subset(&self) -> bool[src]
fn is_in_subset(&self) -> boolunsafe fn to_subset_unchecked(&self) -> SS[src]
unsafe fn to_subset_unchecked(&self) -> SSfn from_subset(element: &SS) -> SP[src]
fn from_subset(element: &SS) -> SPimpl<V> IntoVec for V[src]
impl<V> IntoVec for Vimpl<V> IntoPnt for V[src]
impl<V> IntoPnt for Vimpl<B, P> IntoControlBuilder for P where
B: BuilderFromProperty<P>, [src]
impl<B, P> IntoControlBuilder for P where
B: BuilderFromProperty<P>, fn into_builder<S>(self, name: &str, events: S) -> B where
S: Stream<'static, Event>, [src]
fn into_builder<S>(self, name: &str, events: S) -> B where
S: Stream<'static, Event>, impl<T, U> IntoDuration for T where
U: FromDuration<T>, [src]
impl<T, U> IntoDuration for T where
U: FromDuration<T>, type Error = <U as FromDuration<T>>::Error
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>[src]
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>