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

Class GearJoint

object --+    
         |    
Constraint --+
             |
            GearJoint

Keeps the angular velocity ratio of a pair of bodies constant.
Instance Methods
 
__init__(self, a, b, phase, ratio)
Keeps the angular velocity ratio of a pair of bodies constant.
 
__del__(self) (Inherited from pymunk.constraint.Constraint)

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

Properties
  phase
  ratio
  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, phase, ratio)
(Constructor)

 
Keeps the angular velocity ratio of a pair of bodies constant. ratio is always measured in absolute terms. It is currently not possible to set the ratio in relation to a third body's angular velocity. phase is the initial angular offset of the two bodies.
Overrides: object.__init__

Property Details

phase

Get Method:
_get_phase(self)
Set Method:
_set_phase(self, phase)

ratio

Get Method:
_get_ratio(self)
Set Method:
_set_ratio(self, ratio)