Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)