pub fn next_frame_integration<'a, T, D, P, A, I, R>(
    data: D,
    world_params: &WorldParameters<P::Diff, P::Scalar>,
    dt: P::Scalar
)where
    D: Iterator<Item = (&'a mut NextFrame<Velocity<P::Diff, A>>, &'a NextFrame<T>, &'a mut ForceAccumulator<P::Diff, A>, &'a Mass<P::Scalar, I>, &'a PhysicalEntity<P::Scalar>)>,
    T: 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,
Expand description

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
    • PhysicalEntity, used for gravity and damping calculation
  • world_params: World physics parameters like gravity and global damping
  • 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