Function rhusics_core::next_frame_integration[][src]

pub fn next_frame_integration<'a, B, D, P, A, I, R>(data: D, dt: P::Scalar) where
    D: Iterator<Item = (&'a mut NextFrame<Velocity<P::Diff, A>>, &'a NextFrame<B>, &'a mut ForceAccumulator<P::Diff, A>, &'a Mass<P::Scalar, I>)>,
    B: Pose<P, R> + 'a,
    P: EuclideanSpace + 'a,
    P::Scalar: BaseFloat,
    P::Diff: VectorSpace + InnerSpace + 'a,
    I: Inertia<Orientation = R> + Mul<A, Output = A> + 'a,
    A: Mul<P::Scalar, Output = A> + Clone + Copy + Zero + 'a,
    R: Rotation<P> + ApplyAngular<P::Scalar, A> + 'a, 

Do force integration for next frame.

Parameters:

  • data: Iterator over tuple with:
    • Velocity for the next frame, will be updated
    • Pose for the next frame, used to compute the inertia tensor for the body in the next frame
    • Force accumulator, will be consumed and added to the velocity
    • Mass, used by integration
  • dt: Time step

Type parameters:

  • D: Iterator type
  • P: Point, usually Point2 or Point3
  • A: Angular velocity, usually Scalar or Vector3
  • I: Inertia, usually Scalar or Matrix3
  • R: Rotational quantity, usually Basis2 or Quaternion