void cpShapeDestroy(cpShape *shape)
Destroy a shape.
cpVect point
The point of impact.
Definition: cpShape.h:44
Definition: chipmunk_private.h:641
void cpShapeSetSurfaceVelocity(cpShape *shape, cpVect surfaceVelocity)
Set the surface velocity of this shape.
Fast collision filtering type that is used to determine if two objects collide before calling collisi...
Definition: cpShape.h:52
void * cpDataPointer
Type used for user data pointers.
Definition: chipmunk_types.h:216
cpBitmask mask
A bitmask of user definable category types that this object object collides with. ...
Definition: cpShape.h:61
cpFloat cpShapePointQuery(const cpShape *shape, cpVect p, cpPointQueryInfo *out)
Perform a nearest point query.
struct cpSegmentQueryInfo cpSegmentQueryInfo
Segment query info struct.
cpFloat cpShapeGetDensity(cpShape *shape)
Get the density of the shape if you are having Chipmunk calculate mass properties for you...
static cpShapeFilter cpShapeFilterNew(cpGroup group, cpBitmask categories, cpBitmask mask)
Create a new collision filter.
Definition: cpShape.h:71
cpBB cpShapeUpdate(cpShape *shape, cpTransform transform)
Update, cache and return the bounding box of a shape with an explicit transformation.
cpFloat cpShapeGetArea(cpShape *shape)
Get the calculated area of this shape.
static const cpShapeFilter CP_SHAPE_FILTER_NONE
Collision filter value for a shape that does not collide with anything.
Definition: cpShape.h:67
Definition: chipmunk_private.h:80
cpFloat cpShapeGetMoment(cpShape *shape)
Get the calculated moment of inertia for this shape.
Definition: chipmunk_private.h:256
unsigned char cpBool
Chipmunk's boolean type.
Definition: chipmunk_types.h:199
Definition: chipmunk_private.h:288
cpSpace * cpShapeGetSpace(const cpShape *shape)
The cpSpace this body is added to.
void cpShapeSetMass(cpShape *shape, cpFloat mass)
Set the mass of this shape to have Chipmunk calculate mass properties for you.
cpBody * cpShapeGetBody(const cpShape *shape)
The cpBody this shape is connected to.
const cpShape * shape
The shape that was hit, or NULL if no collision occured.
Definition: cpShape.h:42
uintptr_t cpCollisionType
Type used for cpSpace.collision_type.
Definition: chipmunk_types.h:223
cpVect normal
The normal of the surface hit.
Definition: cpShape.h:46
void cpShapeSetSensor(cpShape *shape, cpBool sensor)
Set if the shape is a sensor or not.
double cpFloat
Chipmunk's floating point type.
Definition: chipmunk_types.h:83
static const cpShapeFilter CP_SHAPE_FILTER_ALL
Collision filter value for a shape that will collide with anything except CP_SHAPE_FILTER_NONE.
Definition: cpShape.h:65
unsigned int cpBitmask
Type used for cpShapeFilter category and mask.
Definition: chipmunk_types.h:237
void cpShapeSetElasticity(cpShape *shape, cpFloat elasticity)
Set the elasticity of this shape.
struct cpShapeFilter cpShapeFilter
Fast collision filtering type that is used to determine if two objects collide before calling collisi...
cpVect cpShapeGetCenterOfGravity(cpShape *shape)
Get the centroid of this shape.
cpBB cpShapeCacheBB(cpShape *shape)
Update, cache and return the bounding box of a shape based on the body it's attached to...
cpFloat distance
The distance to the point. The distance is negative if the point is inside the shape.
Definition: cpShape.h:33
Definition: chipmunk_types.h:271
cpVect gradient
The gradient of the signed distance function.
Definition: cpShape.h:36
Segment query info struct.
Definition: cpShape.h:40
cpVect point
The closest point on the shape's surface. (in world space coordinates)
Definition: cpShape.h:31
cpBool cpShapeGetSensor(const cpShape *shape)
Get if the shape is set to be a sensor or not.
cpCollisionType cpShapeGetCollisionType(const cpShape *shape)
Set the collision type of this shape.
cpBitmask categories
A bitmask of user definable categories that this object belongs to.
Definition: cpShape.h:58
cpGroup group
Two objects with the same non-zero group value do not collide.
Definition: cpShape.h:55
void cpShapeSetUserData(cpShape *shape, cpDataPointer userData)
Set the user definable data pointer of this shape.
void cpShapeSetDensity(cpShape *shape, cpFloat density)
Set the density of this shape to have Chipmunk calculate mass properties for you. ...
cpDataPointer cpShapeGetUserData(const cpShape *shape)
Get the user definable data pointer of this shape.
cpFloat alpha
The normalized distance along the query segment in the range [0, 1].
Definition: cpShape.h:48
cpFloat cpShapeGetMass(cpShape *shape)
Get the mass of the shape if you are having Chipmunk calculate mass properties for you...
uintptr_t cpGroup
Type used for cpShape.group.
Definition: chipmunk_types.h:230
cpFloat cpShapeGetElasticity(const cpShape *shape)
Get the elasticity of this shape.
cpVect cpShapeGetSurfaceVelocity(const cpShape *shape)
Get the surface velocity of this shape.
Point query info struct.
Definition: cpShape.h:27
void cpShapeSetFriction(cpShape *shape, cpFloat friction)
Set the friction of this shape.
cpFloat cpShapeGetFriction(const cpShape *shape)
Get the friction of this shape.
const cpShape * shape
The nearest shape, NULL if no shape was within range.
Definition: cpShape.h:29
cpBool cpShapeSegmentQuery(const cpShape *shape, cpVect a, cpVect b, cpFloat radius, cpSegmentQueryInfo *info)
Perform a segment query against a shape. info must be a pointer to a valid cpSegmentQueryInfo structu...
Chipmunk's axis-aligned 2D bounding box type. (left, bottom, right, top)
Definition: cpBB.h:33
void cpShapeSetBody(cpShape *shape, cpBody *body)
Set the cpBody this shape is connected to.
#define CP_NO_GROUP
Value for cpShape.group signifying that a shape is in no group.
Definition: chipmunk_types.h:249
#define CP_ALL_CATEGORIES
Value for cpShape.layers signifying that a shape is in every layer.
Definition: chipmunk_types.h:254
cpContactPointSet cpShapesCollide(const cpShape *a, const cpShape *b)
Return contact information about two shapes.
void cpShapeSetFilter(cpShape *shape, cpShapeFilter filter)
Set the collision filtering parameters of this shape.
cpShapeFilter cpShapeGetFilter(const cpShape *shape)
Get the collision filtering parameters of this shape.
void cpShapeSetCollisionType(cpShape *shape, cpCollisionType collisionType)
Get the collision type of this shape.
Definition: chipmunk_private.h:281
cpBB cpShapeGetBB(const cpShape *shape)
Get the bounding box that contains the shape given it's current position and angle.
void cpShapeFree(cpShape *shape)
Destroy and Free a shape.
struct cpPointQueryInfo cpPointQueryInfo
Point query info struct.