cpBody

Chipmunk's rigid body_ struct.

struct cpBody {
cpVect v_bias;
cpVect v_bias;
cpFloat w_bias;
cpFloat w_bias;
cpSpace* space;
cpSpace* space;
cpShape* shapeList;
cpShape* shapeList;
cpArbiter* arbiterList;
cpArbiter* arbiterList;
cpConstraint* constraintList;
cpConstraint* constraintList;
cpComponentNode node;
cpComponentNode node;
}

Members

Variables

a
cpFloat a;

Rotation of the body_ around it's center of gravity in radians. Must agree with cpBody.rot! Use cpBodySetAngle() when changing the angle for this reason.

data
cpDataPointer data;

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

f
cpVect f;

Force acting on the rigid body_'s center of gravity.

i
cpFloat i;

Moment of inertia of the body_. Must agree with cpBody.i_inv! Use cpBodySetMoment() when changing the moment for this reason.

i_inv
cpFloat i_inv;

Moment of inertia inverse.

m
cpFloat m;

Mass of the body_. Must agree with cpBody.m_inv! Use cpBodySetMass() when changing the mass for this reason.

m_inv
cpFloat m_inv;

Mass inverse.

p
cpVect p;

Position of the rigid body_'s center of gravity.

position_func
cpBodyPositionFunc position_func;

Function that is called to integrate the body_'s position. (Defaults to cpBodyUpdatePosition)

rot
cpVect rot;

Cached unit length vector representing the angle of the body_. Used for fast rotations using cpvrotate().

t
cpFloat t;

Torque applied to the body_ around it's center of gravity.

v
cpVect v;

Velocity of the rigid body_'s center of gravity.

v_limit
cpFloat v_limit;

Maximum velocity allowed when updating the velocity.

velocity_func
cpBodyVelocityFunc velocity_func;

Function that is called to integrate the body_'s velocity. (Defaults to cpBodyUpdateVelocity)

w
cpFloat w;

Angular velocity of the body_ around it's center of gravity in radians/second.

w_limit
cpFloat w_limit;

Maximum rotational rate (in radians/second) allowed when updating the angular velocity.

Meta