예제 #1
0
        static void EstimateCrushing(cpBody body, cpArbiter arb, ref CrushingContext context)
        {
            cpVect j = arb.TotalImpulse();

            context.magnitudeSum += (float)cpVect.cpvlength(j);
            context.vectorSum     = cpVect.cpvadd(context.vectorSum, j);
        }
예제 #2
0
 public void ScaleIterator(cpBody body, cpArbiter arb, ref cpVect sum)
 {
     sum = cpVect.cpvadd(sum, arb.TotalImpulse());
 }