Trait ncollide2d::shape::Shape[][src]

pub trait Shape<N: Real>: Send + Sync + Any + GetTypeId {
    fn aabb(&self, m: &Isometry<N>) -> AABB<N>;

    fn bounding_sphere(&self, m: &Isometry<N>) -> BoundingSphere<N> { ... }
fn subshape_transform(&self, _: usize) -> Option<Isometry<N>> { ... }
fn as_ray_cast(&self) -> Option<&RayCast<N>> { ... }
fn as_point_query(&self) -> Option<&PointQuery<N>> { ... }
fn as_convex_polyhedron(&self) -> Option<&ConvexPolyhedron<N>> { ... }
fn as_support_map(&self) -> Option<&SupportMap<N>> { ... }
fn as_composite_shape(&self) -> Option<&CompositeShape<N>> { ... }
fn is_convex_polyhedron(&self) -> bool { ... }
fn is_support_map(&self) -> bool { ... }
fn is_composite_shape(&self) -> bool { ... } }

Trait implemented by all shapes supported by ncollide.

This allows dynamic inspection of the shape capabilities.

Required Methods

The AABB of self.

Provided Methods

The bounding sphere of self.

The transform of a specific subshape.

Return None if the transform is known to be the identity.

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.

Whether self uses a conve polyhedron representation.

Whether self uses a supportmapping-based representation.

Whether self uses a composite shape-based representation.

Methods

impl<N: Real> Shape<N>
[src]

Trait for casting shapes to its exact represetation.

Tests if this shape has a specific type T.

Performs the cast.

Trait Implementations

impl<N: Real> HasBoundingVolume<N, AABB<N>> for Shape<N>
[src]

The bounding volume of self transformed by m.

impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Shape<N>
[src]

The bounding volume of self transformed by m.

impl<N: Real> PointQuery<N> for Shape<N>
[src]

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.

impl<N: Real> RayCast<N> for Shape<N>
[src]

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.

impl<N: Real> AsRef<Shape<N>> for ShapeHandle<N>
[src]

Performs the conversion.

Implementors