Difference between revisions of "Body"

(Added enums.)
Line 1: Line 1:
 
Bodies are objects with velocity and position.
 
Bodies are objects with velocity and position.
 
== Constructors ==
 
== Constructors ==
{{#ask: [[Category:Functions]] [[Constructs::Body]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[Constructs::Body]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
Line 7: Line 7:
 
}}
 
}}
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::Body||Object]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[parent::Body||Object]] [[Concept:Current]]
 +
| headers=hide
 +
| ?Description
 +
}}
 +
== Enums ==
 +
{{#ask: [[Category:Enums]] [[parent::Body]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description

Revision as of 23:27, 11 April 2012

Bodies are objects with velocity and position.

Constructors

love.physics.newBodyCreates a new body.

Functions

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: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: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.
Body:isSleepingGet the sleeping status of a body.
Body:isSleepingAllowedReturns the sleeping behaviour of the body.
Body:isStaticGet the static status of the body.
Body:isTouchingGets whether the Body is touching the given other Body.
Body:putToSleepPut the body to sleep.
... further results

Enums

BodyTypeThe types of a Body.

Supertypes

Object

See Also


Other Languages