pub fn resolve_contact<'a, B, P, R, I, A, O>(
    contact: &Contact<P>,
    a: &ResolveData<'a, B, P, R, I, A>,
    b: &ResolveData<'a, B, P, R, I, A>
) -> (SingleChangeSet<B, P, R, A>, SingleChangeSet<B, P, R, A>)where
    P: EuclideanSpace + 'a,
    P::Scalar: BaseFloat,
    R: Rotation<P> + 'a,
    P::Diff: Debug + Zero + Clone + InnerSpace + PartialCrossProduct<P::Diff, Output = O>,
    O: PartialCrossProduct<P::Diff, Output = P::Diff>,
    A: PartialCrossProduct<P::Diff, Output = P::Diff> + Clone + Zero + 'a,
    &'a A: Sub<O, Output = A> + Add<O, Output = A>,
    I: Inertia<Orientation = R> + Mul<O, Output = O>,
    B: Pose<P, R> + 'a,
Expand description

Perform contact resolution.

Will compute any new poses and/or velocities, by doing impulse resolution of the given contact.

Parameters:

  • contact: The contact; contact normal must point from shape A -> B
  • a: Resolution data for shape A
  • b: Resolution data for shape B

Returns

Tuple of change sets, first change set is for shape A, second change set for shape B.

Type parameters:

  • B: Transform type (BodyPose3 or similar)
  • P: Point type, usually Point2 or Point3
  • R: Rotational quantity, usually Basis2 or Quaternion
  • A: Angular velocity, usually Scalar or Vector3
  • I: Inertia, usually Scalar or Matrix3
  • O: Internal type used for unifying cross products for 2D/3D, usually Scalar or Vector3