pub struct CollisionWorld { /* private fields */ }Expand description
A set of triangle meshes behind a bounding volume hierarchy.
Implementations§
Source§impl CollisionWorld
impl CollisionWorld
Sourcepub fn new(meshes: Vec<TriangleMesh>) -> Self
pub fn new(meshes: Vec<TriangleMesh>) -> Self
Creates a world from a set of meshes.
Sourcepub fn collide_capsule(
&self,
capsule: &Capsule<Vector<f32>>,
velocity_y: f32,
) -> CollisionResult
pub fn collide_capsule( &self, capsule: &Capsule<Vector<f32>>, velocity_y: f32, ) -> CollisionResult
Resolves a vertical capsule against all meshes.
velocity_y distinguishes landing on ground (falling or resting)
from passing it while moving upward.
Auto Trait Implementations§
impl Freeze for CollisionWorld
impl RefUnwindSafe for CollisionWorld
impl Send for CollisionWorld
impl Sync for CollisionWorld
impl Unpin for CollisionWorld
impl UnsafeUnpin for CollisionWorld
impl UnwindSafe for CollisionWorld
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more