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>>,
up: Vector<f32>,
velocity: Vector<f32>,
) -> CollisionResult
pub fn collide_capsule( &self, capsule: &Capsule<Vector<f32>>, up: Vector<f32>, velocity: Vector<f32>, ) -> CollisionResult
Resolves a capsule aligned with up against all meshes.
up is the unit vector walkable ground is measured against; velocity
distinguishes landing on ground (falling or resting) from passing it
while moving up.
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