Function rhusics_ecs::physics2d::setup_dispatch_2d [−][src]
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,
&'c S: Sub<S, Output = S> + Add<S, Output = S>,
Create systems for 2D 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:
S
: Scalar type,f32
orf64
P
: Shape primitiveT
: Pose (transform)B
: Bounding volumeD
: Broad phase data, usuallyTreeValueWrapped
.Y
: ColliderV
: Broad phase algorithmN
: Narrow phase algorithmDT
: Time quantity, usuallyDeltaTime