Pin joints hold a set distance between points on two bodies. More...
#import <ChipmunkConstraint.h>
Inherits ChipmunkConstraint.
Instance Methods | |
(id) | - initWithBodyA:bodyB:anchr1:anchr2: |
Initialize a pin joint between the two bodies with the given anchor points. More... | |
Class Methods | |
(ChipmunkPinJoint *) | + pinJointWithBodyA:bodyB:anchr1:anchr2: |
Create an autoreleased pin joint between the two bodies with the given anchor points. More... | |
![]() | |
(ChipmunkConstraint *) | + constraintFromCPConstraint: |
Get the ChipmunkConstraint object associciated with a cpConstraint pointer. More... | |
Properties | |
cpVect | anchr1 |
The anchor point on the first body. | |
cpVect | anchr2 |
The anchor point on the second body. | |
cpFloat | dist |
The distance between the two anchor points that the joint keeps. | |
![]() | |
cpConstraint * | constraint |
Returns a pointer to the underlying cpConstraint C struct. | |
ChipmunkBody * | bodyA |
The first ChipmunkBody the constraint controls. | |
ChipmunkBody * | bodyB |
The second ChipmunkBody the constraint controls. | |
cpFloat | maxForce |
Maximum force this constraint is allowed to use (defalts to infinity). More... | |
cpFloat | errorBias |
The rate at which joint error is corrected. More... | |
cpFloat | maxBias |
Maximum rate (speed) that a joint can be corrected at (defaults to infinity). More... | |
id | data |
An object that this constraint is associated with. More... | |
Pin joints hold a set distance between points on two bodies.
Think of them as connecting a solid pin or rod between the two anchor points.
- (id) initWithBodyA: | (ChipmunkBody *) | a | |
bodyB: | (ChipmunkBody *) | b | |
anchr1: | (cpVect) | anchr1 | |
anchr2: | (cpVect) | anchr2 | |
Initialize a pin joint between the two bodies with the given anchor points.
The distance is calculated when the joint is initialized. It can be set explicitly using the property.
+ (ChipmunkPinJoint *) pinJointWithBodyA: | (ChipmunkBody *) | a | |
bodyB: | (ChipmunkBody *) | b | |
anchr1: | (cpVect) | anchr1 | |
anchr2: | (cpVect) | anchr2 | |
Create an autoreleased pin joint between the two bodies with the given anchor points.
The distance is calculated when the joint is initialized. It can be set explicitly using the property.