[][src]Struct rapier3d::geometry::ColliderShape

pub struct ColliderShape(pub Arc<dyn Shape>);

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]

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]

impl Deref for ColliderShape[src]

type Target = dyn Shape

The resulting type after dereferencing.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,