コード例 #1
0
ファイル: __init__.py プロジェクト: cullophid/Scienceman
 def __init__(self, a, b, groove_a, groove_b, anchr2):
     """a and b are the two bodies to conenct, 
     groove_a and groove_b is two points or vectors or something.
     anchr2 is an anchor point
     """
     self._a = a 
     self._b = b
     self._joint = cp.cpGrooveJointNew(a._body, b._body, groove_a, groove_b, anchr2)
コード例 #2
0
 def __init__(self, a, b, groove_a, groove_b, anchr2):
     """The groove goes from groove_a to groove_b on body a, and the pivot 
     is attached to anchr2 on body b. All coordinates are body local. 
     """
     self._constraint = cp.cpGrooveJointNew(a._body, b._body, groove_a, groove_b, anchr2)
     self._ccontents = self._constraint.contents
     self._pjc = cp.cast(self._constraint, ct.POINTER(cp.cpGrooveJoint)).contents
     self._a = a
     self._b = b
コード例 #3
0
ファイル: constraint.py プロジェクト: sdp-2011/sdp-9
 def __init__(self, a, b, groove_a, groove_b, anchr2):
     """The groove goes from groove_a to groove_b on body a, and the pivot 
     is attached to anchr2 on body b. All coordinates are body local. 
     """
     self._constraint = cp.cpGrooveJointNew(a._body, b._body, groove_a,
                                            groove_b, anchr2)
     self._ccontents = self._constraint.contents
     self._pjc = cp.cast(self._constraint,
                         ct.POINTER(cp.cpGrooveJoint)).contents
     self._a = a
     self._b = b