Ejemplo n.º 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)
Ejemplo n.º 2
0
 def __init__(self, a, b, anchr1, anchr2, min, max):
     """Like pin joints, but have a minimum and maximum distance.
     A chain could be modeled using this joint. It keeps the anchor points 
     from getting to far apart, but will allow them to get closer together.
     
     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._joint = cp.cpSlideJointNew(a._body, b._body, anchr1, anchr2, min, max)
Ejemplo n.º 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
Ejemplo n.º 4
0
 def __init__(self, a, b, anchr1, anchr2, min, max):
     """Like pin joints, but have a minimum and maximum distance.
     A chain could be modeled using this joint. It keeps the anchor points 
     from getting to far apart, but will allow them to get closer together.
     
     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._joint = cp.cpSlideJointNew(a._body, b._body, anchr1, anchr2, min,
                                      max)