Chipmunk2D Pro API Reference  7.0.1
 All Classes Functions Variables Typedefs Enumerations Enumerator 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.
 

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 surfaceVelocity
 The velocity of the shape's surface. More...
 
cpCollisionType collisionType
 An object reference used as a collision type identifier. More...
 
cpShapeFilter filter
 The collision filtering parameters of this shape.
 
ChipmunkSpacespace
 Get the space the body is added to.
 
id userData
 An object that this shape is associated with. More...
 

Detailed Description

Abstract base class for collsion shape types.

Method Documentation

+ (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.
- (cpVect) surfaceVelocity
readwritenonatomicassign

The velocity of the shape's surface.

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

- (id) userData
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.

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