pub struct CollisionDetector;Expand description
Narrow-phase collision detection.
Implementations§
Source§impl CollisionDetector
impl CollisionDetector
Sourcepub fn sphere_sphere(
pos_a: Vec3,
ra: f32,
ha: RigidBodyHandle,
pos_b: Vec3,
rb: f32,
hb: RigidBodyHandle,
) -> Option<ContactManifold3D>
pub fn sphere_sphere( pos_a: Vec3, ra: f32, ha: RigidBodyHandle, pos_b: Vec3, rb: f32, hb: RigidBodyHandle, ) -> Option<ContactManifold3D>
Sphere vs sphere.
Sourcepub fn sphere_box(
sphere_pos: Vec3,
sphere_r: f32,
hs: RigidBodyHandle,
box_pos: Vec3,
box_rot: Quat,
box_half: Vec3,
hb: RigidBodyHandle,
) -> Option<ContactManifold3D>
pub fn sphere_box( sphere_pos: Vec3, sphere_r: f32, hs: RigidBodyHandle, box_pos: Vec3, box_rot: Quat, box_half: Vec3, hb: RigidBodyHandle, ) -> Option<ContactManifold3D>
Sphere vs axis-aligned box (fallback uses sphere-point clamping).
Sourcepub fn box_box(
pos_a: Vec3,
rot_a: Quat,
half_a: Vec3,
ha: RigidBodyHandle,
pos_b: Vec3,
rot_b: Quat,
half_b: Vec3,
hb: RigidBodyHandle,
) -> Option<ContactManifold3D>
pub fn box_box( pos_a: Vec3, rot_a: Quat, half_a: Vec3, ha: RigidBodyHandle, pos_b: Vec3, rot_b: Quat, half_b: Vec3, hb: RigidBodyHandle, ) -> Option<ContactManifold3D>
Box vs box using SAT (Separating Axis Theorem).
Sourcepub fn capsule_capsule(
pos_a: Vec3,
axis_a: Vec3,
r_a: f32,
hh_a: f32,
ha: RigidBodyHandle,
pos_b: Vec3,
axis_b: Vec3,
r_b: f32,
hh_b: f32,
hb: RigidBodyHandle,
) -> Option<ContactManifold3D>
pub fn capsule_capsule( pos_a: Vec3, axis_a: Vec3, r_a: f32, hh_a: f32, ha: RigidBodyHandle, pos_b: Vec3, axis_b: Vec3, r_b: f32, hh_b: f32, hb: RigidBodyHandle, ) -> Option<ContactManifold3D>
Capsule vs capsule.
Sourcepub fn detect(
body_a: &RigidBody,
ha: RigidBodyHandle,
body_b: &RigidBody,
hb: RigidBodyHandle,
) -> Option<ContactManifold3D>
pub fn detect( body_a: &RigidBody, ha: RigidBodyHandle, body_b: &RigidBody, hb: RigidBodyHandle, ) -> Option<ContactManifold3D>
Dispatch collision detection based on shape types.
Auto Trait Implementations§
impl Freeze for CollisionDetector
impl RefUnwindSafe for CollisionDetector
impl Send for CollisionDetector
impl Sync for CollisionDetector
impl Unpin for CollisionDetector
impl UnsafeUnpin for CollisionDetector
impl UnwindSafe for CollisionDetector
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.