[−][src]Trait ncollide_geometry::shape::Shape
Trait implemented by all shapes supported by ncollide.
This allows dynamic inspection of the shape capabilities.
Required methods
Loading content...Provided methods
fn bounding_sphere(&self, m: &M) -> BoundingSphere<P>
The bounding sphere of self
.
fn as_ray_cast(&self) -> Option<&dyn RayCast<P, M>>
The RayCast
implementation of self
.
fn as_point_query(&self) -> Option<&dyn PointQuery<P, M>>
The PointQuery
implementation of self
.
fn as_support_map(&self) -> Option<&dyn SupportMap<P, M>>
The support mapping of self
if applicable.
fn as_composite_shape(&self) -> Option<&dyn CompositeShape<P, M>>
The composite shape representation of self
if applicable.
fn is_support_map(&self) -> bool
Whether self
uses a supportmapping-based representation.
fn is_composite_shape(&self) -> bool
Whether self
uses a composite shape-based representation.
Methods
impl<P: Point, M: 'static> dyn Shape<P, M>
[src]
Trait for casting shapes to its exact represetation.
pub fn is_shape<T: Shape<P, M>>(&self) -> bool
[src]
Tests if this shape has a specific type T
.
pub fn as_shape<T: Shape<P, M>>(&self) -> Option<&T>
[src]
Performs the cast.
Trait Implementations
impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, AABB<P>> for dyn Shape<P, M>
[src]
fn bounding_volume(&self, m: &M) -> AABB<P>
[src]
impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, BoundingSphere<P>> for dyn Shape<P, M>
[src]
fn bounding_volume(&self, m: &M) -> BoundingSphere<P>
[src]
impl<P: Point, M: Isometry<P>> RayCast<P, M> for dyn Shape<P, M>
[src]
fn toi_with_ray(&self, m: &M, ray: &Ray<P>, solid: bool) -> Option<P::Real>
[src]
fn toi_and_normal_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
[src]
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
fn toi_and_normal_and_uv_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
[src]
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
fn intersects_ray(&self, m: &M, ray: &Ray<P>) -> bool
[src]
impl<P, M> PointQuery<P, M> for dyn Shape<P, M> where
P: Point,
M: Isometry<P>,
[src]
P: Point,
M: Isometry<P>,