Function rhusics_ecs::setup_dispatch
source · 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 usenarrow_phase
: Narrow phase to usespatial
: If spatial or basic collision detection should be used
Type parameters:
P
: Shape primitiveT
: Pose (transform)B
: Bounding volumeD
: Broad phase data, usuallyTreeValueWrapped
.Y
: ColliderV
: Broad phase algorithmN
: Narrow phase algorithmR
: Rotational quantity,Basis2
orQuaternion
A
: Angular velocity,Scalar
orVector3
I
: Inertia,Scalar
orMatrix3
DT
: Time quantity, usuallyDeltaTime
O
: Internal type used to abstract cross product for 2D vs 3D,Scalar
orVector3