Difference between revisions of "World"
m (Other languages template added.) |
|||
Line 11: | Line 11: | ||
| ?Description | | ?Description | ||
}} | }} | ||
+ | {{#ask: [[Category:Functions]] [[parent::Object]] | ||
+ | | headers=hide | ||
+ | | ?Description | ||
+ | }} | ||
+ | == Supertypes == | ||
+ | [[Object]] | ||
== See Also == | == See Also == | ||
* [[parent::love.physics]] | * [[parent::love.physics]] |
Revision as of 02:07, 13 February 2011
A world is an object that contains all bodies and joints.
Create a new world with love.physics.newWorld.
A world can call these functions:
Functions
World:destroy | Destroys the world. |
World:getAllowSleeping | Returns the sleep behaviour of the world. |
World:getBodies | Returns a table with all bodies. |
World:getBodyCount | Returns the number of bodies in the world. |
World:getBodyList | Returns a table with all bodies. |
World:getCallbacks | Returns functions for the callbacks during the world update. |
World:getContactCount | Returns the number of contacts in the world. |
World:getContactFilter | Returns the function for collision filtering. |
World:getContactList | Returns a table with all contacts. |
World:getContacts | Returns a table with all Contacts. |
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. |
World:getJoints | Returns a table with all joints. |
World:getMeter | Get the scale of the world. |
World:getShapesInArea | Gets a list of Shapes inside the specified area |
World:isAllowSleep | Get the sleep behaviour of the world. |
World:isDestroyed | Gets whether the World is destroyed. |
World:isLocked | Returns if the world is updating its state. |
World:isSleepingAllowed | Gets the sleep behaviour of the world. |
World:queryBoundingBox | Calls a function for each fixture inside the specified area. |
World:queryShapesInArea | Calls a function for each Shape inside the specified area. |
World:rayCast | Casts a ray and calls a function with the fixtures that intersect it. |
World:rayCastAny | Casts a ray and returns an intersection point if the ray touched any Shape in the world. |
World:rayCastClosest | Casts a ray and returns the intersection point of the closest Shape touched by the ray, if any. |
World:setAllowSleep | Set the sleep behaviour of the world. |
World:setAllowSleeping | Sets the sleep behaviour of the world. |
World:setCallbacks | Sets functions to be called when shapes collide. |
World:setContactFilter | Sets a function for collision filtering. |
World:setGravity | Set the gravity of the world. |
World:setMeter | Set the scale of the world. |
World:setSleepingAllowed | Sets the sleep behaviour of the world. |
World:translateOrigin | Translates the World's origin. |
World:update | Update the state of the world. |
Object:release | Immediately destroys the object's Lua reference. |
Object:type | Gets the type of the object as a string. |
Object:typeOf | Checks whether an object is of a certain type. |
Supertypes
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info