Chipmunk2D Pro API Reference
7.0.1
|
Groove joints hold a pivot point on one body to line along a line segment on another like a pin in a groove. More...
#import <ChipmunkConstraint.h>
Inherits ChipmunkConstraint.
Instance Methods | |
(id) | - initWithBodyA:bodyB:grooveA:grooveB:anchorB: |
Initialize a groove joint between the two bodies. More... | |
Instance Methods inherited from ChipmunkConstraint | |
(void) | - preSolve: |
Override this method to update a constraints parameters just before running the physics each step. | |
(void) | - postSolve: |
Override this method to poll values from a constraint each frame after the physics runs. More... | |
Class Methods | |
(ChipmunkGrooveJoint *) | + grooveJointWithBodyA:bodyB:grooveA:grooveB:anchorB: |
Create an autoreleased groove joint between the two bodies. More... | |
Class Methods inherited from ChipmunkConstraint | |
(ChipmunkConstraint *) | + constraintFromCPConstraint: |
Get the ChipmunkConstraint object associciated with a cpConstraint pointer. More... | |
Properties | |
cpVect | grooveA |
The start point of the groove on the first body. | |
cpVect | grooveB |
The end point of the groove on the first body. | |
cpVect | anchorB |
The anchor point on the second body. | |
Properties inherited from ChipmunkConstraint | |
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... | |
BOOL | collideBodies |
Whether or not the connected bodies should checked for collisions. More... | |
cpFloat | impulse |
Get the most recent impulse applied by this constraint. | |
ChipmunkSpace * | space |
Get the space the body is added to. | |
id | userData |
An object that this constraint is associated with. More... | |
Groove joints hold a pivot point on one body to line along a line segment on another like a pin in a groove.
+ (ChipmunkGrooveJoint *) grooveJointWithBodyA: | (ChipmunkBody *) | a | |
bodyB: | (ChipmunkBody *) | b | |
grooveA: | (cpVect) | grooveA | |
grooveB: | (cpVect) | grooveB | |
anchorB: | (cpVect) | anchorB | |
Create an autoreleased groove joint between the two bodies.
Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.
grooveA | The start of the line segment on the first body. |
grooveB | The end of the line segment on the first body. |
anchorB | The anchor point on the second body that is held to the line segment on the first. |
- (id) initWithBodyA: | (ChipmunkBody *) | a | |
bodyB: | (ChipmunkBody *) | b | |
grooveA: | (cpVect) | grooveA | |
grooveB: | (cpVect) | grooveB | |
anchorB: | (cpVect) | anchorB | |
Initialize a groove joint between the two bodies.
Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.
grooveA | The start of the line segment on the first body. |
grooveB | The end of the line segment on the first body. |
anchorB | The anchor point on the second body that is held to the line segment on the first. |