Struct rhusics_ecs::ContactResolutionSystem
source · pub struct ContactResolutionSystem<P, R, I, A, O, T>where
P: EuclideanSpace + 'static,
P::Diff: Debug,{ /* private fields */ }
Expand description
Do single contact, forward resolution.
Type parameters:
P
: Positional quantity, usuallyPoint2
orPoint3
R
: Rotational quantity, usuallyBasis2
orQuaternion
I
: Inertia, usuallyScalar
orMatrix3
A
: Angular velocity, usuallyScalar
orVector3
O
: Internal type used for abstracting over cross products in 2D/3D, usuallyScalar
orVector3
T
: Transform type (BodyPose2
or similar)
System function
fn(EventChannel<ContactEvent>, Mass, PhysicalEntity, T, NextFrame<Velocity>, NextFrame<T>) -> (NextFrame<Velocity>, NextFrame<T>)
Implementations
sourceimpl<P, R, I, A, O, T> ContactResolutionSystem<P, R, I, A, O, T>where
T: Pose<P, R>,
P: EuclideanSpace,
P::Scalar: BaseFloat,
P::Diff: VectorSpace + InnerSpace + Debug + PartialCrossProduct<P::Diff, Output = O>,
R: Rotation<P> + ApplyAngular<P::Scalar, A>,
O: PartialCrossProduct<P::Diff, Output = P::Diff>,
A: PartialCrossProduct<P::Diff, Output = P::Diff> + Clone + Zero,
for<'b> &'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O>,
impl<P, R, I, A, O, T> ContactResolutionSystem<P, R, I, A, O, T>where
T: Pose<P, R>,
P: EuclideanSpace,
P::Scalar: BaseFloat,
P::Diff: VectorSpace + InnerSpace + Debug + PartialCrossProduct<P::Diff, Output = O>,
R: Rotation<P> + ApplyAngular<P::Scalar, A>,
O: PartialCrossProduct<P::Diff, Output = P::Diff>,
A: PartialCrossProduct<P::Diff, Output = P::Diff> + Clone + Zero,
for<'b> &'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O>,
Trait Implementations
sourceimpl<'a, P, R, I, A, O, T> System<'a> for ContactResolutionSystem<P, R, I, A, O, T>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 + PartialCrossProduct<P::Diff, Output = O>,
R: Rotation<P> + ApplyAngular<P::Scalar, A> + Send + Sync + 'static,
O: PartialCrossProduct<P::Diff, Output = P::Diff>,
A: PartialCrossProduct<P::Diff, Output = P::Diff> + Clone + Zero + Send + Sync + 'static,
for<'b> &'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O> + Send + Sync + 'static,
impl<'a, P, R, I, A, O, T> System<'a> for ContactResolutionSystem<P, R, I, A, O, T>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 + PartialCrossProduct<P::Diff, Output = O>,
R: Rotation<P> + ApplyAngular<P::Scalar, A> + Send + Sync + 'static,
O: PartialCrossProduct<P::Diff, Output = P::Diff>,
A: PartialCrossProduct<P::Diff, Output = P::Diff> + Clone + Zero + Send + Sync + 'static,
for<'b> &'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O> + Send + Sync + 'static,
type SystemData = (Read<'a, EventChannel<ContactEvent<Entity, P>>, DefaultProvider>, Storage<'a, Mass<<P as EuclideanSpace>::Scalar, I>, Fetch<'a, MaskedStorage<Mass<<P as EuclideanSpace>::Scalar, I>>>>, Storage<'a, PhysicalEntity<<P as EuclideanSpace>::Scalar>, Fetch<'a, MaskedStorage<PhysicalEntity<<P as EuclideanSpace>::Scalar>>>>, 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>>>>)
type SystemData = (Read<'a, EventChannel<ContactEvent<Entity, P>>, DefaultProvider>, Storage<'a, Mass<<P as EuclideanSpace>::Scalar, I>, Fetch<'a, MaskedStorage<Mass<<P as EuclideanSpace>::Scalar, I>>>>, Storage<'a, PhysicalEntity<<P as EuclideanSpace>::Scalar>, Fetch<'a, MaskedStorage<PhysicalEntity<<P as EuclideanSpace>::Scalar>>>>, 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>>>>)
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, O, T> !RefUnwindSafe for ContactResolutionSystem<P, R, I, A, O, T>
impl<P, R, I, A, O, T> Send for ContactResolutionSystem<P, R, I, A, O, T>where
A: Send,
I: Send,
O: Send,
P: Sync,
R: Send,
T: Send,
<P as EuclideanSpace>::Diff: Sync,
<P as EuclideanSpace>::Scalar: Sync,
impl<P, R, I, A, O, T> Sync for ContactResolutionSystem<P, R, I, A, O, T>where
A: Sync,
I: Sync,
O: Sync,
P: Sync,
R: Sync,
T: Sync,
<P as EuclideanSpace>::Diff: Sync,
<P as EuclideanSpace>::Scalar: Sync,
impl<P, R, I, A, O, T> Unpin for ContactResolutionSystem<P, R, I, A, O, T>where
A: Unpin,
I: Unpin,
O: Unpin,
R: Unpin,
T: Unpin,
impl<P, R, I, A, O, T> !UnwindSafe for ContactResolutionSystem<P, R, I, A, O, T>
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