no need Island collecting! @slipch void dxProcessIslands (dxWorld *world, dReal stepsize, dstepper_fn_t stepper) { dxBody *b,*bb,**body; dxJoint *j,**joint; // nothing to do if no bodies if (world->nb <= 0) return; // handle auto-disabling of bodies dInternalHandleAutoDisabling (world,stepsize); // make arrays for body and joint lists (for a single island) to go into body = (d
| 293 | } |
| 294 | */ |
| 295 | void dxProcessIslands (dxWorld *world, dReal stepsize, dstepper_fn_t stepper) |
| 296 | { |
| 297 | // nothing to do if no bodies |
| 298 | if (world->nb <= 0) |
| 299 | return; |
| 300 | |
| 301 | # ifdef TIMING |
| 302 | dTimerStart ("creating joint and body arrays"); |
| 303 | # endif |
| 304 | dxBody **bodies, *body; |
| 305 | dxJoint **joints, *joint; |
| 306 | joints = (dxJoint **) ALLOCA (world->nj * sizeof (dxJoint *)); |
| 307 | bodies = (dxBody **) ALLOCA (world->nb * sizeof (dxBody *)); |
| 308 | |
| 309 | int nj = 0; |
| 310 | for (joint = world->firstjoint; joint; joint = (dxJoint *) joint->next) |
| 311 | joints[nj++] = joint; |
| 312 | |
| 313 | int nb = 0; |
| 314 | for (body = world->firstbody; body; body = (dxBody *) body->next) |
| 315 | { |
| 316 | body->flags &= ~dxBodyDisabled; |
| 317 | bodies[nb++] = body; |
| 318 | |
| 319 | } |
| 320 | |
| 321 | // now do something with body and joint lists |
| 322 | stepper (world,bodies,nb,joints,nj,stepsize); |
| 323 | //stepper (world,body,bcount,joint,jcount,stepsize); |
| 324 | # ifdef TIMING |
| 325 | dTimerEnd (); |
| 326 | dTimerReport (stdout, 1); |
| 327 | # endif |
| 328 | } |
no test coverage detected