Public Member Functions | Properties

ChipmunkMultiGrab Class Reference

Simple class to implement multitouch grabbing of physics objects. More...

#import <ChipmunkMultiGrab.h>

List of all members.

Public Member Functions

() - bool
 Gives you the opportunity to further filter shapes.
(id) - initForSpace:withSmoothing:withGrabForce:
 space is the space to grab shapes in.
(BOOL) - beginLocation:
 Start tracking a new grab point.
(void) - updateLocation:
 Update a grab point.
(void) - endLocation:
 End a grab point.

Properties

cpLayers layers
 Layers used for the point query when grabbing objects.
cpGroup group
 Group used for the point query when grabbing objects.
cpFloat grabFriction
 Amount of friction applied by the touch.
cpFloat grabRotaryFriction
 The amount torque to apply to the grab to keep it from spinning.
cpFloat grabRadius
 On a touch screen, a single point query can make it really hard to grab small objects with a fat finger.

Detailed Description

Simple class to implement multitouch grabbing of physics objects.


Member Function Documentation

- ChipmunkMultiGrab: (^)  grabFilter  

Gives you the opportunity to further filter shapes.

Return FALSE to ignore a shape. The default implementation always returns TRUE.

- (id) initForSpace: (ChipmunkSpace *)  space
withSmoothing: (cpFloat)  smoothing
withGrabForce: (cpFloat)  grabForce 

space is the space to grab shapes in.

smoothing is the amount of mouse smoothing to apply as percentage of remaining error per second. cpfpow(0.8, 60) is a good starting point that provides fast response, but smooth mouse updates. force is the force the grab points can apply.


Property Documentation

- (cpFloat) grabFriction [read, write, assign]

Amount of friction applied by the touch.

Should be less than the grabForce. Defaults to 0.0.

- (cpFloat) grabRadius [read, write, assign]

On a touch screen, a single point query can make it really hard to grab small objects with a fat finger.

By providing a radius, it will make it much easier for users to grab objects. Defaults to 0.0.

- (cpFloat) grabRotaryFriction [read, write, assign]

The amount torque to apply to the grab to keep it from spinning.

Defaults to 0.0.


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