Update of /cvsroot/pyode/pyode/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21744/src
Modified Files:
body.pyx declarations.pyx
Log Message:
Kinematic bodies patch from Alex Dumitrache
Index: body.pyx
===================================================================
RCS file: /cvsroot/pyode/pyode/src/body.pyx,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** body.pyx 24 Dec 2008 03:33:56 -0000 1.7
--- body.pyx 21 Mar 2010 23:07:42 -0000 1.8
***************
*** 579,580 ****
--- 579,611 ----
"""
return dBodyGetGravityMode(self.bid)
+
+
+ def setDynamic(self):
+ """setDynamic()
+
+ Set a body to the (default) "dynamic" state, instead of "kinematic".
+ See setKinematic() for more information.
+ """
+ dBodySetDynamic(self.bid)
+
+ def setKinematic(self):
+ """setKinematic()
+
+ Set the kinematic state of the body (change it into a kinematic body)
+
+ Kinematic bodies behave as if they had infinite mass. This means they don't react
+ to any force (gravity, constraints or user-supplied); they simply follow
+ velocity to reach the next position. [from ODE wiki]
+ """
+ dBodySetKinematic(self.bid)
+
+ def isKinematic(self):
+ """isKinematic() -> bool
+
+ Return True if the body is kinematic (not influenced by other forces).
+
+ Kinematic bodies behave as if they had infinite mass. This means they don't react
+ to any force (gravity, constraints or user-supplied); they simply follow
+ velocity to reach the next position. [from ODE wiki]
+ """
+ return dBodyIsKinematic(self.bid)
Index: declarations.pyx
===================================================================
RCS file: /cvsroot/pyode/pyode/src/declarations.pyx,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** declarations.pyx 20 Feb 2009 00:05:34 -0000 1.23
--- declarations.pyx 21 Mar 2010 23:07:42 -0000 1.24
***************
*** 212,215 ****
--- 212,219 ----
int dBodyGetGravityMode (dBodyID b)
+ void dBodySetDynamic (dBodyID)
+ void dBodySetKinematic (dBodyID)
+ int dBodyIsKinematic (dBodyID)
+
# Joints
dJointID dJointCreateBall (dWorldID, dJointGroupID)
|