示例#1
0
 def __init__(self, a, b, anchr1, anchr2, min, max):
     """a and b are the two bodies to connect, anchr1 and anchr2 are the
     anchor points on those bodies, and min and max define the allowed
     distances of the anchor points.
     """
     self._a = a
     self._b = b
     self._joint = cp.cpSlideJointNew(a._body, b._body, anchr1, anchr2, min, max)
 def __init__(self, a, b, anchr1, anchr2, min, max):
     """a and b are the two bodies to connect, anchr1 and anchr2 are the
     anchor points on those bodies, and min and max define the allowed
     distances of the anchor points.
     """
     self._constraint = cp.cpSlideJointNew(a._body, b._body, anchr1, anchr2, min, max)
     self._ccontents = self._constraint.contents
     self._sjc = cp.cast(self._constraint, ct.POINTER(cp.cpSlideJoint)).contents
     self._a = a
     self._b = b
示例#3
0
 def __init__(self, a, b, anchr1, anchr2, min, max):
     """a and b are the two bodies to connect, anchr1 and anchr2 are the
     anchor points on those bodies, and min and max define the allowed
     distances of the anchor points.
     """
     self._constraint = cp.cpSlideJointNew(a._body, b._body, anchr1, anchr2,
                                           min, max)
     self._ccontents = self._constraint.contents
     self._sjc = cp.cast(self._constraint,
                         ct.POINTER(cp.cpSlideJoint)).contents
     self._a = a
     self._b = b