Trait ncollide3d::shape::Shape [−][src]
pub trait Shape<N: RealField>: Send + Sync + Downcast + ShapeClone<N> {}Show methods
fn aabb(&self, m: &Isometry<N>) -> AABB<N>; fn tangent_cone_contains_dir(
&self,
_feature: FeatureId,
_m: &Isometry<N>,
_deformations: Option<&[N]>,
_dir: &Unit<Vector<N>>
) -> bool; fn local_aabb(&self) -> AABB<N> { ... } fn bounding_sphere(&self, m: &Isometry<N>) -> BoundingSphere<N> { ... } fn local_bounding_sphere(&self) -> BoundingSphere<N> { ... } fn subshape_containing_feature(&self, _i: FeatureId) -> usize { ... } fn as_ray_cast(&self) -> Option<&dyn RayCast<N>> { ... } fn as_point_query(&self) -> Option<&dyn PointQuery<N>> { ... } fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>> { ... } fn as_support_map(&self) -> Option<&dyn SupportMap<N>> { ... } fn as_composite_shape(&self) -> Option<&dyn CompositeShape<N>> { ... } fn as_deformable_shape(&self) -> Option<&dyn DeformableShape<N>> { ... } fn as_deformable_shape_mut(&mut self) -> Option<&mut dyn DeformableShape<N>> { ... } fn is_convex_polyhedron(&self) -> bool { ... } fn is_support_map(&self) -> bool { ... } fn is_composite_shape(&self) -> bool { ... } fn is_deformable_shape(&self) -> bool { ... }
Trait implemented by all shapes supported by ncollide.
This allows dynamic inspection of the shape capabilities.
Required methods
fn aabb(&self, m: &Isometry<N>) -> AABB<N>[src]
The AABB of self transformed by m.
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
Check if if the feature _feature of the i-th subshape of self transformed by m has a tangent
cone that contains dir at the point pt.
Provided methods
fn local_aabb(&self) -> AABB<N>[src]
The AABB of self.
fn bounding_sphere(&self, m: &Isometry<N>) -> BoundingSphere<N>[src]
The bounding sphere of self transformed by m.
fn local_bounding_sphere(&self) -> BoundingSphere<N>[src]
The bounding sphere of self.
fn subshape_containing_feature(&self, _i: FeatureId) -> usize[src]
Returns the id of the subshape containing the specified feature.
If several subshape contains the same feature, any one is returned.
fn as_ray_cast(&self) -> Option<&dyn RayCast<N>>[src]
The RayCast implementation of self.
fn as_point_query(&self) -> Option<&dyn PointQuery<N>>[src]
The PointQuery implementation 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 as_composite_shape(&self) -> Option<&dyn CompositeShape<N>>[src]
The composite shape representation of self if applicable.
fn as_deformable_shape(&self) -> Option<&dyn DeformableShape<N>>[src]
The deformable shape representation of self if applicable.
fn as_deformable_shape_mut(&mut self) -> Option<&mut dyn DeformableShape<N>>[src]
The mutable deformable shape representation 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.
fn is_composite_shape(&self) -> bool[src]
Whether self uses a composite shape-based representation.
fn is_deformable_shape(&self) -> bool[src]
Whether self uses a composite shape-based representation.
Implementations
impl<N> dyn Shape<N> where
N: Any + 'static,
N: RealField, [src]
impl<N> dyn Shape<N> where
N: Any + 'static,
N: RealField, [src]pub fn is<__T: Shape<N>>(&self) -> bool[src]
Returns true if the trait object wraps an object of type __T.
pub fn downcast<__T: Shape<N>>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>[src]
Returns a boxed object from a boxed trait object if the underlying object is of type
__T. Returns the original boxed trait if it isn’t.
pub fn downcast_rc<__T: Shape<N>>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>[src]
Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of
type __T. Returns the original Rc-ed trait if it isn’t.
pub fn downcast_ref<__T: Shape<N>>(&self) -> Option<&__T>[src]
Returns a reference to the object within the trait object if it is of type __T, or
None if it isn’t.
pub fn downcast_mut<__T: Shape<N>>(&mut self) -> Option<&mut __T>[src]
Returns a mutable reference to the object within the trait object if it is of type
__T, or None if it isn’t.
impl<N: RealField> dyn Shape<N>[src]
impl<N: RealField> dyn Shape<N>[src]Trait for casting shapes to its exact represetation.
Trait Implementations
impl<N: RealField> AsRef<dyn Shape<N> + 'static> for ShapeHandle<N>[src]
impl<N: RealField> AsRef<dyn Shape<N> + 'static> for ShapeHandle<N>[src]impl<N: RealField> HasBoundingVolume<N, AABB<N>> for dyn Shape<N>[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for dyn Shape<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 dyn Shape<N>[src]
impl<N: RealField> HasBoundingVolume<N, BoundingSphere<N>> for dyn Shape<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 dyn Shape<N>[src]
impl<N: RealField> PointQuery<N> for dyn Shape<N>[src]fn project_point(
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>[src]
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
fn project_point_with_feature(
&self,
m: &Isometry<N>,
pt: &Point<N>
) -> (PointProjection<N>, FeatureId)[src]
&self,
m: &Isometry<N>,
pt: &Point<N>
) -> (PointProjection<N>, FeatureId)
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N[src]
fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool[src]
impl<N: RealField> RayCast<N> for dyn Shape<N>[src]
impl<N: RealField> RayCast<N> for dyn Shape<N>[src]fn toi_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
fn toi_and_normal_and_uv_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N) -> bool[src]
Implementors
impl<N: RealField> Shape<N> for Ball<N>[src]
impl<N: RealField> Shape<N> for Ball<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_support_map(&self) -> Option<&dyn SupportMap<N>>[src]
fn is_support_map(&self) -> bool[src]
fn tangent_cone_contains_dir(
&self,
_: FeatureId,
_: &Isometry<N>,
_: Option<&[N]>,
_: &Unit<Vector<N>>
) -> bool[src]
&self,
_: FeatureId,
_: &Isometry<N>,
_: Option<&[N]>,
_: &Unit<Vector<N>>
) -> bool
impl<N: RealField> Shape<N> for Capsule<N>[src]
impl<N: RealField> Shape<N> for Capsule<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_support_map(&self) -> Option<&dyn SupportMap<N>>[src]
fn is_support_map(&self) -> bool[src]
fn tangent_cone_contains_dir(
&self,
_: FeatureId,
_: &Isometry<N>,
_: Option<&[N]>,
_: &Unit<Vector<N>>
) -> bool[src]
&self,
_: FeatureId,
_: &Isometry<N>,
_: Option<&[N]>,
_: &Unit<Vector<N>>
) -> bool
impl<N: RealField> Shape<N> for Compound<N>[src]
impl<N: RealField> Shape<N> for Compound<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 tangent_cone_contains_dir(
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
fn subshape_containing_feature(&self, feature: FeatureId) -> usize[src]
impl<N: RealField> Shape<N> for ConvexHull<N>[src]
impl<N: RealField> Shape<N> for ConvexHull<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_support_map(&self) -> Option<&dyn SupportMap<N>>[src]
fn is_support_map(&self) -> bool[src]
fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>[src]
fn is_convex_polyhedron(&self) -> bool[src]
fn tangent_cone_contains_dir(
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
impl<N: RealField> Shape<N> for Cuboid<N>[src]
impl<N: RealField> Shape<N> for Cuboid<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_support_map(&self) -> Option<&dyn SupportMap<N>>[src]
fn is_support_map(&self) -> bool[src]
fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>[src]
fn is_convex_polyhedron(&self) -> bool[src]
fn tangent_cone_contains_dir(
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
impl<N: RealField> Shape<N> for HeightField<N>[src]
impl<N: RealField> Shape<N> for HeightField<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 tangent_cone_contains_dir(
&self,
_fid: FeatureId,
_m: &Isometry<N>,
_deformations: Option<&[N]>,
_dir: &Unit<Vector<N>>
) -> bool[src]
&self,
_fid: FeatureId,
_m: &Isometry<N>,
_deformations: Option<&[N]>,
_dir: &Unit<Vector<N>>
) -> bool
fn subshape_containing_feature(&self, _id: FeatureId) -> usize[src]
impl<N: RealField> Shape<N> for Plane<N>[src]
impl<N: RealField> Shape<N> for Plane<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 tangent_cone_contains_dir(
&self,
_: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
_: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
impl<N: RealField> Shape<N> for Polyline<N>[src]
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]
impl<N: RealField> Shape<N> for Segment<N>[src]
impl<N: RealField> Shape<N> for Segment<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_support_map(&self) -> Option<&dyn SupportMap<N>>[src]
fn is_support_map(&self) -> bool[src]
fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>[src]
fn is_convex_polyhedron(&self) -> bool[src]
fn tangent_cone_contains_dir(
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
impl<N: RealField> Shape<N> for TriMesh<N>[src]
impl<N: RealField> Shape<N> for TriMesh<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,
fid: FeatureId,
m: &Isometry<N>,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
fid: FeatureId,
m: &Isometry<N>,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
fn subshape_containing_feature(&self, id: FeatureId) -> usize[src]
impl<N: RealField> Shape<N> for Triangle<N>[src]
impl<N: RealField> Shape<N> for Triangle<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_support_map(&self) -> Option<&dyn SupportMap<N>>[src]
fn is_support_map(&self) -> bool[src]
fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>[src]
fn is_convex_polyhedron(&self) -> bool[src]
fn tangent_cone_contains_dir(
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
feature: FeatureId,
m: &Isometry<N>,
_: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool