pub fn setup_dispatch<'a, 'b, P, T, B, D, Y, V, N, R, A, I, DT, O>(
    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 + ComputeBound<B> + Send + Sync + 'static,
    P::Point: Debug + Send + Sync + 'static,
    <P::Point as EuclideanSpace>::Scalar: BaseFloat + Send + Sync + 'static,
    <P::Point as EuclideanSpace>::Diff: InnerSpace + PartialCrossProduct<<P::Point as EuclideanSpace>::Diff, Output = O> + Debug + Send + Sync + 'static,
    T: Debug + Component + Pose<P::Point, R> + Transform<P::Point> + Send + Sync + Clone + 'static,
    T::Storage: Tracked,
    Y: Default + Send + Sync + 'static,
    B: Bound<Point = P::Point> + Send + Sync + 'static + Union<B, Output = B> + Clone + Contains<B> + SurfaceArea<Scalar = <P::Point as EuclideanSpace>::Scalar> + Discrete<B> + Debug,
    (usize, D): HasBound<Bound = B>,
    D: TreeValue<Bound = B> + HasBound<Bound = B> + From<(Entity, B)> + GetId<Entity> + Send + Sync + 'static,
    R: Rotation<P::Point> + ApplyAngular<<P::Point as EuclideanSpace>::Scalar, A> + Send + Sync + 'static,
    I: Inertia<Orientation = R> + Mul<A, Output = A> + Mul<O, Output = O> + Send + Sync + 'static,
    A: Mul<<P::Point as EuclideanSpace>::Scalar, Output = A> + PartialCrossProduct<<P::Point as EuclideanSpace>::Diff, Output = <P::Point as EuclideanSpace>::Diff> + Zero + Clone + Copy + Send + Sync + 'static,
    DT: PhysicsTime<<P::Point as EuclideanSpace>::Scalar> + Default + Send + Sync + 'static,
    O: PartialCrossProduct<<P::Point as EuclideanSpace>::Diff, Output = <P::Point as EuclideanSpace>::Diff> + Send + Sync + 'static,
    for<'c> &'c A: Sub<O, Output = A> + Add<O, Output = A>,
Expand description

Create systems 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:

  • 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
  • R: Rotational quantity, Basis2 or Quaternion
  • A: Angular velocity, Scalar or Vector3
  • I: Inertia, Scalar or Matrix3
  • DT: Time quantity, usually DeltaTime
  • O: Internal type used to abstract cross product for 2D vs 3D, Scalar or Vector3