Struct rhusics_ecs::ContactResolutionSystem
[−]
[src]
pub struct ContactResolutionSystem<P, R, I, A, O> where
P: EuclideanSpace,
P::Diff: Debug, { /* fields omitted */ }
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
System function
fn(EventChannel<ContactEvent>, Mass, RigidBody, BodyPose, NextFrame<Velocity>, NextFrame<BodyPose>) -> (NextFrame<Velocity>, NextFrame<BodyPose>)
Methods
impl<P, R, I, A, O> ContactResolutionSystem<P, R, I, A, O> where
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,
&'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O>,
[src]
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,
&'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O>,
pub fn new(contact_reader: ReaderId<ContactEvent<Entity, P>>) -> Self
[src]
Create system.
Trait Implementations
impl<'a, P, R, I, A, O> System<'a> for ContactResolutionSystem<P, R, I, A, O> where
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,
&'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O> + Send + Sync + 'static,
[src]
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,
&'b A: Sub<O, Output = A> + Add<O, Output = A>,
I: Inertia<Orientation = R> + Mul<O, Output = O> + Send + Sync + 'static,
type SystemData = (Fetch<'a, EventChannel<ContactEvent<Entity, P>>>, ReadStorage<'a, Mass<P::Scalar, I>>, ReadStorage<'a, RigidBody<P::Scalar>>, WriteStorage<'a, NextFrame<Velocity<P::Diff, A>>>, ReadStorage<'a, BodyPose<P, R>>, WriteStorage<'a, NextFrame<BodyPose<P, R>>>)
The resource bundle required to execute this system. Read more
fn run(&mut self, data: Self::SystemData)
[src]
Executes the system with the required system data. Read more
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
Auto Trait Implementations
impl<P, R, I, A, O> Send for ContactResolutionSystem<P, R, I, A, O> where
A: Send,
I: Send,
O: Send,
P: Send,
R: Send,
<P as EuclideanSpace>::Diff: Send,
<P as EuclideanSpace>::Scalar: Send,
A: Send,
I: Send,
O: Send,
P: Send,
R: Send,
<P as EuclideanSpace>::Diff: Send,
<P as EuclideanSpace>::Scalar: Send,
impl<P, R, I, A, O> Sync for ContactResolutionSystem<P, R, I, A, O> where
A: Sync,
I: Sync,
O: Sync,
P: Sync,
R: Sync,
<P as EuclideanSpace>::Diff: Sync,
<P as EuclideanSpace>::Scalar: Sync,
A: Sync,
I: Sync,
O: Sync,
P: Sync,
R: Sync,
<P as EuclideanSpace>::Diff: Sync,
<P as EuclideanSpace>::Scalar: Sync,