Crate chipmunk_rs [] [src]

Bindings to the Chipmunk2D physics library

Tested on Chipmunk2D 7.0.1

These bindings provide a memory safety, but otherwise attempts to stay close to the original API. See the official Chipmunk2D 7.0.1 manual for details on how to use the API. These bindings are not zero-cost. Some overhead is due to memory safety related code. This cost may be reduced in future releases. Alternativelly, the ffi module provides raw API bindings (use at your own risk).

What's not done yet?

  • Shapes other than the Circle and Box (Poly) Shapes.
  • Iterators/callbacks.
  • Functions to get associated bodies/shapes/spaces from eachother. A clean and safe way of doing this in rust is needed.
  • This! Have a thurough run through the Chipmunk2D 7.0.1 manual and note missing functionality.

Modules

ffi

Provides raw ffi bindings to the Chipmunk2D library.

Structs

Body

A physics Body. See Chipmunk Rigid Bodies.

CircleShape

A CircleShape. See Working With Circle Shapes

PolyShape

A CircleShape. See Working With Polygon Shapes.

Space

A 2D space. See Chipmunk Spaces.

Traits

BaseShape

A collision Shape base trait. See Chipmunk Collision Shapes. All shape structs implement this trait.

ChipmunkRsTypes

Implement this trait to define what types you intend to use with this library.

Shape

A collision Shape trait. See Chipmunk Collision Shapes. All shape structs implement this trait.

Type Definitions

BodyHandle

Reference counted handle to a Body<T>.

ShapeHandle

Reference counted handle to a Shape<T>.