|
Chipmunk2D Pro API Reference
7.0.2
|
Like a ChipmunkDampedSpring, but operates in a rotational fashion. More...
#import <ChipmunkConstraint.h>
Inherits ChipmunkConstraint.
Instance Methods | |
| (id) | - initWithBodyA:bodyB:restAngle:stiffness:damping: |
| Initialize a damped rotary spring between the given 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 | |
| (ChipmunkDampedRotarySpring *) | + dampedRotarySpringWithBodyA:bodyB:restAngle:stiffness:damping: |
| Create an autoreleased damped rotary spring between the given bodies. More... | |
Class Methods inherited from ChipmunkConstraint | |
| (ChipmunkConstraint *) | + constraintFromCPConstraint: |
| Get the ChipmunkConstraint object associciated with a cpConstraint pointer. More... | |
Properties | |
| cpFloat | restAngle |
| The angular offset the spring attempts to keep between the two bodies. | |
| cpFloat | stiffness |
| The young's modulus of the spring. | |
| cpFloat | damping |
| The amount of viscous damping to apply. | |
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... | |
Like a ChipmunkDampedSpring, but operates in a rotational fashion.
| + (ChipmunkDampedRotarySpring *) dampedRotarySpringWithBodyA: | (ChipmunkBody *) | a | |
| bodyB: | (ChipmunkBody *) | b | |
| restAngle: | (cpFloat) | restAngle | |
| stiffness: | (cpFloat) | stiffness | |
| damping: | (cpFloat) | damping | |
Create an autoreleased damped rotary spring between the given bodies.
| restAngle | The angular offset in radians the spring attempts to keep between the two bodies. |
| stiffness | The young's modulus of the spring. |
| damping | The amount of viscous damping to apply. |
| - (id) initWithBodyA: | (ChipmunkBody *) | a | |
| bodyB: | (ChipmunkBody *) | b | |
| restAngle: | (cpFloat) | restAngle | |
| stiffness: | (cpFloat) | stiffness | |
| damping: | (cpFloat) | damping | |
Initialize a damped rotary spring between the given bodies.
| restAngle | The angular offset in radians the spring attempts to keep between the two bodies. |
| stiffness | The young's modulus of the spring. |
| damping | The amount of viscous damping to apply. |
1.8.3.1