int w_World_update(lua_State * L) { World * t = luax_checkworld(L, 1); float dt = (float)luaL_checknumber(L, 2); t->update(dt); return 0; }
int w_World_update(lua_State *L) { World *t = luax_checkworld(L, 1); float dt = (float)luaL_checknumber(L, 2); luax_catchexcept(L, [&](){ t->update(dt); }); return 0; }
int w_World_setSleepingAllowed(lua_State *L) { World *t = luax_checkworld(L, 1); bool b = luax_toboolean(L, 2); t->setSleepingAllowed(b); return 0; }
int w_World_translateOrigin(lua_State *L) { World *t = luax_checkworld(L, 1); float arg1 = (float)luaL_checknumber(L, 2); float arg2 = (float)luaL_checknumber(L, 3); EXCEPT_GUARD(t->translateOrigin(arg1, arg2);) return 0;
int w_World_getContacts(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); int ret = 0; luax_catchexcept(L, [&](){ ret = t->getContacts(L); }); return ret; }
int w_World_destroy(lua_State *L) { World *t = luax_checkworld(L, 1); luax_catchexcept(L, [&]() { t->destroy(); }); return 0; }
int w_World_rayCast(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); int ret = 0; luax_catchexcept(L, [&](){ ret = t->rayCast(L); }); return ret; }
int w_World_setMeter(lua_State * L) { World * t = luax_checkworld(L, 1); int arg1 = luaL_checkint(L, 2); t->setMeter(arg1); return 0; }
int w_World_setGravity(lua_State *L) { World *t = luax_checkworld(L, 1); float arg1 = (float)luaL_checknumber(L, 2); float arg2 = (float)luaL_checknumber(L, 3); t->setGravity(arg1, arg2); return 0; }
int w_World_translateOrigin(lua_State *L) { World *t = luax_checkworld(L, 1); float arg1 = (float)luaL_checknumber(L, 2); float arg2 = (float)luaL_checknumber(L, 3); luax_catchexcept(L, [&](){ t->translateOrigin(arg1, arg2); }); return 0; }
int w_World_update(lua_State *L) { World *t = luax_checkworld(L, 1); float dt = (float)luaL_checknumber(L, 2); // Make sure the world callbacks are using the calling Lua thread. t->setCallbacksL(L); luax_catchexcept(L, [&]() { t->update(dt); }); return 0; }
int w_World_destroy(lua_State *L) { World *t = luax_checkworld(L, 1); try { t->destroy(); } catch(love::Exception &e) { luaL_error(L, "%s", e.what()); } return 0; }
int w_World_update(lua_State *L) { World *t = luax_checkworld(L, 1); float dt = (float)luaL_checknumber(L, 2); // Make sure the world callbacks are using the calling Lua thread. t->setCallbacksL(L); if (lua_isnoneornil(L, 3)) luax_catchexcept(L, [&](){ t->update(dt); }); else { int velocityiterations = (int) luaL_checkinteger(L, 3); int positioniterations = (int) luaL_checkinteger(L, 4); luax_catchexcept(L, [&](){ t->update(dt, velocityiterations, positioniterations); }); } return 0; }
int w_World_queryBoundingBox(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); return t->queryBoundingBox(L); }
int w_World_getContactCount(lua_State *L) { World *t = luax_checkworld(L, 1); lua_pushinteger(L, t->getContactCount()); return 1; }
int w_World_isLocked(lua_State *L) { World *t = luax_checkworld(L, 1); luax_pushboolean(L, t->isLocked()); return 1; }
int w_World_rayCast(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); ASSERT_GUARD(return t->rayCast(L);) }
int w_World_getMeter(lua_State * L) { World * t = luax_checkworld(L, 1); lua_pushinteger(L, t->getMeter()); return 1; }
int w_World_getCallbacks(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); return t->getCallbacks(L); }
int w_World_getJointList(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); return t->getJointList(L); }
int w_World_getContactFilter(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); return t->getContactFilter(L); }
int w_World_isSleepingAllowed(lua_State *L) { World *t = luax_checkworld(L, 1); luax_pushboolean(L, t->isSleepingAllowed()); return 1; }
int w_World_getGravity(lua_State *L) { World *t = luax_checkworld(L, 1); lua_remove(L, 1); return t->getGravity(L); }
int w_World_getAllowSleeping(lua_State *L) { World *t = luax_checkworld(L, 1); luax_pushboolean(L, t->getAllowSleeping()); return 1; }