Difference between revisions of "World"

m
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
A world is an object that contains all bodies and joints.
 
A world is an object that contains all bodies and joints.
 
+
== Constructors ==
Create a new world with [[love.physics.newWorld]].
+
{{#ask: [[Category:Functions]] [[Constructs::World]] [[Concept:Current]]
 
 
 
 
A world can call these functions:
 
 
 
== Functions ==
 
{{#ask: [[Category:Functions]] [[parent::World]]
 
 
| headers=hide
 
| headers=hide
 +
| default=None.
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 
| ?Description
 
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 
}}
 
}}
{{#ask: [[Category:Functions]] [[parent::Object]]
+
== Functions ==
 +
{{#ask: [[Category:Functions]] [[parent::World||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 
| ?Description
 
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 +
| ?PrettyDeprecated
 
}}
 
}}
 
== Supertypes ==
 
== Supertypes ==
[[Object]]
+
* [[parent::Object]]
 
== See Also ==
 
== See Also ==
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
* [[love.physics.newWorld]]
 
 
[[Category:Types]]
 
[[Category:Types]]
{{#set:Description=A world is an object that contains all bodies and joints.
+
{{#set:Description=A world is an object that contains all bodies and joints.}}
}}
+
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|World}}
 
{{i18n|World}}

Latest revision as of 17:00, 28 May 2019

A world is an object that contains all bodies and joints.

Constructors

love.physics.newWorld Creates a new World.

Functions

Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.
World:destroy Destroys the world. Added since 0.8.0
World:getAllowSleeping Returns the sleep behaviour of the world. Added since 0.8.0 Removed in 0.9.0
World:getBodies Returns a table with all bodies. Added since 11.0
World:getBodyCount Returns the number of bodies in the world.
World:getBodyList Returns a table with all bodies. Added since 0.8.0 Deprecated in 11.0
World:getCallbacks Returns functions for the callbacks during the world update.
World:getContactCount Returns the number of contacts in the world. Added since 0.8.0
World:getContactFilter Returns the function for collision filtering. Added since 0.8.0
World:getContactList Returns a table with all contacts. Added since 0.8.0 Deprecated in 11.0
World:getContacts Returns a table with all Contacts. Added since 11.0
World:getGravity Get the gravity of the world.
World:getJointCount Returns the number of joints in the world.
World:getJointList Returns a table with all joints. Added since 0.8.0 Deprecated in 11.0
World:getJoints Returns a table with all joints. Added since 11.0
World:isAllowSleep Get the sleep behaviour of the world. Removed in 0.8.0
World:isDestroyed Gets whether the World is destroyed. Added since 0.9.2
World:isLocked Returns if the world is updating its state. Added since 0.8.0
World:isSleepingAllowed Gets the sleep behaviour of the world. Added since 0.9.0
World:queryBoundingBox Calls a function for each fixture inside the specified area. Added since 0.8.0
World:rayCast Casts a ray and calls a function with the fixtures that intersect it. Added since 0.8.0
World:setAllowSleep Set the sleep behaviour of the world. Removed in 0.8.0
World:setAllowSleeping Sets the sleep behaviour of the world. Added since 0.8.0 Removed in 0.9.0
World:setCallbacks Sets functions to be called when shapes collide. Added since 0.8.0
World:setContactFilter Sets a function for collision filtering. Added since 0.8.0
World:setGravity Set the gravity of the world.
World:setMeter Set the scale of the world. Removed in 0.8.0
World:setSleepingAllowed Sets the sleep behaviour of the world. Added since 0.9.0
World:translateOrigin Translates the World's origin. Added since 0.9.0
World:update Update the state of the world.

Supertypes

See Also


Other Languages