Public Member Functions | Static Public Member Functions | Properties

ChipmunkShape Class Reference

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

#import <ChipmunkShape.h>

Inherits ChipmunkBaseObject-p.

Inherited by ChipmunkCircleShape, ChipmunkPolyShape, and ChipmunkSegmentShape.

List of all members.

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.

Static Public Member Functions

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

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

Detailed Description

Abstract base class for collsion shape types.


Member Function 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

- (id) collisionType [read, write, assign]

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 [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.

Attention:
Like most 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.

Attention:
Like most 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.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Properties