pub trait Shape<N: RealField + Copy>: Send + Sync + Downcast + ShapeClone<N> {
Show 17 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 { ... }
}
Expand description

Trait implemented by all shapes supported by ncollide.

This allows dynamic inspection of the shape capabilities.

Required methods

The AABB of self transformed by m.

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

The AABB of self.

The bounding sphere of self transformed by m.

The bounding sphere of self.

Returns the id of the subshape containing the specified feature.

If several subshape contains the same feature, any one is returned.

The RayCast implementation of self.

The PointQuery implementation of self.

The convex polyhedron representation of self if applicable.

The support mapping of self if applicable.

The composite shape representation of self if applicable.

The deformable shape representation of self if applicable.

The mutable deformable shape representation of self if applicable.

Whether self uses a convex polyhedron representation.

Whether self uses a support-mapping based representation.

Whether self uses a composite shape-based representation.

Whether self uses a composite shape-based representation.

Implementations

Returns true if the trait object wraps an object of type __T.

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.

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.

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Trait for casting shapes to its exact represetation.

Tests if this shape has a specific type T.

Performs the cast.

Trait Implementations

Performs the conversion.

The bounding volume of self transformed by m.

The bounding volume of self.

The bounding volume of self transformed by m.

The bounding volume of self.

Projects a point on self transformed by m.

Projects a point on the boundary of self transformed by m and retuns the id of the feature the point was projected on. Read more

Computes the minimal distance between a point and self transformed by m.

Tests if the given point is inside of self transformed by m.

Computes the time of impact between this transform shape and a ray.

Computes the time of impact, and normal between this transformed shape and a ray.

Tests whether a ray intersects this transformed shape.

Implementors