Skip to main content

AsShape

Trait AsShape 

Source
pub trait AsShape {
    // Required method
    fn as_shape(&self) -> &dyn Shape;
}
Expand description

A shape accepted by the scene queries (e.g. RapierContext::cast_shape) and by RapierContextMut::move_shape: a Collider (its scaled shape), a Rapier shape trait object (&dyn Shape, e.g. &*shared_shape), or any concrete Rapier shape (e.g. Ball).

Required Methods§

Source

fn as_shape(&self) -> &dyn Shape

The shape used by the query.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsShape for dyn Shape

Source§

fn as_shape(&self) -> &dyn Shape

Implementors§