dchip.cpBody

Members

Aliases

cpBodyArbiterIteratorFunc
alias cpBodyArbiterIteratorFunc = void function(cpBody* bdy, cpArbiter* arbiter, void* data)

Body/arbiter iterator callback function type.

cpBodyConstraintIteratorFunc
alias cpBodyConstraintIteratorFunc = void function(cpBody* bdy, cpConstraint* constraint, void* data)

Body/constraint iterator callback function type.

cpBodyPositionFunc
alias cpBodyPositionFunc = void function(cpBody* bdy, cpFloat dt)

Rigid body_ position update function type.

cpBodyShapeIteratorFunc
alias cpBodyShapeIteratorFunc = void function(cpBody* bdy, cpShape* shape, void* data)

Body/shape iterator callback function type.

cpBodyVelocityFunc
alias cpBodyVelocityFunc = void function(cpBody* bdy, cpVect gravity, cpFloat damping, cpFloat dt)

Chipmunk's rigid body_ type. Rigid bodies hold the physical properties of an object like it's mass, and position and velocity of it's center of gravity. They don't have an shape on their own. They are given a shape by creating collision shapes (cpShape) that point to the body_. Rigid body_ velocity update function type.

Functions

cpBodyActivate
void cpBodyActivate(cpBody* body_)

Wake up a sleeping or idle body_.

cpBodyActivateStatic
void cpBodyActivateStatic(cpBody* body_, cpShape* filter)

Wake up any sleeping or idle bodies touching a static body_.

cpBodyActivateWrap
void cpBodyActivateWrap(cpBody* body_, void* data)

Workaround for https://github.com/slembcke/Chipmunk2D/issues/56.

cpBodyAssertSane
void cpBodyAssertSane(T bdy)

Check that the properties of a body_ is sane.

cpBodyIsRogue
cpBool cpBodyIsRogue(const cpBody* bdy)

Returns true if the body_ has not been added to a space. Note: Static bodies are a subtype of rogue bodies.

cpBodyIsSleeping
cpBool cpBodyIsSleeping(const cpBody* bdy)

Returns true if the body_ is sleeping.

cpBodyIsStatic
cpBool cpBodyIsStatic(const cpBody* bdy)

Returns true if the body_ is static.

cpBodyKineticEnergy
cpFloat cpBodyKineticEnergy(const cpBody* bdy)

Get the kinetic energy of a body_.

cpBodyLocal2World
cpVect cpBodyLocal2World(const cpBody* bdy, const cpVect v)

Convert body_ relative/local coordinates to absolute/world coordinates.

cpBodySleep
void cpBodySleep(cpBody* body_)

Force a body_ to fall asleep immediately.

cpBodySleepWithGroup
void cpBodySleepWithGroup(cpBody* body_, cpBody* group)

Force a body_ to fall asleep immediately along with other bodies in a group.

cpBodyWorld2Local
cpVect cpBodyWorld2Local(const cpBody* bdy, const cpVect v)

Convert body_ absolute/world coordinates to relative/local coordinates.

Structs

cpBody
struct cpBody

Chipmunk's rigid body_ struct.

cpComponentNode
struct cpComponentNode

Used internally to track information on the collision graph. @private

Meta