Struct heron::rapier_plugin::rapier::geometry::ColliderShape [−]
The shape of a collider.
Implementations
impl ColliderShape
pub fn ball(radius: f32) -> ColliderShape
Initialize a ball shape defined by its radius.
pub fn cylinder(half_height: f32, radius: f32) -> ColliderShape
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
) -> ColliderShape
half_height: f32,
radius: f32,
border_radius: f32
) -> ColliderShape
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) -> ColliderShape
Initialize a cone shape defined by its half-height (along along the y axis) and its basis radius.
pub fn cuboid(
half_extents: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> ColliderShape
half_extents: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> ColliderShape
Initialize a cuboid shape defined by its half-extents.
pub fn capsule(
a: Point<f32, U3>,
b: Point<f32, U3>,
radius: f32
) -> ColliderShape
a: Point<f32, U3>,
b: Point<f32, U3>,
radius: f32
) -> ColliderShape
Initialize a capsule shape from its endpoints and radius.
pub fn segment(a: Point<f32, U3>, b: Point<f32, U3>) -> ColliderShape
Initialize a segment shape from its endpoints.
pub fn triangle(
a: Point<f32, U3>,
b: Point<f32, U3>,
c: Point<f32, U3>
) -> ColliderShape
a: Point<f32, U3>,
b: Point<f32, U3>,
c: Point<f32, U3>
) -> ColliderShape
Initializes a triangle shape.
pub fn trimesh(
vertices: Vec<Point<f32, U3>, Global>,
indices: Vec<Point<u32, U3>, Global>
) -> ColliderShape
vertices: Vec<Point<f32, U3>, Global>,
indices: Vec<Point<u32, U3>, Global>
) -> ColliderShape
Initializes a triangle mesh shape defined by its vertex and index buffers.
pub fn heightfield(
heights: Matrix<f32, Dynamic, Dynamic, <DefaultAllocator as Allocator<f32, Dynamic, Dynamic>>::Buffer>,
scale: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> ColliderShape
heights: Matrix<f32, Dynamic, Dynamic, <DefaultAllocator as Allocator<f32, Dynamic, Dynamic>>::Buffer>,
scale: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> ColliderShape
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 + 'static>
pub fn as_ball(&self) -> Option<&Ball<f32>>
Converts this abstract shape to a ball, if it is one.
pub fn as_cuboid(&self) -> Option<&Cuboid<f32>>
Converts this abstract shape to a cuboid, if it is one.
pub fn as_capsule(&self) -> Option<&Capsule>
Converts this abstract shape to a capsule, if it is one.
pub fn as_triangle(&self) -> Option<&Triangle<f32>>
Converts this abstract shape to a triangle, if it is one.
pub fn as_trimesh(&self) -> Option<&Trimesh>
Converts this abstract shape to a triangle mesh, if it is one.
pub fn as_heightfield(&self) -> Option<&HeightField<f32>>
Converts this abstract shape to a heightfield, if it is one.
pub fn as_cylinder(&self) -> Option<&Cylinder<f32>>
Converts this abstract shape to a cylinder, if it is one.
pub fn as_cone(&self) -> Option<&Cone<f32>>
Converts this abstract shape to a cone, if it is one.
pub fn as_round_cylinder(&self) -> Option<&RoundCylinder>
Converts this abstract shape to a cone, if it is one.
pub fn is<__T>(&self) -> bool where
__T: Shape,
__T: Shape,
Returns true if the trait object wraps an object of type __T
.
pub fn downcast_rc<__T>(
self: Rc<dyn Shape + 'static>
) -> Result<Rc<__T>, Rc<dyn Shape + 'static>> where
__T: Shape,
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,
__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_arc<__T>(
self: Arc<dyn Shape + 'static>
) -> Result<Arc<__T>, Arc<dyn Shape + 'static>> where
__T: Shape + Any + Send + Sync,
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.
Trait Implementations
impl Clone for ColliderShape
pub fn clone(&self) -> ColliderShape
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Deref for ColliderShape
Auto Trait Implementations
impl !RefUnwindSafe for ColliderShape
[src]
impl Send for ColliderShape
[src]
impl Sync for ColliderShape
[src]
impl Unpin for ColliderShape
[src]
impl !UnwindSafe for ColliderShape
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
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> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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> Resource for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
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<T> TypeData for T where
T: 'static + Send + Sync + Clone,
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,