cpShape

Opaque collision shape struct.

struct cpShape {
cpShapeClass* klass;
cpShapeClass* klass;
cpLayers layers;
cpSpace* space;
cpSpace* space;
cpShape* next;
cpShape* next;
cpShape* prev;
cpShape* prev;
cpHashValue hashid;
cpHashValue hashid;
}

Members

Variables

bb
cpBB bb;

The current bounding box of the shape.

body_
cpBody* body_;

The rigid body_ this collision shape is attached to.

collision_type
cpCollisionType collision_type;

Collision type of this shape used when picking collision handlers.

data
cpDataPointer data;

User definable data pointer. Generally this points to your the game object class so you can access it when given a cpShape reference in a callback.

e
cpFloat e;

Coefficient of restitution. (elasticity)

group
cpGroup group;

Group of this shape. Shapes in the same group don't collide.

sensor
cpBool sensor;

Sensor flag. Sensor shapes call collision callbacks but don't produce collisions.

surface_v
cpVect surface_v;

Surface velocity used when solving for friction.

u
cpFloat u;

Coefficient of friction.

Meta