Difference between revisions of "Body"

(Added enums.)
(Modify #ask query to actually show all functions.)
Line 3: Line 3:
 
{{#ask: [[Category:Functions]] [[Constructs::Body]] [[Concept:Current]]
 
{{#ask: [[Category:Functions]] [[Constructs::Body]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 +
|
 
| default=None.
 
| default=None.
 
| ?Description
 
| ?Description
Line 9: Line 10:
 
{{#ask: [[Category:Functions]] [[parent::Body||Object]] [[Concept:Current]]
 
{{#ask: [[Category:Functions]] [[parent::Body||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 +
| limit=500
 
| ?Description
 
| ?Description
 
}}
 
}}

Revision as of 03:27, 30 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: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.
Body:resetMassDataResets the mass of the body.
Body:setActiveSets whether the body is active in the world.
Body:setAllowSleepingSet the sleep behaviour of a body.
Body:setAngleSet the angle of the body.
Body:setAngularDampingSets the angular damping of a Body
Body:setAngularVelocitySets the angular velocity of a Body.
Body:setAwakeWakes the body up or puts it to sleep.
Body:setBulletSet the bullet status of a body.
Body:setFixedRotationSet whether a body has fixed rotation.
Body:setGravityScaleSets a new gravity scale factor for the body.
Body:setInertiaSet the inertia of a body.
Body:setLinearDampingSets the linear damping of a Body.
Body:setLinearVelocitySets a new linear velocity for the Body.
Body:setMassSets the mass properties directly.
Body:setMassDataOverrides the calculated mass data.
Body:setMassFromShapesSets mass properties from attatched shapes.
Body:setPositionSet the position of the body.
Body:setSleepingAllowedSets the sleeping behaviour of the body.
Body:setTypeSets a new body type.
Body:setUserDataAssociates a Lua value with the Body.
Body:setXSet the x position of the body.
Body:setYSet the y position of the body.
Body:wakeUpWake up a sleeping body.
Object:releaseImmediately destroys the object's Lua reference.
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.

Enums

BodyTypeThe types of a Body.

Supertypes

Object

See Also


Other Languages