Ratchet joints create rotary ratches similar to a socket wrench. More...
#import <ChipmunkConstraint.h>
Inherits ChipmunkConstraint.
Public Member Functions | |
(id) | - initWithBodyA:bodyB:phase:ratchet: |
Initialize a ratchet joint between the given bodies. | |
Static Public Member Functions | |
(ChipmunkRatchetJoint *) | + ratchetJointWithBodyA:bodyB:phase:ratchet: |
Create an autoreleased ratchet joint between the given bodies. | |
Properties | |
cpFloat | angle |
The current ratchet position in radians. | |
cpFloat | phase |
The angular offset of the ratchet positions in radians. | |
cpFloat | ratchet |
The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction. |
Ratchet joints create rotary ratches similar to a socket wrench.
- (id) initWithBodyA: | (ChipmunkBody *) | a | ||
bodyB: | (ChipmunkBody *) | b | ||
phase: | (cpFloat) | phase | ||
ratchet: | (cpFloat) | ratchet | ||
Initialize a ratchet joint between the given bodies.
phase | The angular offset of the ratchet positions in radians. | |
ratchet | The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction. |
+ (ChipmunkRatchetJoint *) ratchetJointWithBodyA: | (ChipmunkBody *) | a | ||
bodyB: | (ChipmunkBody *) | b | ||
phase: | (cpFloat) | phase | ||
ratchet: | (cpFloat) | ratchet | ||
Create an autoreleased ratchet joint between the given bodies.
phase | The angular offset of the ratchet positions in radians. | |
ratchet | The angle in radians of each ratchet position. Negative values cause the ratchet to operate in the opposite direction. |