Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ode/ode-0.9/contrib/BreakableJoints/diff/ode.cpp.diff @ 216

Last change on this file since 216 was 216, checked in by mathiask, 16 years ago

[Physik] add ode-0.9

File size: 1.2 KB
Line 
1212,230d211
2<   /******************** breakable joint contribution ***********************/
3<   dxJoint* nextJ;
4<   if (!world->firstjoint)
5<     nextJ = 0;
6<   else
7<     nextJ = (dxJoint*)world->firstjoint->next;
8<   for (j=world->firstjoint; j; j=nextJ) {
9<       nextJ = (dxJoint*)j->next;
10<       // check if joint is breakable and broken
11<     if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) {
12<               // detach (break) the joint
13<         dJointAttach (j, 0, 0);
14<               // call the callback function if it is set
15<               if (j->breakInfo->callback) j->breakInfo->callback (j);
16<               // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set
17<               if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j);
18<       }
19<   }
20<   /*************************************************************************/
21931,933d911
22<   /******************** breakable joint contribution ***********************/
23<   j->breakInfo = 0;
24<   /*************************************************************************/
251011,1013d988
26<   /******************** breakable joint contribution ***********************/
27<   if (j->breakInfo) delete j->breakInfo;
28<   /*************************************************************************/
Note: See TracBrowser for help on using the repository browser.