Class CP::Body
In: doc_dummy.rb
Parent: Object

The Chipmunk rigid body class.

Methods

Attributes

a  [RW]  Angle. (in radians)
f  [RW]  Force.
i  [RW]  Moment of inertia.
m  [RW]  Mass.
p  [RW]  Position.
rot  [R]  Rotation vector.
t  [RW]  Torque.
v  [RW]  Velocity.
w  [RW]  Angular Velocity. (in radians/second)

Public Class methods

Create a body with the given mass and moment of inertia.

Public Instance methods

Accumulate a force as applied at the offset in world coordinates.

Apply an impulse as applied at the offset in world coordinates.

Covnvert body local coordinates to world space coordinates.

Zero the accumulated forces and torques.

Integrate the velocity of the body for the given gravity, damping and time step. (Uses Euler integration)

Integrate the position of the body for the given time step. (Uses Euler integration)

Covnvert world space coordinates to body local coordinates.

[Validate]