Update Body API.

--HG--
branch : box2d-update
This commit is contained in:
Bill Meltsner
2011-09-23 22:21:14 -04:00
parent 0678eac453
commit 367dbc2ecc
14 changed files with 416 additions and 195 deletions
+1 -12
View File
@@ -47,21 +47,10 @@ namespace box2d
World * world = luax_checktype<World>(L, 1, "World", PHYSICS_WORLD_T);
float x = (float)luaL_optnumber(L, 2, 0.0);
float y = (float)luaL_optnumber(L, 3, 0.0);
float m = (float)luaL_optnumber(L, 4, 0.0);
float i = (float)luaL_optnumber(L, 5, 0.0);
Body * body = instance->newBody(world, x, y, m, i);
Body * body = instance->newBody(world, x, y);
luax_newtype(L, "Body", PHYSICS_BODY_T, (void*)body);
return 1;
}
int w_newFixture(lua_State * L)
{
Body * body = luax_checkbody(L, 1);
Shape * shape = luax_checkshape(L, 2);
Fixture * fixture = instance->newFixture(body, shape);
luax_newtype(L, "Fixture", PHYSICS_FIXTURE_T, (void*)fixture);
return 1;
}
int w_newCircleShape(lua_State * L)
{