예제 #1
0
파일: __init__.py 프로젝트: goosemo/monkey
 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)
예제 #2
0
파일: pymunk.py 프로젝트: kakila/cavemen
 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)
예제 #3
0
파일: constraint.py 프로젝트: ikn/apologise
 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
예제 #4
0
파일: pymunk.py 프로젝트: ezequielp/cavemen
 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)