Abstract base class for collsion shape types. More...
#import <ChipmunkShape.h>
Inherits ChipmunkBaseObject-p.
Inherited by ChipmunkCircleShape, ChipmunkPolyShape, and ChipmunkSegmentShape.
Public Member Functions | |
| (cpBB) | - cacheBB |
| Update and cache the axis-aligned bounding box for this shape. | |
| (bool) | - pointQuery: |
| Check if a point in absolute coordinates lies within the shape. | |
Properties | |
| cpShape * | shape |
| Returns a pointer to the underlying cpShape C struct. | |
| ChipmunkBody * | body |
| The ChipmunkBody that this shape is attached to. | |
| cpBB | bb |
| The axis-aligned bounding box for this shape. | |
| BOOL | sensor |
| Sensor shapes send collision callback messages, but don't create a collision response. | |
| cpFloat | elasticity |
| How bouncy this shape is. | |
| cpFloat | friction |
| How much friction this shape has. | |
| cpVect | surfaceVel |
| The velocity of the shape's surface. | |
| id | collisionType |
| An object reference used as a collision type identifier. | |
| id | group |
| An object reference used as a collision group identifier. | |
| cpLayers | layers |
| A layer bitmask that defines which objects. | |
| id | data |
| An object that this shape is associated with. | |
Abstract base class for collsion shape types.
- (id) collisionType [read, write, assign] |
An object reference used as a collision type identifier.
This is used when defining collision handlers.
delegate properties this is a weak reference and does not call retain. - (id) data [read, write, assign] |
An object that this shape is associated with.
You can use this get a reference to your game object or controller object from within callbacks.
delegate properties this is a weak reference and does not call retain. This prevents reference cycles from occuring. Reimplemented from <ChipmunkBaseObject>.
- (id) group [read, write, assign] |
An object reference used as a collision group identifier.
Shapes with the same group do not collide.
delegate properties this is a weak reference and does not call retain. - (cpVect) surfaceVel [read, write, assign] |
The velocity of the shape's surface.
This velocity is used in the collision response when calculating the friction only.
1.7.1