Package pymunk :: Module constraint :: Class SlideJoint
[frames] | no frames]

Class SlideJoint

object --+    
         |    
Constraint --+
             |
            SlideJoint

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.
Instance Methods
 
__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.
 
__del__(self) (Inherited from pymunk.constraint.Constraint)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  anchr1
  anchr2
  min
  max
  a
The first of the two bodies constrained (Inherited from pymunk.constraint.Constraint)
  b
The second of the two bodies constrained (Inherited from pymunk.constraint.Constraint)
  bias_coef
The percentage of error corrected each step of the space. (Inherited from pymunk.constraint.Constraint)
  max_bias
The maximum speed at which the constraint can apply error correction. (Inherited from pymunk.constraint.Constraint)
  max_force
The maximum force that the constraint can use to act on the two bodies. (Inherited from pymunk.constraint.Constraint)

Inherited from object: __class__

Method Details

__init__(self, a, b, anchr1, anchr2, min, max)
(Constructor)

 
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.
Overrides: object.__init__

Property Details

anchr1

Get Method:
_get_anchr1(self)
Set Method:
_set_anchr1(self, anchr)

anchr2

Get Method:
_get_anchr2(self)
Set Method:
_set_anchr2(self, anchr)

min

Get Method:
_get_min(self)
Set Method:
_set_min(self, min)

max

Get Method:
_get_max(self)
Set Method:
_set_max(self, max)