[−][src]Struct rapier3d::geometry::ColliderShape
The shape of a collider.
Implementations
impl ColliderShape
[src]
pub fn ball(radius: f32) -> Self
[src]
Initialize a ball shape defined by its radius.
pub fn cylinder(half_height: f32, radius: f32) -> Self
[src]
Initialize a cylindrical shape defined by its half-height (along along the y axis) and its radius.
pub fn round_cylinder(half_height: f32, radius: f32, border_radius: f32) -> Self
[src]
Initialize a rounded cylindrical shape defined by its half-height (along along the y axis), its radius, and its roundedness (the radius of the sphere used for dilating the cylinder).
pub fn cone(half_height: f32, radius: f32) -> Self
[src]
Initialize a cone shape defined by its half-height (along along the y axis) and its basis radius.
pub fn cuboid(half_extents: Vector<f32>) -> Self
[src]
Initialize a cuboid shape defined by its half-extents.
pub fn capsule(a: Point<f32>, b: Point<f32>, radius: f32) -> Self
[src]
Initialize a capsule shape from its endpoints and radius.
pub fn segment(a: Point<f32>, b: Point<f32>) -> Self
[src]
Initialize a segment shape from its endpoints.
pub fn triangle(a: Point<f32>, b: Point<f32>, c: Point<f32>) -> Self
[src]
Initializes a triangle shape.
pub fn trimesh(vertices: Vec<Point<f32>>, indices: Vec<Point3<u32>>) -> Self
[src]
Initializes a triangle mesh shape defined by its vertex and index buffers.
pub fn heightfield(heights: DMatrix<f32>, scale: Vector<f32>) -> Self
[src]
Initializes an heightfield shape on the x-z plane defined by its set of height and a scale factor along each coordinate axis.
Methods from Deref<Target = dyn Shape>
pub fn is<__T: Shape>(&self) -> bool
[src]
Returns true if the trait object wraps an object of type __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_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.
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.
Trait Implementations
impl Clone for ColliderShape
[src]
pub fn clone(&self) -> ColliderShape
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Deref for ColliderShape
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ColliderShape
impl Send for ColliderShape
impl Sync for ColliderShape
impl Unpin for ColliderShape
impl !UnwindSafe for ColliderShape
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,