コード例 #1
0
ファイル: __init__.py プロジェクト: goosemo/monkey
 def __init__(self, a, b, anchr1, anchr2):
     """a and b are the two bodies to connect, and anchr1 and anchr2 are the
     anchor points on those bodies.
     """
     self._a = a
     self._b = b
     self._joint = cp.cpPinJointNew(a._body, b._body, anchr1, anchr2)
コード例 #2
0
ファイル: constraint.py プロジェクト: ikn/apologise
    def __init__(self, a, b, anchr1=(0,0), anchr2=(0,0)):
        """a and b are the two bodies to connect, and anchr1 and anchr2 are the
        anchor points on those bodies.
        """

        self._constraint = cp.cpPinJointNew(a._body, b._body, anchr1, anchr2)
        self._ccontents = self._constraint.contents
        self._pjc = cp.cast(self._constraint, ct.POINTER(cp.cpPinJoint)).contents
        self._a = a
        self._b = b
コード例 #3
0
ファイル: pymunk.py プロジェクト: kakila/cavemen
 def __init__(self, a, b, anchr1, anchr2):
     """Keeps the anchor points at a set distance from one another.
     
     a and b are the two bodies to connect, and anchr1 and anchr2 are the
     anchor points on those bodies."""
     self._joint = cp.cpPinJointNew(a._body, b._body, anchr1, anchr2)
コード例 #4
0
ファイル: pymunk.py プロジェクト: ezequielp/cavemen
 def __init__(self, a, b, anchr1, anchr2):
     """Keeps the anchor points at a set distance from one another.
     
     a and b are the two bodies to connect, and anchr1 and anchr2 are the
     anchor points on those bodies."""
     self._joint = cp.cpPinJointNew(a._body, b._body, anchr1, anchr2)