pub fn setup_dispatch_2d<'a, 'b, S, P, T, B, D, Y, V, N, DT>(
    dispatcher: &mut DispatcherBuilder<'a, 'b>,
    broad_phase: V,
    narrow_phase: N,
    spatial: bool
)where
    V: BroadPhase<D> + BroadPhase<(usize, D)> + 'static,
    N: NarrowPhase<P, T, B, Y> + 'static,
    P: Primitive<Point = Point2<S>> + ComputeBound<B> + Send + Sync + 'static,
    S: Inertia<Orientation = Basis2<S>> + BaseFloat + Send + Sync + 'static,
    T: Component + Pose<Point2<S>, Basis2<S>> + Debug + Transform<Point2<S>> + Send + Sync + Clone + 'static,
    T::Storage: Tracked,
    Y: Default + Send + Sync + 'static,
    B: Bound<Point = Point2<S>> + Send + Sync + 'static + Union<B, Output = B> + Clone + Contains<B> + SurfaceArea<Scalar = S> + Discrete<B> + Debug,
    (usize, D): HasBound<Bound = B>,
    D: TreeValue<Bound = B> + HasBound<Bound = B> + From<(Entity, B)> + GetId<Entity> + Send + Sync + 'static,
    DT: PhysicsTime<S> + Default + Send + Sync + 'static,
    for<'c> &'c S: Sub<S, Output = S> + Add<S, Output = S>,
Expand description

Create systems for 2D and add to a Dispatcher graph.

Parameters

  • dispatcher: The dispatcher to add the systems to.
  • broad_phase: Broad phase to use
  • narrow_phase: Narrow phase to use
  • spatial: If spatial or basic collision detection should be used

Type parameters:

  • S: Scalar type, f32 or f64
  • P: Shape primitive
  • T: Pose (transform)
  • B: Bounding volume
  • D: Broad phase data, usually TreeValueWrapped.
  • Y: Collider
  • V: Broad phase algorithm
  • N: Narrow phase algorithm
  • DT: Time quantity, usually DeltaTime