Difference between revisions of "Body"

Line 1: Line 1:
 
Bodies are objects with velocity and position.
 
Bodies are objects with velocity and position.
 
+
== Constructors ==
Create a new body with [[love.physics.newBody]].
+
{{#ask: [[Category:Functions]] [[Constructs::Body]] [[Since::<071]]
 
 
 
 
A body can call these functions:
 
 
 
== Functions ==
 
{{#ask: [[Category:Functions]] [[parent::Body]]
 
 
| headers=hide
 
| headers=hide
 +
| default=None.
 
| ?Description
 
| ?Description
 
}}
 
}}
{{#ask: [[Category:Functions]] [[parent::Object]]
+
== Functions ==
 +
{{#ask: [[Category:Functions]] [[parent::Body]] OR [[parent::Object]] [[Since::<071]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description
Line 19: Line 15:
 
== See Also ==
 
== See Also ==
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
* [[love.physics.newBody]]
 
 
[[Category:Types]]
 
[[Category:Types]]
{{#set:Description=Bodies are objects with velocity and position.
+
{{#set:Description=Bodies are objects with velocity and position.}}
}}
+
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Body}}
 
{{i18n|Body}}

Revision as of 10:45, 25 March 2011

Bodies are objects with velocity and position.

Constructors

love.physics.newBodyCreates a new body.

Functions

BodyBodies are objects with velocity and position.
Body:applyAngularImpulseApplies an angular impulse to a body.
Body:applyForceApply force to a Body.
Body:applyImpulseApplies an impulse to a body.
Body:applyLinearImpulseApplies an impulse to a body.
Body:applyTorqueApply torque to a body.
Body:destroyExplicitly destroys the Body.
Body:getAllowSleepingReturn whether a body is allowed to sleep.
Body:getAngleGet the angle of the body.
Body:getAngularDampingGets the Angular damping of the Body.
Body:getAngularVelocityGet the angular velocity of the Body.
Body:getContactListGets a list of all Contacts attached to the Body.
Body:getContactsGets a list of all Contacts attached to the Body.
Body:getFixtureListReturns a table with all fixtures.
Body:getFixturesReturns a table with all fixtures.
Body:getGravityScaleReturns the gravity scale factor.
Body:getInertiaGets the rotational inertia of the body.
Body:getJointListReturns a table containing the Joints attached to this Body.
Body:getJointsReturns a table containing the Joints attached to this Body.
Body:getLinearDampingGets the linear damping of the Body.
Body:getLinearVelocityGets the linear velocity of the Body from its center of mass.
Body:getLinearVelocityFromLocalPointGet the linear velocity of a point on the body.
Body:getLinearVelocityFromWorldPointGet the linear velocity of a point on the body.
Body:getLocalCenterGet the center of mass position in local coordinates.
Body:getLocalPointTransform a point from world coordinates to local coordinates.
Body:getLocalPointsTransforms multiple points from world coordinates to local coordinates.
Body:getLocalVectorTransform a vector from world coordinates to local coordinates.
Body:getMassGet the mass of the body.
Body:getMassDataReturns the mass, its center, and the rotational inertia.
Body:getPositionGet the position of the body.
Body:getShapeGets the first Shape attached to the Body.
Body:getShapesReturns a table with all Shapes attached to the Body.
Body:getTransformGet the position and angle of the body.
Body:getTypeReturns the type of the body.
Body:getUserDataReturns the Lua value associated with this Body.
Body:getWorldGets the World the body lives in.
Body:getWorldCenterGet the center of mass position in world coordinates.
Body:getWorldPointTransform a point from local coordinates to world coordinates.
Body:getWorldPointsTransforms multiple points from local coordinates to world coordinates.
Body:getWorldVectorTransform a vector from local coordinates to world coordinates.
Body:getXGet the x position of the body in world coordinates.
Body:getYGet the y position of the body in world coordinates.
Body:hasCustomMassDataGets whether the Body's mass data has been set to custom values.
Body:isActiveReturns whether the body is actively used in the simulation.
Body:isAwakeReturns the sleep status of the body.
Body:isBulletGet the bullet status of a body.
Body:isDestroyedGets whether the Body is destroyed.
Body:isDynamicGet the dynamic status of the body.
Body:isFixedRotationReturns whether the body rotation is locked.
Body:isFrozenGet the frozen status of the body.
... further results

Supertypes

Object

See Also


Other Languages