Struct rhusics_ecs::NextFrameSetupSystem
source · pub struct NextFrameSetupSystem<P, R, I, A, T, D> { /* private fields */ }
Expand description
Setup the next frames positions and velocities.
Type parameters:
P
: Positional quantity, usuallyPoint2
orPoint3
R
: Rotational quantity, usuallyBasis2
orQuaternion
I
: Inertia, usuallyScalar
orMatrix3
A
: Angular velocity, usuallyScalar
orVector3
T
: Transform type (BodyPose2
or similar)
System function
fn(DeltaTime, Mass, T, ForceAccumulator) -> (ForceAccumulator, NextFrame<Velocity>, NextFrame<T>)
Implementations
sourceimpl<P, R, I, A, T, D> NextFrameSetupSystem<P, R, I, A, T, D>where
T: Pose<P, R>,
P: EuclideanSpace,
P::Scalar: BaseFloat,
P::Diff: VectorSpace + InnerSpace + Debug,
R: Rotation<P> + ApplyAngular<P::Scalar, A>,
I: Inertia<Orientation = R> + Mul<A, Output = A>,
A: Mul<P::Scalar, Output = A> + Zero + Clone + Copy,
D: PhysicsTime<P::Scalar> + Default,
impl<P, R, I, A, T, D> NextFrameSetupSystem<P, R, I, A, T, D>where
T: Pose<P, R>,
P: EuclideanSpace,
P::Scalar: BaseFloat,
P::Diff: VectorSpace + InnerSpace + Debug,
R: Rotation<P> + ApplyAngular<P::Scalar, A>,
I: Inertia<Orientation = R> + Mul<A, Output = A>,
A: Mul<P::Scalar, Output = A> + Zero + Clone + Copy,
D: PhysicsTime<P::Scalar> + Default,
Trait Implementations
sourceimpl<'a, P, R, I, A, T, D> System<'a> for NextFrameSetupSystem<P, R, I, A, T, D>where
T: Pose<P, R> + Component + Send + Sync + 'static,
P: EuclideanSpace + Send + Sync + 'static,
P::Scalar: BaseFloat + Send + Sync + 'static,
P::Diff: VectorSpace + InnerSpace + Debug + Send + Sync + 'static,
R: Rotation<P> + ApplyAngular<P::Scalar, A> + Send + Sync + 'static,
I: Inertia<Orientation = R> + Mul<A, Output = A> + Send + Sync + 'static,
A: Mul<P::Scalar, Output = A> + Zero + Clone + Copy + Send + Sync + 'static,
D: PhysicsTime<P::Scalar> + Default + Send + Sync + 'static,
impl<'a, P, R, I, A, T, D> System<'a> for NextFrameSetupSystem<P, R, I, A, T, D>where
T: Pose<P, R> + Component + Send + Sync + 'static,
P: EuclideanSpace + Send + Sync + 'static,
P::Scalar: BaseFloat + Send + Sync + 'static,
P::Diff: VectorSpace + InnerSpace + Debug + Send + Sync + 'static,
R: Rotation<P> + ApplyAngular<P::Scalar, A> + Send + Sync + 'static,
I: Inertia<Orientation = R> + Mul<A, Output = A> + Send + Sync + 'static,
A: Mul<P::Scalar, Output = A> + Zero + Clone + Copy + Send + Sync + 'static,
D: PhysicsTime<P::Scalar> + Default + Send + Sync + 'static,
type SystemData = (Read<'a, D, DefaultProvider>, Read<'a, WorldParameters<<P as EuclideanSpace>::Diff, <P as EuclideanSpace>::Scalar>, DefaultProvider>, Storage<'a, PhysicalEntity<<P as EuclideanSpace>::Scalar>, Fetch<'a, MaskedStorage<PhysicalEntity<<P as EuclideanSpace>::Scalar>>>>, Storage<'a, Mass<<P as EuclideanSpace>::Scalar, I>, Fetch<'a, MaskedStorage<Mass<<P as EuclideanSpace>::Scalar, I>>>>, Storage<'a, NextFrame<Velocity<<P as EuclideanSpace>::Diff, A>>, FetchMut<'a, MaskedStorage<NextFrame<Velocity<<P as EuclideanSpace>::Diff, A>>>>>, Storage<'a, T, Fetch<'a, MaskedStorage<T>>>, Storage<'a, NextFrame<T>, FetchMut<'a, MaskedStorage<NextFrame<T>>>>, Storage<'a, ForceAccumulator<<P as EuclideanSpace>::Diff, A>, FetchMut<'a, MaskedStorage<ForceAccumulator<<P as EuclideanSpace>::Diff, A>>>>)
type SystemData = (Read<'a, D, DefaultProvider>, Read<'a, WorldParameters<<P as EuclideanSpace>::Diff, <P as EuclideanSpace>::Scalar>, DefaultProvider>, Storage<'a, PhysicalEntity<<P as EuclideanSpace>::Scalar>, Fetch<'a, MaskedStorage<PhysicalEntity<<P as EuclideanSpace>::Scalar>>>>, Storage<'a, Mass<<P as EuclideanSpace>::Scalar, I>, Fetch<'a, MaskedStorage<Mass<<P as EuclideanSpace>::Scalar, I>>>>, Storage<'a, NextFrame<Velocity<<P as EuclideanSpace>::Diff, A>>, FetchMut<'a, MaskedStorage<NextFrame<Velocity<<P as EuclideanSpace>::Diff, A>>>>>, Storage<'a, T, Fetch<'a, MaskedStorage<T>>>, Storage<'a, NextFrame<T>, FetchMut<'a, MaskedStorage<NextFrame<T>>>>, Storage<'a, ForceAccumulator<<P as EuclideanSpace>::Diff, A>, FetchMut<'a, MaskedStorage<ForceAccumulator<<P as EuclideanSpace>::Diff, A>>>>)
The resource bundle required to execute this system. Read more
sourcefn run(&mut self, data: Self::SystemData)
fn run(&mut self, data: Self::SystemData)
Executes the system with the required system
data. Read more
sourcefn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTime
Returns a hint how long the system needs for running.
This is used to optimize the way they’re executed (might
allow more parallelization). Read more
sourcefn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the
SystemData
.Auto Trait Implementations
impl<P, R, I, A, T, D> RefUnwindSafe for NextFrameSetupSystem<P, R, I, A, T, D>where
A: RefUnwindSafe,
D: RefUnwindSafe,
I: RefUnwindSafe,
P: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<P, R, I, A, T, D> Send for NextFrameSetupSystem<P, R, I, A, T, D>where
A: Send,
D: Send,
I: Send,
P: Send,
R: Send,
T: Send,
impl<P, R, I, A, T, D> Sync for NextFrameSetupSystem<P, R, I, A, T, D>where
A: Sync,
D: Sync,
I: Sync,
P: Sync,
R: Sync,
T: Sync,
impl<P, R, I, A, T, D> Unpin for NextFrameSetupSystem<P, R, I, A, T, D>where
A: Unpin,
D: Unpin,
I: Unpin,
P: Unpin,
R: Unpin,
T: Unpin,
impl<P, R, I, A, T, D> UnwindSafe for NextFrameSetupSystem<P, R, I, A, T, D>where
A: UnwindSafe,
D: UnwindSafe,
I: UnwindSafe,
P: UnwindSafe,
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
sourcefn run(&mut self, res: &'a Resources, _: &ThreadPool)
fn run(&mut self, res: &'a Resources, _: &ThreadPool)
Runs the system/group of systems. Possibly in parallel depending
on how the structure is set up. Read more