Function rhusics_core::tree_collide

source ·
pub fn tree_collide<C, I, P, T, B, Y, D>(
    data: &C,
    tree: &mut DynamicBoundingVolumeTree<D>,
    broad: &mut Option<Box<dyn BroadPhase<(usize, D)>>>,
    narrow: &Option<Box<dyn NarrowPhase<P, T, B, Y>>>
) -> Vec<ContactEvent<I, P::Point>>where
    C: CollisionData<I, P, T, B, Y, D>,
    P: Primitive,
    <P::Point as EuclideanSpace>::Diff: Debug,
    I: Copy + Debug + Hash + Eq,
    D: HasBound<Bound = B> + GetId<I> + TreeValue<Bound = B>,
    B: Bound<Point = P::Point> + Clone + SurfaceArea<Scalar = <P::Point as EuclideanSpace>::Scalar> + Contains<B> + Union<B, Output = B> + Discrete<B>,
Expand description

Do collision detection using a DBVT

Type parameters:

  • C: Collision data
  • I: Id, returned by GetId on D, primary id for a collider
  • P: Primitive
  • T: Transform
  • B: Bounding volume
  • Y: Collider, see Collider for more information
  • D: TreeValue in DBVT