Trait rapier3d_f64::geometry::Shape [−][src]
Trait implemented by shapes usable by Rapier.
Required methods
pub fn compute_local_aabb(&self) -> AABB
[src]
Computes the AABB of this shape.
pub fn mass_properties(&self, density: f64) -> 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.
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
Gets the underlying shape as an enum.
pub fn ccd_thickness(&self) -> f64
[src]
Provided methods
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
Computes the AABB of this shape with the given position.
pub 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.
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
Convents this shape into its support mapping, if it has one.
pub fn as_composite_shape(&self) -> Option<&dyn SimdCompositeShape>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
Converts this shape to a polygonal feature-map, if it is one.
pub fn feature_normal_at_point(
&self,
_feature: FeatureId,
_point: &Point<f64, U3>
) -> Option<Unit<Matrix<f64, U3, U1, <DefaultAllocator as Allocator<f64, U3, U1>>::Buffer>>>
[src]
&self,
_feature: FeatureId,
_point: &Point<f64, U3>
) -> Option<Unit<Matrix<f64, U3, U1, <DefaultAllocator as Allocator<f64, U3, U1>>::Buffer>>>
The shape’s normal at the given point located on a specific feature.
Implementations
impl dyn Shape + 'static
[src]
pub fn as_shape<T>(&self) -> Option<&T> where
T: Shape,
[src]
T: Shape,
Converts this abstract shape to the given 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_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_compound(&self) -> Option<&Compound>
[src]
Converts this abstract shape to a 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_polyline(&self) -> Option<&Polyline>
[src]
Converts this abstract shape to a 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_round_cuboid(&self) -> Option<&RoundShape<Cuboid>>
[src]
Converts this abstract shape to a round cuboid, if it is one.
pub fn as_round_triangle(&self) -> Option<&RoundShape<Triangle>>
[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_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<&RoundShape<Cylinder>>
[src]
Converts this abstract shape to a round cylinder, if it is one.
pub fn as_round_cone(&self) -> Option<&RoundShape<Cone>>
[src]
Converts this abstract shape to a round cone, if it is one.
pub fn as_round_convex_polyhedron(
&self
) -> Option<&RoundShape<ConvexPolyhedron>>
[src]
&self
) -> Option<&RoundShape<ConvexPolyhedron>>
Converts this abstract shape to a round convex polyhedron, if it is one.
impl dyn Shape + 'static
[src]
pub fn is<__T>(&self) -> bool where
__T: Shape,
[src]
__T: Shape,
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T>(
self: Box<dyn Shape + 'static, Global>
) -> Result<Box<__T, Global>, Box<dyn Shape + 'static, Global>> where
__T: Shape,
[src]
self: Box<dyn Shape + 'static, Global>
) -> Result<Box<__T, Global>, Box<dyn Shape + 'static, Global>> where
__T: Shape,
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>(
self: Rc<dyn Shape + 'static>
) -> Result<Rc<__T>, Rc<dyn Shape + 'static>> where
__T: Shape,
[src]
self: Rc<dyn Shape + 'static>
) -> Result<Rc<__T>, Rc<dyn Shape + 'static>> where
__T: Shape,
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>(&self) -> Option<&__T> where
__T: Shape,
[src]
__T: Shape,
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>(&mut self) -> Option<&mut __T> where
__T: Shape,
[src]
__T: Shape,
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>(
self: Arc<dyn Shape + 'static>
) -> Result<Arc<__T>, Arc<dyn Shape + 'static>> where
__T: Shape + Any + Send + Sync,
[src]
self: Arc<dyn Shape + 'static>
) -> Result<Arc<__T>, Arc<dyn Shape + 'static>> where
__T: Shape + 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.
Implementors
impl Shape for Ball
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
impl Shape for Capsule
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for Compound
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_composite_shape(&self) -> Option<&dyn SimdCompositeShape>
[src]
impl Shape for Cone
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for ConvexPolyhedron
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for Cuboid
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for Cylinder
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for HalfSpace
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn is_convex(&self) -> bool
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn mass_properties(&self, f64) -> MassProperties
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
impl Shape for HeightField
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, _density: f64) -> MassProperties
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
impl Shape for Polyline
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, _density: f64) -> MassProperties
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_composite_shape(&self) -> Option<&dyn SimdCompositeShape>
[src]
impl Shape for RoundShape<Cone>
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for RoundShape<ConvexPolyhedron>
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for RoundShape<Cuboid>
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for RoundShape<Cylinder>
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for RoundShape<Triangle>
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for Segment
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, _density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
impl Shape for TriMesh
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, _density: f64) -> MassProperties
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_composite_shape(&self) -> Option<&dyn SimdCompositeShape>
[src]
impl Shape for Triangle
[src]
pub fn compute_local_aabb(&self) -> AABB
[src]
pub fn compute_aabb(
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
[src]
&self,
position: &Isometry<f64, U3, Unit<Quaternion<f64>>>
) -> AABB
pub fn mass_properties(&self, _density: f64) -> MassProperties
[src]
pub fn is_convex(&self) -> bool
[src]
pub fn shape_type(&self) -> ShapeType
[src]
pub fn as_typed_shape(&self) -> TypedShape<'_>
[src]
pub fn ccd_thickness(&self) -> f64
[src]
pub fn as_support_map(&self) -> Option<&dyn SupportMap>
[src]
pub fn as_polygonal_feature_map(
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>
[src]
&self
) -> Option<(&dyn PolygonalFeatureMap, f64)>