Home | Trees | Indices | Help |
|
---|
|
object --+ | Body
A rigid body
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Static Methods | |||
|
|||
|
Properties | |
mass | |
moment | |
angle The rotation of the body. |
|
rotation_vector | |
torque | |
position | |
velocity | |
velocity_limit | |
angular_velocity | |
angular_velocity_limit | |
force | |
velocity_func The velocity callback function. The velocity callback function is called each time step, and can be used to set a body's velocity. |
|
position_func The position callback function. The position callback function is called each time step and can be used to update the body's position. |
|
kinetic_energy Get the kinetic energy of a body. |
|
is_sleeping Returns true if the body is sleeping. |
|
is_rogue Returns true if the body has not been added to a space. |
|
is_static Returns true if the body is a static body |
|
Inherited from |
Method Details |
Create a new Body To create a static body, pass in None for mass and moment.
|
Default rigid body velocity integration function. Updates the velocity of the body using Euler integration. |
Default rigid body position integration function. Updates the position of the body using Euler integration. Unlike the velocity function, it's unlikely you'll want to override this function. If you do, make sure you understand it's source code (in Chipmunk) as it's an important part of the collision/joint correction process. |
|
Apply (accumulate) the force f on body at a relative offset (important!) r from the center of gravity. Both r and f are in world coordinates. |
Apply a spring force between this body and b at anchors anchr1 and anchr2 respectively. Note not solving the damping forces in the impulse solver causes problems with large damping values. There is a new constraint type DampedSpring that should be used instead.
|
|
|
Property Details |
moment
|
angleThe rotation of the body. Note If you get small/no changes to the angle when for example a ball is "rolling" down a slope it might be because the Circle shape attached to the body or the slope shape does not have any friction set.
|
rotation_vector
|
torque
|
position
|
velocity
|
velocity_limit
|
angular_velocity
|
angular_velocity_limit
|
force
|
velocity_funcThe velocity callback function. The velocity callback function is called each time step, and can be used to set a body's velocity.
|
position_funcThe position callback function. The position callback function is called each time step and can be used to update the body's position.
|
kinetic_energyGet the kinetic energy of a body.
|
is_sleepingReturns true if the body is sleeping.
|
is_rogueReturns true if the body has not been added to a space.
|
is_staticReturns true if the body is a static body
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Dec 04 02:06:46 2011 | http://epydoc.sourceforge.net |