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