[ODE] breakable joints contrib
Vadim Macagon
vadim_mcagon at hotmail.com
Fri Aug 8 17:22:02 2003
This is a multi-part message in MIME format.
------=_NextPart_000_001E_01C35E71.6683E0A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
And at the same time could that someone also add dJointGetBreakMode, patch
attached.
Thanks,
Vadim.
> ----- Original Message -----
> From: "Roel van Dijk" <roelvandijk@home.nl>
> To: <ode@q12.org>
> Sent: Saturday, August 09, 2003 9:16 AM
> Subject: [ODE] breakable joints contrib
>
>
> Hi all,
>
> I've updated the breakable joints contribution to make it work with the
> latest
> version from CVS. I've put the files at:
> http://www.canthonis.nl/admin/BreakableJoints.zip
> or
> ftp://www.canthonis.nl/admin/BreakableJoints.zip
>
> Could someone please commit this to CVS? Thanks!
>
> Roel
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>
------=_NextPart_000_001E_01C35E71.6683E0A0
Content-Type: text/plain;
name="breakable_joints.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="breakable_joints.txt"
Index: contrib/BreakableJoints/objects.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/opende/ode/contrib/BreakableJoints/objects.h,v
retrieving revision 1.2
diff -u -r1.2 objects.h
--- contrib/BreakableJoints/objects.h 3 Jul 2003 05:23:15 -0000 1.2
+++ contrib/BreakableJoints/objects.h 7 Aug 2003 08:40:14 -0000
@@ -147,6 +147,7 @@
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);
Index: contrib/BreakableJoints/joint.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/opende/ode/contrib/BreakableJoints/joint.cpp,v
retrieving revision 1.2
diff -u -r1.2 joint.cpp
--- contrib/BreakableJoints/joint.cpp 3 Jul 2003 05:23:15 -0000 1.2
+++ contrib/BreakableJoints/joint.cpp 7 Aug 2003 08:40:18 -0000
@@ -2332,6 +2332,17 @@
joint->breakInfo->flags =3D mode;
}
=20
+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
------=_NextPart_000_001E_01C35E71.6683E0A0--