[−][src]Struct ncollide2d::shape::Polyline
A polygonal line.
Methods
impl<N: RealField> Polyline<N>
[src]
pub fn new(
points: Vec<Point<N>>,
indices: Option<Vec<Point2<usize>>>
) -> Polyline<N>
[src]
points: Vec<Point<N>>,
indices: Option<Vec<Point2<usize>>>
) -> Polyline<N>
Builds a new polyline.
pub fn quad(nx: usize, ny: usize) -> Self
[src]
A polyline shaped like a quad.
pub fn aabb(&self) -> &AABB<N>
[src]
The polyline's AABB.
pub fn points(&self) -> &[Point<N>]
[src]
The points of this polyline.
pub fn edges(&self) -> &[PolylineEdge<N>]
[src]
The edges of this polyline.
pub fn oriented(&self) -> bool
[src]
Whether this polyline is considered is oriented or not.
By default a polyline is not oriented.
pub fn set_oriented(&mut self, oriented: bool)
[src]
Whether this polyline is considered as oriented or not.
This is determined at the initialization of the polyline.
pub fn edge_containing_feature(&self, id: FeatureId) -> usize
[src]
Face containing feature.
pub fn edge_segment(&self, i: usize) -> Segment<N>
[src]
The segment of the i
-th edge on this polyline.
pub fn segment_at(&self, i: usize) -> Segment<N>
[src]
Gets the i-th polyline element.
pub fn bvt(&self) -> &BVT<usize, AABB<N>>
[src]
The optimization structure used by this polyline.
pub fn vertex_tangent_cone_contains_dir(
&self,
i: usize,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
[src]
&self,
i: usize,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
Tests that the given dir
is on the tangent cone of the i
th vertex
of this polyline.
pub fn transform_by(&mut self, transform: &Isometry<N>)
[src]
Applies a transformation to this polyline.
pub fn scale_by(&mut self, scale: &Vector<N>)
[src]
Applies a non-uniform scale to this polyline.
pub fn is_backface(&self, feature: FeatureId) -> bool
[src]
Returns true
if the given feature is a FeatureId::Face and
identifies a backface of this polyline.
pub fn vertex_tangent_cone_polar_contains_dir(
&self,
i: usize,
dir: &Unit<Vector<N>>,
sin_ang_tol: N
) -> bool
[src]
&self,
i: usize,
dir: &Unit<Vector<N>>,
sin_ang_tol: N
) -> bool
Tests that the given dir
is on the polar of the tangent cone of the i
th vertex
of this polyline.
pub fn edge_tangent_cone_contains_dir(
&self,
i: usize,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
[src]
&self,
i: usize,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
Tests that the given dir
is on the tangent cone of the i
th edge
of this polyline.
pub fn edge_tangent_cone_polar_contains_dir(
&self,
i: usize,
dir: &Unit<Vector<N>>,
cos_ang_tol: N
) -> bool
[src]
&self,
i: usize,
dir: &Unit<Vector<N>>,
cos_ang_tol: N
) -> bool
Tests whether the polar of the tangent cone of the i-th edge of this polyline
contains the direction dir
considering the cosinus of an angular tolerance cos_ang_tol
.
pub fn tangent_cone_polar_contains_dir(
&self,
_feature: FeatureId,
_dir: &Unit<Vector<N>>,
_sin_ang_tol: N,
_cos_ang_tol: N
) -> bool
[src]
&self,
_feature: FeatureId,
_dir: &Unit<Vector<N>>,
_sin_ang_tol: N,
_cos_ang_tol: N
) -> bool
(Not yet implemented) Tests whether the polar of the tangent cone of the specified feature of
this polyline contains the direction dir
considering the sinus and cosinus of an angular tolerance.
Trait Implementations
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Polyline<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, BoundingSphere<N>> for Polyline<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn local_bounding_volume(&self) -> BoundingSphere<N>
[src]
impl<N: RealField> PointQuery<N> for Polyline<N>
[src]
fn project_point(
&self,
m: &Isometry<N>,
point: &Point<N>,
solid: bool
) -> PointProjection<N>
[src]
&self,
m: &Isometry<N>,
point: &Point<N>,
solid: bool
) -> PointProjection<N>
fn project_point_with_feature(
&self,
_: &Isometry<N>,
_: &Point<N>
) -> (PointProjection<N>, FeatureId)
[src]
&self,
_: &Isometry<N>,
_: &Point<N>
) -> (PointProjection<N>, FeatureId)
fn contains_point(&self, m: &Isometry<N>, point: &Point<N>) -> bool
[src]
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N
[src]
Computes the minimal distance between a point and self
transformed by m
.
impl<N: RealField> PointQueryWithLocation<N> for Polyline<N>
[src]
type Location = (usize, SegmentPointLocation<N>)
Additional shape-specific projection information Read more
fn project_point_with_location(
&self,
m: &Isometry<N>,
point: &Point<N>,
_: bool
) -> (PointProjection<N>, Self::Location)
[src]
&self,
m: &Isometry<N>,
point: &Point<N>,
_: bool
) -> (PointProjection<N>, Self::Location)
impl<N: RealField> RayCast<N> for Polyline<N>
[src]
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, _: bool) -> Option<N>
[src]
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
_: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
_: bool
) -> Option<RayIntersection<N>>
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
[src]
Tests whether a ray intersects this transformed shape.
impl<N: RealField> CompositeShape<N> for Polyline<N>
[src]
fn nparts(&self) -> usize
[src]
fn map_part_at(
&self,
i: usize,
m: &Isometry<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>)
)
[src]
&self,
i: usize,
m: &Isometry<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>)
)
fn map_part_and_preprocessor_at(
&self,
i: usize,
m: &Isometry<N>,
prediction: &ContactPrediction<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>, &dyn ContactPreprocessor<N>)
)
[src]
&self,
i: usize,
m: &Isometry<N>,
prediction: &ContactPrediction<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>, &dyn ContactPreprocessor<N>)
)
fn aabb_at(&self, i: usize) -> AABB<N>
[src]
fn bvh(&self) -> BVHImpl<N, usize, AABB<N>>
[src]
impl<N: RealField> DeformableShape<N> for Polyline<N>
[src]
fn deformations_type(&self) -> DeformationsType
[src]
fn set_deformations(&mut self, coords: &[N])
[src]
Updates all the degrees of freedom of this shape.
fn update_local_approximation(
&self,
coords: &[N],
approx: &mut LocalShapeApproximation<N>
)
[src]
&self,
coords: &[N],
approx: &mut LocalShapeApproximation<N>
)
impl<N: RealField> Shape<N> for Polyline<N>
[src]
fn aabb(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn local_aabb(&self) -> AABB<N>
[src]
fn bounding_sphere(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn as_ray_cast(&self) -> Option<&dyn RayCast<N>>
[src]
fn as_point_query(&self) -> Option<&dyn PointQuery<N>>
[src]
fn as_composite_shape(&self) -> Option<&dyn CompositeShape<N>>
[src]
fn is_composite_shape(&self) -> bool
[src]
fn as_deformable_shape(&self) -> Option<&dyn DeformableShape<N>>
[src]
fn as_deformable_shape_mut(&mut self) -> Option<&mut dyn DeformableShape<N>>
[src]
fn is_deformable_shape(&self) -> bool
[src]
fn tangent_cone_contains_dir(
&self,
_feature: FeatureId,
_m: &Isometry<N>,
_deformations: Option<&[N]>,
_dir: &Unit<Vector<N>>
) -> bool
[src]
&self,
_feature: FeatureId,
_m: &Isometry<N>,
_deformations: Option<&[N]>,
_dir: &Unit<Vector<N>>
) -> bool
fn subshape_containing_feature(&self, id: FeatureId) -> usize
[src]
fn local_bounding_sphere(&self) -> BoundingSphere<N>
[src]
The bounding sphere of self
.
fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>
[src]
The convex polyhedron representation of self
if applicable.
fn as_support_map(&self) -> Option<&dyn SupportMap<N>>
[src]
The support mapping of self
if applicable.
fn is_convex_polyhedron(&self) -> bool
[src]
Whether self
uses a convex polyhedron representation.
fn is_support_map(&self) -> bool
[src]
Whether self
uses a support-mapping based representation.
impl<N: Clone + RealField> Clone for Polyline<N>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self