Struct ncollide2d::procedural::Polyline
source · pub struct Polyline<N: Real> { /* private fields */ }
Expand description
Geometric description of a polyline.
Implementations§
source§impl<N: Real> Polyline<N>
impl<N: Real> Polyline<N>
sourcepub fn unwrap(self) -> (Vec<Point<N>>, Option<Vec<Vector<N>>>)
pub fn unwrap(self) -> (Vec<Point<N>>, Option<Vec<Vector<N>>>)
Moves the polyline data out of it.
sourcepub fn coords_mut(&mut self) -> &mut [Point<N>]
pub fn coords_mut(&mut self) -> &mut [Point<N>]
The mutable coordinates of this polyline vertices.
sourcepub fn normals_mut(&mut self) -> Option<&mut [Vector<N>]>
pub fn normals_mut(&mut self) -> Option<&mut [Vector<N>]>
The mutable normals of this polyline vertices.
sourcepub fn translate_by<T: Translation<Point<N>>>(&mut self, t: &T)
pub fn translate_by<T: Translation<Point<N>>>(&mut self, t: &T)
Translates each vertex of this polyline.
sourcepub fn rotate_by<R: Rotation<Point<N>>>(&mut self, r: &R)
pub fn rotate_by<R: Rotation<Point<N>>>(&mut self, r: &R)
Rotates each vertex and normal of this polyline.
sourcepub fn transform_by(&mut self, t: &Isometry<N>)
pub fn transform_by(&mut self, t: &Isometry<N>)
Transforms each vertex and rotates each normal of this polyline.
sourcepub fn scale_by_scalar(&mut self, s: &N)
pub fn scale_by_scalar(&mut self, s: &N)
Scales each vertex of this polyline.
Trait Implementations§
Auto Trait Implementations§
impl<N> RefUnwindSafe for Polyline<N>where
N: RefUnwindSafe,
impl<N> Send for Polyline<N>
impl<N> Sync for Polyline<N>
impl<N> Unpin for Polyline<N>where
N: Unpin,
impl<N> UnwindSafe for Polyline<N>where
N: UnwindSafe,
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.