Chipmunk2D Pro API Reference  6.2.1
 All Classes Functions Variables Typedefs Properties Groups Pages
Instance Methods | Class Methods | Properties | List of all members
ChipmunkShape Class Reference

Abstract base class for collsion shape types. More...

#import <ChipmunkShape.h>

Inherits NSObject, and <ChipmunkBaseObject>.

Inherited by ChipmunkCircleShape, ChipmunkPolyShape, and ChipmunkSegmentShape.

Instance Methods

(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. More...
 

Class Methods

(ChipmunkShape *) + shapeFromCPShape:
 Get the ChipmunkShape object associciated with a cpShape pointer. More...
 

Properties

cpShapeshape
 Returns a pointer to the underlying cpShape C struct.
 
ChipmunkBodybody
 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. More...
 
cpCollisionType collisionType
 An object reference used as a collision type identifier. More...
 
cpGroup group
 An object reference used as a collision group identifier. More...
 
cpLayers layers
 A layer bitmask that defines which objects.
 
ChipmunkSpacespace
 Get the space the body is added to.
 
id data
 An object that this shape is associated with. More...
 

Detailed Description

Abstract base class for collsion shape types.

Method Documentation

- (bool) pointQuery:

Check if a point in absolute coordinates lies within the shape.

Deprecated:
Use nearestPointQuery: instead
+ (ChipmunkShape *) shapeFromCPShape: (cpShape *)  shape

Get the ChipmunkShape object associciated with a cpShape pointer.

Undefined if the cpShape wasn't created using Objective-Chipmunk.

Property Documentation

- (cpCollisionType) collisionType
readwritenonatomicassign

An object reference used as a collision type identifier.

This is used when defining collision handlers.

Attention
Like most delegate properties this is a weak reference and does not call retain.
- (id) data
readwritenonatomicassign

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.

Attention
Like most delegate properties this is a weak reference and does not call retain. This prevents reference cycles from occuring.
- (cpGroup) group
readwritenonatomicassign

An object reference used as a collision group identifier.

Shapes with the same group do not collide.

Attention
Like most delegate properties this is a weak reference and does not call retain.
- (cpVect) surfaceVel
readwritenonatomicassign

The velocity of the shape's surface.

This velocity is used in the collision response when calculating the friction only.


The documentation for this class was generated from the following file: