[][src]Trait rapier3d::geometry::Shape

pub trait Shape: RayCast<f32> + PointQuery<f32> + DowncastSync {
    pub fn compute_aabb(&self, position: &Isometry<f32>) -> AABB<f32>;
pub fn mass_properties(&self, density: f32) -> MassProperties;
pub fn shape_type(&self) -> ShapeType; pub fn as_polygonal_feature_map(
        &self
    ) -> Option<(&dyn PolygonalFeatureMap, f32)> { ... } }

Trait implemented by shapes usable by Rapier.

Required methods

pub fn compute_aabb(&self, position: &Isometry<f32>) -> AABB<f32>[src]

Computes the AABB of this shape.

pub fn mass_properties(&self, density: f32) -> MassProperties[src]

Compute the mass-properties of this shape given its uniform density.

pub fn shape_type(&self) -> ShapeType[src]

Gets the type tag of this shape.

Loading content...

Provided methods

pub fn as_polygonal_feature_map(
    &self
) -> Option<(&dyn PolygonalFeatureMap, f32)>
[src]

Converts this shape to a polygonal feature-map, if it is one.

Loading content...

Implementations

impl dyn Shape[src]

pub fn is<__T: Shape>(&self) -> bool[src]

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

pub fn downcast<__T: Shape>(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>(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>(&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>(&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.

pub fn downcast_arc<__T: Shape>(self: Arc<Self>) -> Result<Arc<__T>, Arc<Self>> where
    __T: Any + Send + Sync
[src]

Returns an Arc-ed object from an Arc-ed trait object if the underlying object is of type __T. Returns the original Arc-ed trait if it isn't.

impl dyn Shape[src]

pub fn as_ball(&self) -> Option<&Ball>[src]

Converts this abstract shape to a ball, if it is one.

pub fn as_cuboid(&self) -> Option<&Cuboid>[src]

Converts this abstract shape to a cuboid, if it is one.

pub fn as_capsule(&self) -> Option<&Capsule>[src]

Converts this abstract shape to a capsule, if it is one.

pub fn as_triangle(&self) -> Option<&Triangle>[src]

Converts this abstract shape to a triangle, if it is one.

pub fn as_trimesh(&self) -> Option<&Trimesh>[src]

Converts this abstract shape to a triangle mesh, if it is one.

pub fn as_heightfield(&self) -> Option<&HeightField>[src]

Converts this abstract shape to a heightfield, if it is one.

pub fn as_cylinder(&self) -> Option<&Cylinder>[src]

Converts this abstract shape to a cylinder, if it is one.

pub fn as_cone(&self) -> Option<&Cone>[src]

Converts this abstract shape to a cone, if it is one.

pub fn as_round_cylinder(&self) -> Option<&RoundCylinder>[src]

Converts this abstract shape to a cone, if it is one.

Implementors

impl Shape for Capsule[src]

impl Shape for RoundCylinder[src]

impl Shape for Trimesh[src]

impl Shape for Ball[src]

impl Shape for Cone[src]

impl Shape for Cuboid[src]

impl Shape for Cylinder[src]

impl Shape for HeightField[src]

impl Shape for Segment[src]

impl Shape for Triangle[src]

Loading content...