From: <klo...@us...> - 2011-12-30 13:42:01
|
Revision: 1858 http://opende.svn.sourceforge.net/opende/?rev=1858&view=rev Author: klompjeg Date: 2011-12-30 13:41:55 +0000 (Fri, 30 Dec 2011) Log Message: ----------- Added support for enabling and disabling joints. Modified Paths: -------------- trunk/bindings/python/ode.pxd trunk/bindings/python/ode.pyx Modified: trunk/bindings/python/ode.pxd =================================================================== --- trunk/bindings/python/ode.pxd 2011-12-19 22:07:23 UTC (rev 1857) +++ trunk/bindings/python/ode.pxd 2011-12-30 13:41:55 UTC (rev 1858) @@ -232,6 +232,10 @@ void dJointDestroy (dJointID) + void dJointEnable (dJointID) + void dJointDisable (dJointID) + int dJointIsEnabled (dJointID) + dJointGroupID dJointGroupCreate (int max_size) void dJointGroupDestroy (dJointGroupID) void dJointGroupEmpty (dJointGroupID) Modified: trunk/bindings/python/ode.pyx =================================================================== --- trunk/bindings/python/ode.pyx 2011-12-19 22:07:23 UTC (rev 1857) +++ trunk/bindings/python/ode.pyx 2011-12-30 13:41:55 UTC (rev 1858) @@ -1826,6 +1826,36 @@ """ self.jid = NULL + # enable + def enable(self): + """enable() + + Enable the joint. Disabled joints are completely ignored during the + simulation. Disabled joints don't lose the already computed information + like anchors and axes. + """ + dJointEnable(self.jid) + + # disable + def disable(self): + """disable() + + Disable the joint. Disabled joints are completely ignored during the + simulation. Disabled joints don't lose the already computed information + like anchors and axes. + """ + dJointDisable(self.jid) + + # isEnabled + def isEnabled(self): + """isEnabled() -> bool + + Determine whether the joint is enabled. Disabled joints are completely + ignored during the simulation. Disabled joints don't lose the already + computed information like anchors and axes. + """ + return dJointIsEnabled(self.jid) + # attach def attach(self, Body body1, Body body2): """attach(body1, body2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <klo...@us...> - 2012-03-05 21:34:46
|
Revision: 1871 http://opende.svn.sourceforge.net/opende/?rev=1871&view=rev Author: klompjeg Date: 2012-03-05 21:34:40 +0000 (Mon, 05 Mar 2012) Log Message: ----------- Added Python binding for 'dGeomClearOffset' through Python geom object method 'clearOffset()'. Modified Paths: -------------- trunk/bindings/python/ode.pxd trunk/bindings/python/ode.pyx Modified: trunk/bindings/python/ode.pxd =================================================================== --- trunk/bindings/python/ode.pxd 2012-03-02 22:13:00 UTC (rev 1870) +++ trunk/bindings/python/ode.pxd 2012-03-05 21:34:40 UTC (rev 1871) @@ -414,6 +414,7 @@ void dGeomGetQuaternion (dGeomID, dQuaternion result) void dGeomSetOffsetPosition (dGeomID, dReal x, dReal y, dReal z) void dGeomSetOffsetRotation (dGeomID, dMatrix3 R) + void dGeomClearOffset (dGeomID) dReal * dGeomGetOffsetPosition (dGeomID) dReal * dGeomGetOffsetRotation (dGeomID) void dGeomDestroy (dGeomID) Modified: trunk/bindings/python/ode.pyx =================================================================== --- trunk/bindings/python/ode.pyx 2012-03-02 22:13:00 UTC (rev 1870) +++ trunk/bindings/python/ode.pyx 2012-03-05 21:34:40 UTC (rev 1871) @@ -3177,6 +3177,13 @@ m = <dReal*>dGeomGetOffsetRotation(self.gid) return [m[0],m[1],m[2],m[4],m[5],m[6],m[8],m[9],m[10]] + def clearOffset(self): + """clearOffset() + + Disable the offset transform of the geom. + """ + dGeomClearOffset(self.gid) + def getAABB(self): """getAABB() -> 6-tuple This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |