91 @property(nonatomic, readonly)
cpBody *body;
137 - (void)applyForce:(
cpVect)force atLocalPoint:(
cpVect)point;
138 - (void)applyForce:(
cpVect)force atWorldPoint:(
cpVect)point;
145 - (void)applyImpulse:(
cpVect)impulse atLocalPoint:(
cpVect)point;
146 - (void)applyImpulse:(
cpVect)impulse atWorldPoint:(
cpVect)point;
190 -(void)updatePosition:(
cpFloat)dt;
cpVect position
The position of the rigid body's center of gravity.
Definition: ChipmunkBody.h:70
cpBodyType type
Type of the body (dynamic, kinematic, static).
Definition: ChipmunkBody.h:58
cpVect centerOfGravity
Location of the body's center of gravity relative to it's position. Defaults to cpvzero.
Definition: ChipmunkBody.h:67
void activate()
Wake up the body if it's sleeping, or reset the idle timer if it's active.
NSArray * constraints()
Get a list of constraints that are attached to this body and currently added to a space...
cpBodyType
Definition: cpBody.h:28
void(^ ChipmunkBodyArbiterIteratorBlock)(cpArbiter *arbiter)
Body/arbiter iterator callback block type.
Definition: ChipmunkBody.h:174
Definition: chipmunk_private.h:80
cpFloat angularVelocity
The angular velocity of the rigid body in radians per second.
Definition: ChipmunkBody.h:82
NSArray * shapes()
Get a list of shapes that are attached to this body and currently added to a space.
Rigid bodies are the basic unit of simulation in Chipmunk.
Definition: ChipmunkBody.h:29
id staticBody()
Create an autoreleased static body.
double cpFloat
Chipmunk's floating point type.
Definition: chipmunk_types.h:83
Chipmunk spaces are simulation containers.
Definition: ChipmunkSpace.h:32
bool isSleeping
Has the body been put to sleep by the space?
Definition: ChipmunkBody.h:100
cpVect velocity
The linear velocity of the rigid body.
Definition: ChipmunkBody.h:73
Definition: chipmunk_types.h:271
Abstract base class for collsion shape types.
Definition: ChipmunkShape.h:27
cpFloat angle
The rotation angle of the rigid body in radians.
Definition: ChipmunkBody.h:79
cpFloat torque
The torque being applied to the rigid body. Like force, this property is not reset every frame...
Definition: ChipmunkBody.h:85
cpVect force
The linear force applied to the rigid body. Unlike in some physics engines, the force does not reset ...
Definition: ChipmunkBody.h:76
Definition: chipmunk_private.h:185
Constraints connect two ChipmunkBody objects together.
Definition: ChipmunkConstraint.h:33
ChipmunkSpace * space
Get the space the body is added to.
Definition: ChipmunkBody.h:106
cpTransform transform
The rigid transform of the body.
Definition: ChipmunkBody.h:88
cpFloat mass
Mass of the rigid body. Mass does not have to be expressed in any particular units, but relative masses should be consistent.
Definition: ChipmunkBody.h:61
id kinematicBody()
Create an autoreleased kinematic body.
cpFloat kineticEnergy
Get the kinetic energy of this body.
Definition: ChipmunkBody.h:103
id userData
An object that this constraint is associated with.
Definition: ChipmunkBody.h:97
void sleep()
Equivalent to [ChipmunkBody sleepWithGroup:nil].
cpFloat moment
Moment of inertia of the body. The mass tells you how hard it is to push an object, the MoI tells you how hard it is to spin the object. Don't try to guess the MoI, use the cpMomentFor*() functions to try and estimate it.
Definition: ChipmunkBody.h:64