Chipmunk  6.0.3
Chipmunk API Reference for Kobold2D developers
Chipmunk Unsafe Shape Operations

Functions

void cpCircleShapeSetRadius (cpShape *shape, cpFloat radius)
 Set the radius of a circle shape.
void cpCircleShapeSetOffset (cpShape *shape, cpVect offset)
 Set the offset of a circle shape.
void cpSegmentShapeSetEndpoints (cpShape *shape, cpVect a, cpVect b)
 Set the endpoints of a segment shape.
void cpSegmentShapeSetRadius (cpShape *shape, cpFloat radius)
 Set the radius of a segment shape.
void cpPolyShapeSetVerts (cpShape *shape, int numVerts, cpVect *verts, cpVect offset)
 Set the vertexes of a poly shape.

Detailed Description

These functions are used for mutating collision shapes. Chipmunk does not have any way to get velocity information on changing shapes, so the results will be unrealistic. You must explicity include the chipmunk_unsafe.h header to use them.


Function Documentation

void cpCircleShapeSetOffset ( cpShape shape,
cpVect  offset 
)

Set the offset of a circle shape.

void cpCircleShapeSetRadius ( cpShape shape,
cpFloat  radius 
)

Set the radius of a circle shape.

void cpPolyShapeSetVerts ( cpShape shape,
int  numVerts,
cpVect verts,
cpVect  offset 
)

Set the vertexes of a poly shape.

void cpSegmentShapeSetEndpoints ( cpShape shape,
cpVect  a,
cpVect  b 
)

Set the endpoints of a segment shape.

void cpSegmentShapeSetRadius ( cpShape shape,
cpFloat  radius 
)

Set the radius of a segment shape.