[−][src]Function oxygengine_physics_2d::prelude::solver::helper::constraint_pair_geometry
pub fn constraint_pair_geometry<N, B, H>(
body1: &B,
part1: &(dyn BodyPart<N> + 'static),
handle1: BodyPartHandle<H>,
body2: &B,
part2: &(dyn BodyPart<N> + 'static),
handle2: BodyPartHandle<H>,
center1: &Point<N, U2>,
center2: &Point<N, U2>,
dir: &ForceDirection<N>,
ground_j_id: &mut usize,
j_id: &mut usize,
jacobians: &mut [N],
ext_vels1: Option<&Matrix<N, Dynamic, U1, SliceStorage<N, Dynamic, U1, U1, Dynamic>>>,
ext_vels2: Option<&Matrix<N, Dynamic, U1, SliceStorage<N, Dynamic, U1, U1, Dynamic>>>,
out_vel: Option<&mut N>
) -> ConstraintGeometry<N> where
B: Body<N> + ?Sized,
H: BodyHandle,
N: RealField,
Fills all the jacobians (and the jacobians multiplied by the invers augmented mass matricxs) for a
constraint applying a force at the points center1, center2
and the direction dir
.
If the force is a torque, it is applied at the centers of mass of the body parts. Every input are expressed in world-space.