gen-collision-type
cp Space Add Collision Pair Func
cp Space Set Default Collision Pair Func
cpvadd
1 FFI
Version: 4.2.1.5

Chipmunk 2.5D Physics

Jay McCarthy <jay at plt-scheme dot org>

An FFI to the Chipmunk 2.5D rigid body physics engine.

 (require (planet jaymccarthy/chipmunk))

This module re-exports (planet jaymccarthy/chipmunk/chipmunk-ffi) with a few changes and helpers.

First, cpInitChipmunk and cpResetShapeIdCounter are called.

Second, the following are provided:

(gen-collision-type)  exact-nonnegative-integer?

Returns a unique integer to use as a collision type.

(cpSpaceAddCollisionPairFunc space    
  typea    
  typeb    
  callback)  void
  space : cpSpace?
  typea : exact-nonnegative-integer?
  typeb : exact-nonnegative-integer?
  callback : 
(-> cpShape? cpShape? (vectorof cpContact?) cpFloat?
    boolean?)

Adds a collision pair function where the callback has less work to do.

(cpSpaceSetDefaultCollisionPairFunc space    
  callback)  void
  space : cpSpace?
  callback : 
(-> cpShape? cpShape? (vectorof cpContact?) cpFloat?
    boolean?)

Sets the default collision pair function where the callback has less work to do.

(cpvadd x ...)  cpVect?
  x : cpVect?

Variable arity cpvadd.

1 FFI

 (require (planet jaymccarthy/chipmunk/chipmunk-ffi))

This provides a straight-forward transliteration of the Chipmunk API. Refer to its documentation and headers for more details.