ChipmunkHastySpace is an Objective-Chipmunk wrapper for cpHastySpace and is only available with Chipmunk Pro. More...
#import <ChipmunkHastySpace.h>
Inherits ChipmunkSpace.
Additional Inherited Members | |
![]() | |
typedef void(^ | ChipmunkPostStepBlock )(void) |
Block type used with [ChipmunkSpace addPostStepBlock:]. | |
![]() | |
(bool enableContactGraph) | - __attribute__ |
(void) | - setDefaultCollisionHandler:begin:preSolve:postSolve:separate: |
Set the default collision handler. More... | |
(void) | - addCollisionHandler:typeA:typeB:begin:preSolve:postSolve:separate: |
Set a collision handler to handle specific collision types. More... | |
(void) | - removeCollisionHandlerForTypeA:andB: |
Remove a collision handler. | |
(id) | - add: |
Add an object to the space. More... | |
(id) | - remove: |
Remove an object from the space. More... | |
(BOOL) | - contains: |
Check if a space already contains a particular object: | |
(id) | - smartAdd: |
If the space is locked and it's unsafe to call add: it will call addPostStepAddition: instead. | |
(id) | - smartRemove: |
If the space is locked and it's unsafe to call remove: it will call addPostStepRemoval: instead. | |
(BOOL) | - addPostStepCallback:selector:key: |
Define a callback to be run just before [ChipmunkSpace step:] finishes. More... | |
(BOOL) | - addPostStepBlock:key: |
Same as [ChipmunkSpace addPostStepCallback:] but with a block. The block is copied. | |
(void) | - addPostStepAddition: |
Add the Chipmunk Object to the space at the end of the step. | |
(void) | - addPostStepRemoval: |
Remove the Chipmunk Object from the space at the end of the step. | |
(NSArray *) | - nearestPointQueryAll:maxDistance:layers:group: |
Return an array of ChipmunkNearestPointQueryInfo objects for shapes within maxDistance of point . More... | |
(ChipmunkNearestPointQueryInfo *) | - nearestPointQueryNearest:maxDistance:layers:group: |
Find the closest shape to a point that is within maxDistance of point . More... | |
(NSArray *) | - pointQueryAll:layers:group: |
Returns a NSArray of all shapes that overlap the given point. More... | |
(ChipmunkShape *) | - pointQueryFirst:layers:group: |
Returns the first shape that overlaps the given point. More... | |
(NSArray *) | - segmentQueryAllFrom:to:layers:group: |
Return a NSArray of ChipmunkSegmentQueryInfo objects for all the shapes that overlap the segment. The objects are unsorted. | |
(ChipmunkSegmentQueryInfo *) | - segmentQueryFirstFrom:to:layers:group: |
Returns the first shape that overlaps the given segment. The segment is treated as having the given group and layers. | |
(NSArray *) | - bbQueryAll:layers:group: |
Returns a NSArray of all shapes whose bounding boxes overlap the given bounding box. The box is treated as having the given group and layers. | |
(NSArray *) | - shapeQueryAll: |
Returns a NSArray of ChipmunkShapeQueryInfo objects for all the shapes that overlap shape . | |
(BOOL) | - shapeTest: |
Returns true if the shape overlaps anything in the space. | |
(void) | - activateShapesTouchingShape: |
Perform a shape query for shape and call cpBodyActivate() for everythnig it touches. | |
(NSArray *) | - bodies |
Get a copy of the list of all the bodies in the space. | |
(NSArray *) | - shapes |
Get a copy of the list of all the shapes in the space. | |
(NSArray *) | - constraints |
Get a copy of the list of all the constraints in the space. | |
(void) | - reindexStatic |
Update all the static shapes. | |
(void) | - reindexShape: |
Update the collision info for a single shape. More... | |
(void) | - reindexShapesForBody: |
Update the collision info for all shapes attached to a body. | |
(void) | - step: |
Step time forward. While variable timesteps may be used, a constant timestep will allow you to reduce CPU usage by using fewer iterations. | |
(void) | - addBounds:thickness:elasticity:friction:layers:group:collisionType: |
Add a border of collision segments around a box. See ChipmunkShape for more information on the other parameters. | |
(ChipmunkBody *) | - addBody: |
Add a body to the space. Normally you would simply use add:. | |
(ChipmunkBody *) | - removeBody: |
Remove a body to the space. Normally you would simply use remove:. | |
(ChipmunkShape *) | - addShape: |
Add a shape to the space. Normally you would simply use add:. | |
(ChipmunkShape *) | - removeShape: |
Remove a shape to the space. Normally you would simply use remove:. | |
(ChipmunkShape *) | - addStaticShape: |
Add a static shape to the space. Normally you would simply create a static shape use add:. | |
(ChipmunkShape *) | - removeStaticShape: |
Remove a static shape to the space. Normally you would simply create a static shape use remove:. | |
(ChipmunkConstraint *) | - addConstraint: |
Add a constraint to the space. Normally you would simply use add:. | |
(ChipmunkConstraint *) | - removeConstraint: |
Remove a constraint to the space. Normally you would simply use remove:. | |
![]() | |
(ChipmunkSpace *) | + spaceFromCPSpace: |
Get the ChipmunkSpace object associciated with a cpSpace pointer. More... | |
![]() | |
int | iterations |
The iteration count is how many solver passes the space should use when solving collisions and joints (default is 10). More... | |
cpVect | gravity |
Global gravity value to use for all rigid bodies in this space (default value is cpvzero ). | |
cpFloat | damping |
Global viscous damping value to use for all rigid bodies in this space (default value is 1.0 which disables damping). More... | |
cpFloat | idleSpeedThreshold |
If a body is moving slower than this speed, it is considered idle. The default value is 0, which signals that the space should guess a good value based on the current gravity. | |
cpFloat | sleepTimeThreshold |
Elapsed time before a group of idle bodies is put to sleep (defaults to infinity which disables sleeping). More... | |
cpFloat | collisionSlop |
Amount of encouraged penetration between colliding shapes. More... | |
cpFloat | collisionBias |
Determines how fast overlapping shapes are pushed apart. More... | |
cpTimestamp | collisionPersistence |
Number of frames that contact information should persist. More... | |
cpSpace * | space |
Returns a pointer to the underlying cpSpace C struct. | |
ChipmunkBody * | staticBody |
The space's designated static body. More... | |
cpFloat | currentTimeStep |
Retrieves the current (if you are in a callback from [ChipmunkSpace step:]) or most recent (outside of a [ChipmunkSpace step:] call) timestep. | |
id | data |
An object that this space is associated with. More... | |
ChipmunkHastySpace is an Objective-Chipmunk wrapper for cpHastySpace and is only available with Chipmunk Pro.
Subclass this class instead of ChipmunkSpace if you want to enable the cpHastySpace optimizations. If ChipmunkHastySpace is linked correctly, calling [[ChipmunkSpace alloc] init] will actually return a ChipmunkHastySpace.