From 2f8d7092bc2c9609fa98d6888106b96f38b22828 Mon Sep 17 00:00:00 2001 From: dan miller Date: Sun, 21 Oct 2007 08:36:32 +0000 Subject: libraries moved to opensim-libs, a new repository --- .../contrib/BreakableJoints/diff/common.h.diff | 21 --- .../contrib/BreakableJoints/diff/joint.cpp.diff | 148 --------------------- .../contrib/BreakableJoints/diff/joint.h.diff | 18 --- .../contrib/BreakableJoints/diff/objects.h.diff | 13 -- .../contrib/BreakableJoints/diff/ode.cpp.diff | 28 ---- .../contrib/BreakableJoints/diff/step.cpp.diff | 130 ------------------ .../contrib/BreakableJoints/diff/stepfast.cpp.diff | 143 -------------------- .../BreakableJoints/diff/test_buggy.cpp.diff | 16 --- 8 files changed, 517 deletions(-) delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/common.h.diff delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/joint.cpp.diff delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/joint.h.diff delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/objects.h.diff delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/ode.cpp.diff delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/step.cpp.diff delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/stepfast.cpp.diff delete mode 100644 libraries/ode-0.9/contrib/BreakableJoints/diff/test_buggy.cpp.diff (limited to 'libraries/ode-0.9/contrib/BreakableJoints/diff') diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/common.h.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/common.h.diff deleted file mode 100644 index 24415a1..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/common.h.diff +++ /dev/null @@ -1,21 +0,0 @@ -208,227d207 -< /******************** breakable joint contribution ***********************/ -< /* joint break callback function */ -< typedef void dJointBreakCallback (dJointID joint); -< -< /* joint break modes */ -< enum { -< // if this flag is set, the joint wil break -< dJOINT_BROKEN = 0x0001, -< // if this flag is set, the joint wil be deleted when it breaks -< dJOINT_DELETE_ON_BREAK = 0x0002, -< // if this flag is set, the joint can break at a certain force on body 1 -< dJOINT_BREAK_AT_B1_FORCE = 0x0004, -< // if this flag is set, the joint can break at a certain torque on body 1 -< dJOINT_BREAK_AT_B1_TORQUE = 0x0008, -< // if this flag is set, the joint can break at a certain force on body 2 -< dJOINT_BREAK_AT_B2_FORCE = 0x0010, -< // if this flag is set, the joint can break at a certain torque on body 2 -< dJOINT_BREAK_AT_B2_TORQUE = 0x0020 -< }; -< /*************************************************************************/ diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/joint.cpp.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/joint.cpp.diff deleted file mode 100644 index 80397f0..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/joint.cpp.diff +++ /dev/null @@ -1,148 +0,0 @@ -2659,2804d2658 -< -< /******************** breakable joint contribution ***********************/ -< extern "C" void dJointSetBreakable (dxJoint *joint, int b) { -< dAASSERT(joint); -< if (b) { -< // we want this joint to be breakable but we must first check if it -< // was already breakable -< if (!joint->breakInfo) { -< // allocate a dxJointBreakInfo struct -< joint->breakInfo = new dxJointBreakInfo; -< joint->breakInfo->flags = 0; -< for (int i = 0; i < 3; i++) { -< joint->breakInfo->b1MaxF[0] = 0; -< joint->breakInfo->b1MaxT[0] = 0; -< joint->breakInfo->b2MaxF[0] = 0; -< joint->breakInfo->b2MaxT[0] = 0; -< } -< joint->breakInfo->callback = 0; -< } -< else { -< // the joint was already breakable -< return; -< } -< } -< else { -< // we want this joint to be unbreakable mut we must first check if -< // it is alreay unbreakable -< if (joint->breakInfo) { -< // deallocate the dxJointBreakInfo struct -< delete joint->breakInfo; -< joint->breakInfo = 0; -< } -< else { -< // the joint was already unbreakable -< return; -< } -< } -< } -< -< extern "C" void dJointSetBreakCallback (dxJoint *joint, dJointBreakCallback *callbackFunc) { -< dAASSERT(joint); -< # ifndef dNODEBUG -< // only works for a breakable joint -< if (!joint->breakInfo) { -< dDebug (0, "dJointSetBreakCallback called on unbreakable joint"); -< } -< # endif -< joint->breakInfo->callback = callbackFunc; -< } -< -< extern "C" void dJointSetBreakMode (dxJoint *joint, int mode) { -< dAASSERT(joint); -< # ifndef dNODEBUG -< // only works for a breakable joint -< if (!joint->breakInfo) { -< dDebug (0, "dJointSetBreakMode called on unbreakable joint"); -< } -< # endif -< joint->breakInfo->flags = mode; -< } -< -< extern "C" int dJointGetBreakMode (dxJoint *joint) { -< dAASSERT(joint); -< # ifndef dNODEBUG -< // only works for a breakable joint -< if (!joint->breakInfo) { -< dDebug (0, "dJointGetBreakMode called on unbreakable joint"); -< } -< # endif -< return joint->breakInfo->flags; -< } -< -< extern "C" void dJointSetBreakForce (dxJoint *joint, int body, dReal x, dReal y, dReal z) { -< dAASSERT(joint); -< # ifndef dNODEBUG -< // only works for a breakable joint -< if (!joint->breakInfo) { -< dDebug (0, "dJointSetBreakForce called on unbreakable joint"); -< } -< # endif -< if (body) { -< joint->breakInfo->b2MaxF[0] = x; -< joint->breakInfo->b2MaxF[1] = y; -< joint->breakInfo->b2MaxF[2] = z; -< } -< else { -< joint->breakInfo->b1MaxF[0] = x; -< joint->breakInfo->b1MaxF[1] = y; -< joint->breakInfo->b1MaxF[2] = z; -< } -< } -< -< extern "C" void dJointSetBreakTorque (dxJoint *joint, int body, dReal x, dReal y, dReal z) { -< dAASSERT(joint); -< # ifndef dNODEBUG -< // only works for a breakable joint -< if (!joint->breakInfo) { -< dDebug (0, "dJointSetBreakTorque called on unbreakable joint"); -< } -< # endif -< if (body) { -< joint->breakInfo->b2MaxT[0] = x; -< joint->breakInfo->b2MaxT[1] = y; -< joint->breakInfo->b2MaxT[2] = z; -< } -< else { -< joint->breakInfo->b1MaxT[0] = x; -< joint->breakInfo->b1MaxT[1] = y; -< joint->breakInfo->b1MaxT[2] = z; -< } -< } -< -< extern "C" int dJointIsBreakable (dxJoint *joint) { -< dAASSERT(joint); -< return joint->breakInfo != 0; -< } -< -< extern "C" void dJointGetBreakForce (dxJoint *joint, int body, dReal *force) { -< dAASSERT(joint); -< # ifndef dNODEBUG -< // only works for a breakable joint -< if (!joint->breakInfo) { -< dDebug (0, "dJointGetBreakForce called on unbreakable joint"); -< } -< # endif -< if (body) -< for (int i=0; i<3; i++) force[i]=joint->breakInfo->b2MaxF[i]; -< else -< for (int i=0; i<3; i++) force[i]=joint->breakInfo->b1MaxF[i]; -< } -< -< extern "C" void dJointGetBreakTorque (dxJoint *joint, int body, dReal *torque) { -< dAASSERT(joint); -< # ifndef dNODEBUG -< // only works for a breakable joint -< if (!joint->breakInfo) { -< dDebug (0, "dJointGetBreakTorque called on unbreakable joint"); -< } -< # endif -< if (body) -< for (int i=0; i<3; i++) torque[i]=joint->breakInfo->b2MaxT[i]; -< else -< for (int i=0; i<3; i++) torque[i]=joint->breakInfo->b1MaxT[i]; -< } -< /*************************************************************************/ -< -\ No newline at end of file diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/joint.h.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/joint.h.diff deleted file mode 100644 index eed3c24..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/joint.h.diff +++ /dev/null @@ -1,18 +0,0 @@ -61,70d60 -< /******************** breakable joint contribution ***********************/ -< struct dxJointBreakInfo : public dBase { -< int flags; -< dReal b1MaxF[3]; // maximum force on body 1 -< dReal b1MaxT[3]; // maximum torque on body 1 -< dReal b2MaxF[3]; // maximum force on body 2 -< dReal b2MaxT[3]; // maximum torque on body 2 -< dJointBreakCallback *callback; // function that is called when this joint breaks -< }; -< /*************************************************************************/ -135,140d124 -< -< /******************** breakable joint contribution ***********************/ -< // optional break info structure. if this is not NULL the the joint is -< // breakable. -< dxJointBreakInfo *breakInfo; -< /*************************************************************************/ diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/objects.h.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/objects.h.diff deleted file mode 100644 index fd2129e..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/objects.h.diff +++ /dev/null @@ -1,13 +0,0 @@ -168,179d167 -< /******************** breakable joint contribution ***********************/ -< void dJointSetBreakable (dJointID, int b); -< void dJointSetBreakCallback (dJointID, dJointBreakCallback *callbackFunc); -< void dJointSetBreakMode (dJointID, int mode); -< int dJointGetBreakMode (dJointID); -< void dJointSetBreakForce (dJointID, int body, dReal x, dReal y, dReal z); -< void dJointSetBreakTorque (dJointID, int body, dReal x, dReal y, dReal z); -< int dJointIsBreakable (dJointID); -< void dJointGetBreakForce (dJointID, int body, dReal *force); -< void dJointGetBreakTorque (dJointID, int body, dReal *torque); -< /*************************************************************************/ -< diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/ode.cpp.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/ode.cpp.diff deleted file mode 100644 index 761b7be..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/ode.cpp.diff +++ /dev/null @@ -1,28 +0,0 @@ -212,230d211 -< /******************** breakable joint contribution ***********************/ -< dxJoint* nextJ; -< if (!world->firstjoint) -< nextJ = 0; -< else -< nextJ = (dxJoint*)world->firstjoint->next; -< for (j=world->firstjoint; j; j=nextJ) { -< nextJ = (dxJoint*)j->next; -< // check if joint is breakable and broken -< if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) { -< // detach (break) the joint -< dJointAttach (j, 0, 0); -< // call the callback function if it is set -< if (j->breakInfo->callback) j->breakInfo->callback (j); -< // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set -< if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j); -< } -< } -< /*************************************************************************/ -931,933d911 -< /******************** breakable joint contribution ***********************/ -< j->breakInfo = 0; -< /*************************************************************************/ -1011,1013d988 -< /******************** breakable joint contribution ***********************/ -< if (j->breakInfo) delete j->breakInfo; -< /*************************************************************************/ diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/step.cpp.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/step.cpp.diff deleted file mode 100644 index dfc8c2f..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/step.cpp.diff +++ /dev/null @@ -1,130 +0,0 @@ -966,1066c966,989 -< /******************** breakable joint contribution ***********************/ -< // this saves us a few dereferences -< dxJointBreakInfo *jBI = joint[i]->breakInfo; -< // we need joint feedback if the joint is breakable or if the user -< // requested feedback. -< if (jBI||fb) { -< // we need feedback on the amount of force that this joint is -< // applying to the bodies. we use a slightly slower computation -< // that splits out the force components and puts them in the -< // feedback structure. -< dJointFeedback temp_fb; // temporary storage for joint feedback -< dReal data1[8],data2[8]; -< Multiply1_8q1 (data1, JJ, lambda+ofs[i], info[i].m); -< dReal *cf1 = cforce + 8*b1->tag; -< cf1[0] += (temp_fb.f1[0] = data1[0]); -< cf1[1] += (temp_fb.f1[1] = data1[1]); -< cf1[2] += (temp_fb.f1[2] = data1[2]); -< cf1[4] += (temp_fb.t1[0] = data1[4]); -< cf1[5] += (temp_fb.t1[1] = data1[5]); -< cf1[6] += (temp_fb.t1[2] = data1[6]); -< if (b2) { -< Multiply1_8q1 (data2, JJ + 8*info[i].m, lambda+ofs[i], info[i].m); -< dReal *cf2 = cforce + 8*b2->tag; -< cf2[0] += (temp_fb.f2[0] = data2[0]); -< cf2[1] += (temp_fb.f2[1] = data2[1]); -< cf2[2] += (temp_fb.f2[2] = data2[2]); -< cf2[4] += (temp_fb.t2[0] = data2[4]); -< cf2[5] += (temp_fb.t2[1] = data2[5]); -< cf2[6] += (temp_fb.t2[2] = data2[6]); -< } -< // if the user requested so we must copy the feedback information to -< // the feedback struct that the user suplied. -< if (fb) { -< // copy temp_fb to fb -< fb->f1[0] = temp_fb.f1[0]; -< fb->f1[1] = temp_fb.f1[1]; -< fb->f1[2] = temp_fb.f1[2]; -< fb->t1[0] = temp_fb.t1[0]; -< fb->t1[1] = temp_fb.t1[1]; -< fb->t1[2] = temp_fb.t1[2]; -< if (b2) { -< fb->f2[0] = temp_fb.f2[0]; -< fb->f2[1] = temp_fb.f2[1]; -< fb->f2[2] = temp_fb.f2[2]; -< fb->t2[0] = temp_fb.t2[0]; -< fb->t2[1] = temp_fb.t2[1]; -< fb->t2[2] = temp_fb.t2[2]; -< } -< } -< // if the joint is breakable we need to check the breaking conditions -< if (jBI) { -< dReal relCF1[3]; -< dReal relCT1[3]; -< // multiply the force and torque vectors by the rotation matrix of body 1 -< dMULTIPLY1_331 (&relCF1[0],b1->R,&temp_fb.f1[0]); -< dMULTIPLY1_331 (&relCT1[0],b1->R,&temp_fb.t1[0]); -< if (jBI->flags & dJOINT_BREAK_AT_B1_FORCE) { -< // check if the force is to high -< for (int i = 0; i < 3; i++) { -< if (relCF1[i] > jBI->b1MaxF[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< if (jBI->flags & dJOINT_BREAK_AT_B1_TORQUE) { -< // check if the torque is to high -< for (int i = 0; i < 3; i++) { -< if (relCT1[i] > jBI->b1MaxT[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< if (b2) { -< dReal relCF2[3]; -< dReal relCT2[3]; -< // multiply the force and torque vectors by the rotation matrix of body 2 -< dMULTIPLY1_331 (&relCF2[0],b2->R,&temp_fb.f2[0]); -< dMULTIPLY1_331 (&relCT2[0],b2->R,&temp_fb.t2[0]); -< if (jBI->flags & dJOINT_BREAK_AT_B2_FORCE) { -< // check if the force is to high -< for (int i = 0; i < 3; i++) { -< if (relCF2[i] > jBI->b2MaxF[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< if (jBI->flags & dJOINT_BREAK_AT_B2_TORQUE) { -< // check if the torque is to high -< for (int i = 0; i < 3; i++) { -< if (relCT2[i] > jBI->b2MaxT[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< } -< doneCheckingBreaks: -< ; ---- -> if (fb) { -> // the user has requested feedback on the amount of force that this -> // joint is applying to the bodies. we use a slightly slower -> // computation that splits out the force components and puts them -> // in the feedback structure. -> dReal data1[8],data2[8]; -> Multiply1_8q1 (data1, JJ, lambda+ofs[i], info[i].m); -> dReal *cf1 = cforce + 8*b1->tag; -> cf1[0] += (fb->f1[0] = data1[0]); -> cf1[1] += (fb->f1[1] = data1[1]); -> cf1[2] += (fb->f1[2] = data1[2]); -> cf1[4] += (fb->t1[0] = data1[4]); -> cf1[5] += (fb->t1[1] = data1[5]); -> cf1[6] += (fb->t1[2] = data1[6]); -> if (b2){ -> Multiply1_8q1 (data2, JJ + 8*info[i].m, lambda+ofs[i], info[i].m); -> dReal *cf2 = cforce + 8*b2->tag; -> cf2[0] += (fb->f2[0] = data2[0]); -> cf2[1] += (fb->f2[1] = data2[1]); -> cf2[2] += (fb->f2[2] = data2[2]); -> cf2[4] += (fb->t2[0] = data2[4]); -> cf2[5] += (fb->t2[1] = data2[5]); -> cf2[6] += (fb->t2[2] = data2[6]); -> } -1068,1069d990 -< } -< /*************************************************************************/ diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/stepfast.cpp.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/stepfast.cpp.diff deleted file mode 100644 index ed64cba..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/stepfast.cpp.diff +++ /dev/null @@ -1,143 +0,0 @@ -587,598c587,593 -< /******************** breakable joint contribution ***********************/ -< // this saves us a few dereferences -< dxJointBreakInfo *jBI = joint->breakInfo; -< // we need joint feedback if the joint is breakable or if the user -< // requested feedback. -< if (jBI||fb) { -< // we need feedback on the amount of force that this joint is -< // applying to the bodies. we use a slightly slower computation -< // that splits out the force components and puts them in the -< // feedback structure. -< dJointFeedback temp_fb; // temporary storage for joint feedback -< dReal data1[8],data2[8]; ---- -> if (fb) -> { -> // the user has requested feedback on the amount of force that this -> // joint is applying to the bodies. we use a slightly slower -> // computation that splits out the force components and puts them -> // in the feedback structure. -> dReal data1[8], data2[8]; -603,608c598,603 -< cf1[0] = (temp_fb.f1[0] = data1[0]); -< cf1[1] = (temp_fb.f1[1] = data1[1]); -< cf1[2] = (temp_fb.f1[2] = data1[2]); -< cf1[4] = (temp_fb.t1[0] = data1[4]); -< cf1[5] = (temp_fb.t1[1] = data1[5]); -< cf1[6] = (temp_fb.t1[2] = data1[6]); ---- -> cf1[0] = (fb->f1[0] = data1[0]); -> cf1[1] = (fb->f1[1] = data1[1]); -> cf1[2] = (fb->f1[2] = data1[2]); -> cf1[4] = (fb->t1[0] = data1[4]); -> cf1[5] = (fb->t1[1] = data1[5]); -> cf1[6] = (fb->t1[2] = data1[6]); -614,691c609,614 -< cf2[0] = (temp_fb.f2[0] = data2[0]); -< cf2[1] = (temp_fb.f2[1] = data2[1]); -< cf2[2] = (temp_fb.f2[2] = data2[2]); -< cf2[4] = (temp_fb.t2[0] = data2[4]); -< cf2[5] = (temp_fb.t2[1] = data2[5]); -< cf2[6] = (temp_fb.t2[2] = data2[6]); -< } -< // if the user requested so we must copy the feedback information to -< // the feedback struct that the user suplied. -< if (fb) { -< // copy temp_fb to fb -< fb->f1[0] = temp_fb.f1[0]; -< fb->f1[1] = temp_fb.f1[1]; -< fb->f1[2] = temp_fb.f1[2]; -< fb->t1[0] = temp_fb.t1[0]; -< fb->t1[1] = temp_fb.t1[1]; -< fb->t1[2] = temp_fb.t1[2]; -< if (body[1]) { -< fb->f2[0] = temp_fb.f2[0]; -< fb->f2[1] = temp_fb.f2[1]; -< fb->f2[2] = temp_fb.f2[2]; -< fb->t2[0] = temp_fb.t2[0]; -< fb->t2[1] = temp_fb.t2[1]; -< fb->t2[2] = temp_fb.t2[2]; -< } -< } -< // if the joint is breakable we need to check the breaking conditions -< if (jBI) { -< dReal relCF1[3]; -< dReal relCT1[3]; -< // multiply the force and torque vectors by the rotation matrix of body 1 -< dMULTIPLY1_331 (&relCF1[0],body[0]->R,&temp_fb.f1[0]); -< dMULTIPLY1_331 (&relCT1[0],body[0]->R,&temp_fb.t1[0]); -< if (jBI->flags & dJOINT_BREAK_AT_B1_FORCE) { -< // check if the force is to high -< for (int i = 0; i < 3; i++) { -< if (relCF1[i] > jBI->b1MaxF[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< if (jBI->flags & dJOINT_BREAK_AT_B1_TORQUE) { -< // check if the torque is to high -< for (int i = 0; i < 3; i++) { -< if (relCT1[i] > jBI->b1MaxT[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< if (body[1]) { -< dReal relCF2[3]; -< dReal relCT2[3]; -< // multiply the force and torque vectors by the rotation matrix of body 2 -< dMULTIPLY1_331 (&relCF2[0],body[1]->R,&temp_fb.f2[0]); -< dMULTIPLY1_331 (&relCT2[0],body[1]->R,&temp_fb.t2[0]); -< if (jBI->flags & dJOINT_BREAK_AT_B2_FORCE) { -< // check if the force is to high -< for (int i = 0; i < 3; i++) { -< if (relCF2[i] > jBI->b2MaxF[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< if (jBI->flags & dJOINT_BREAK_AT_B2_TORQUE) { -< // check if the torque is to high -< for (int i = 0; i < 3; i++) { -< if (relCT2[i] > jBI->b2MaxT[i]) { -< jBI->flags |= dJOINT_BROKEN; -< goto doneCheckingBreaks; -< } -< } -< } -< } -< doneCheckingBreaks: -< ; ---- -> cf2[0] = (fb->f2[0] = data2[0]); -> cf2[1] = (fb->f2[1] = data2[1]); -> cf2[2] = (fb->f2[2] = data2[2]); -> cf2[4] = (fb->t2[0] = data2[4]); -> cf2[5] = (fb->t2[1] = data2[5]); -> cf2[6] = (fb->t2[2] = data2[6]); -694d616 -< /*************************************************************************/ -1178,1196d1099 -< /******************** breakable joint contribution ***********************/ -< dxJoint* nextJ; -< if (!world->firstjoint) -< nextJ = 0; -< else -< nextJ = (dxJoint*)world->firstjoint->next; -< for (j=world->firstjoint; j; j=nextJ) { -< nextJ = (dxJoint*)j->next; -< // check if joint is breakable and broken -< if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) { -< // detach (break) the joint -< dJointAttach (j, 0, 0); -< // call the callback function if it is set -< if (j->breakInfo->callback) j->breakInfo->callback (j); -< // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set -< if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j); -< } -< } -< /*************************************************************************/ diff --git a/libraries/ode-0.9/contrib/BreakableJoints/diff/test_buggy.cpp.diff b/libraries/ode-0.9/contrib/BreakableJoints/diff/test_buggy.cpp.diff deleted file mode 100644 index 65770da..0000000 --- a/libraries/ode-0.9/contrib/BreakableJoints/diff/test_buggy.cpp.diff +++ /dev/null @@ -1,16 +0,0 @@ -266,270d265 -< -< // breakable joints contribution -< dJointSetBreakable (joint[i], 1); -< dJointSetBreakMode (joint[i], dJOINT_BREAK_AT_FORCE); -< dJointSetBreakForce (joint[i], 0.5); -298c293 -< ground_box = dCreateBox (space,2,1.5,5); ---- -> ground_box = dCreateBox (space,2,1.5,1); -300,301c295,296 -< dRFromAxisAndAngle (R,0,1,0,-0.85); -< dGeomSetPosition (ground_box,5,0,-1); ---- -> dRFromAxisAndAngle (R,0,1,0,-0.15); -> dGeomSetPosition (ground_box,2,0,-0.34); -- cgit v1.1