Trait parry3d::shape::Shape [−][src]
Trait implemented by shapes usable by Rapier.
Required methods
fn compute_local_aabb(&self) -> AABB
[src]
Computes the AABB of this shape.
fn compute_local_bounding_sphere(&self) -> BoundingSphere
[src]
Computes the bounding-sphere of this shape.
fn clone_box(&self) -> Box<dyn Shape>
[src]
Clones this shape into a boxed trait-object.
fn mass_properties(&self, density: Real) -> MassProperties
[src]
Compute the mass-properties of this shape given its uniform density.
fn shape_type(&self) -> ShapeType
[src]
Gets the type tag of this shape.
fn as_typed_shape(&self) -> TypedShape<'_>
[src]
Gets the underlying shape as an enum.
fn ccd_thickness(&self) -> Real
[src]
fn ccd_angular_thickness(&self) -> Real
[src]
Provided methods
fn compute_aabb(&self, position: &Isometry<Real>) -> AABB
[src]
Computes the AABB of this shape with the given position.
fn compute_bounding_sphere(&self, position: &Isometry<Real>) -> BoundingSphere
[src]
Computes the bounding-sphere of this shape with the given position.
fn is_convex(&self) -> bool
[src]
Is this shape known to be convex?
If this returns true
then self
is known to be convex.
If this returns false
then it is not known whether or
not self
is convex.
fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
Convents this shape into its support mapping, if it has one.
fn as_composite_shape(&self) -> Option<&dyn SimdCompositeShape>
[src]
fn as_polygonal_feature_map(&self) -> Option<(&dyn PolygonalFeatureMap, Real)>
[src]
Converts this shape to a polygonal feature-map, if it is one.
fn feature_normal_at_point(
&self,
_feature: FeatureId,
_point: &Point<Real>
) -> Option<Unit<Vector<Real>>>
[src]
&self,
_feature: FeatureId,
_point: &Point<Real>
) -> Option<Unit<Vector<Real>>>
The shape’s normal at the given point located on a specific feature.
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]
__T: Any + Send + Sync,
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_shape<T: Shape>(&self) -> Option<&T>
[src]
Converts this abstract shape to the given shape, if it is one.
pub fn as_shape_mut<T: Shape>(&mut self) -> Option<&mut T>
[src]
Converts this abstract shape to the given mutable shape, if it is one.
pub fn as_ball(&self) -> Option<&Ball>
[src]
Converts this abstract shape to a ball, if it is one.
pub fn as_ball_mut(&mut self) -> Option<&mut Ball>
[src]
Converts this abstract shape to a mutable 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_cuboid_mut(&mut self) -> Option<&mut Cuboid>
[src]
Converts this abstract shape to a mutable cuboid, if it is one.
pub fn as_halfspace(&self) -> Option<&HalfSpace>
[src]
Converts this abstract shape to a halfspace, if it is one.
pub fn as_halfspace_mut(&mut self) -> Option<&mut HalfSpace>
[src]
Converts this abstract shape to a halfspace, if it is one.
pub fn as_segment(&self) -> Option<&Segment>
[src]
Converts this abstract shape to a segment, if it is one.
pub fn as_segment_mut(&mut self) -> Option<&mut Segment>
[src]
Converts this abstract shape to a mutable segment, 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_capsule_mut(&mut self) -> Option<&mut Capsule>
[src]
Converts this abstract shape to a mutable 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_triangle_mut(&mut self) -> Option<&mut Triangle>
[src]
Converts this abstract shape to a mutable triangle, if it is one.
pub fn as_compound(&self) -> Option<&Compound>
[src]
Converts this abstract shape to a compound shape, if it is one.
pub fn as_compound_mut(&mut self) -> Option<&mut Compound>
[src]
Converts this abstract shape to a mutable compound shape, 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_trimesh_mut(&mut self) -> Option<&mut TriMesh>
[src]
Converts this abstract shape to a mutable triangle mesh, if it is one.
pub fn as_polyline(&self) -> Option<&Polyline>
[src]
Converts this abstract shape to a polyline, if it is one.
pub fn as_polyline_mut(&mut self) -> Option<&mut Polyline>
[src]
Converts this abstract shape to a mutable polyline, 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_heightfield_mut(&mut self) -> Option<&mut HeightField>
[src]
Converts this abstract shape to a mutable heightfield, if it is one.
pub fn as_round_cuboid(&self) -> Option<&RoundCuboid>
[src]
Converts this abstract shape to a round cuboid, if it is one.
pub fn as_round_cuboid_mut(&mut self) -> Option<&mut RoundCuboid>
[src]
Converts this abstract shape to a mutable round cuboid, if it is one.
pub fn as_round_triangle(&self) -> Option<&RoundTriangle>
[src]
Converts this abstract shape to a round triangle, if it is one.
pub fn as_round_triangle_mut(&mut self) -> Option<&mut RoundTriangle>
[src]
Converts this abstract shape to a round triangle, if it is one.
pub fn as_convex_polyhedron(&self) -> Option<&ConvexPolyhedron>
[src]
pub fn as_convex_polyhedron_mut(&mut self) -> Option<&mut ConvexPolyhedron>
[src]
pub fn as_cylinder(&self) -> Option<&Cylinder>
[src]
Converts this abstract shape to a cylinder, if it is one.
pub fn as_cylinder_mut(&mut self) -> Option<&mut Cylinder>
[src]
Converts this abstract shape to a mutable 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_cone_mut(&mut self) -> Option<&mut Cone>
[src]
Converts this abstract shape to a mutable cone, if it is one.
pub fn as_round_cylinder(&self) -> Option<&RoundCylinder>
[src]
Converts this abstract shape to a round cylinder, if it is one.
pub fn as_round_cylinder_mut(&mut self) -> Option<&mut RoundCylinder>
[src]
Converts this abstract shape to a mutable round cylinder, if it is one.
pub fn as_round_cone(&self) -> Option<&RoundCone>
[src]
Converts this abstract shape to a round cone, if it is one.
pub fn as_round_cone_mut(&mut self) -> Option<&mut RoundCone>
[src]
Converts this abstract shape to a mutable round cone, if it is one.
pub fn as_round_convex_polyhedron(&self) -> Option<&RoundConvexPolyhedron>
[src]
Converts this abstract shape to a round convex polyhedron, if it is one.
pub fn as_round_convex_polyhedron_mut(
&mut self
) -> Option<&mut RoundConvexPolyhedron>
[src]
&mut self
) -> Option<&mut RoundConvexPolyhedron>
Converts this abstract shape to a mutable round convex polyhedron, if it is one.