示例#1
0
int w_Contact_setRestitution(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	float r = (float)luaL_checknumber(L, 2);
	t->setRestitution(r);
	return 0;
}
示例#2
0
int w_Contact_setEnabled(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	bool e = luax_toboolean(L, 2);
	t->setEnabled(e);
	return 0;
}
示例#3
0
int w_Contact_setTangentSpeed(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	float speed = (float) luaL_checknumber(L, 2);
	t->setTangentSpeed(speed);
	return 0;
}
示例#4
0
int w_Contact_setFriction(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	float f = (float)luaL_checknumber(L, 2);
	t->setFriction(f);
	return 0;
}
示例#5
0
int w_Contact_getChildren(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	int a, b;
	t->getChildren(a, b);
	lua_pushnumber(L, a + 1);
	lua_pushnumber(L, b + 1);
	return 2;
}
示例#6
0
int w_Contact_getFixtures(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	Fixture *a = nullptr;
	Fixture *b = nullptr;
	luax_catchexcept(L, [&](){ t->getFixtures(a, b); });

	luax_pushtype(L, PHYSICS_FIXTURE_ID, a);
	luax_pushtype(L, PHYSICS_FIXTURE_ID, b);
	return 2;
}
示例#7
0
	int _wrap_Contact_getRestitution(lua_State * L)
	{
		Contact * t = luax_checkcontact(L, 1);
		lua_pushnumber(L, t->getRestitution());
		return 1;
	}
示例#8
0
	int _wrap_Contact_getNormal(lua_State * L)
	{
		Contact * t = luax_checkcontact(L, 1);
		return t->getNormal(L);
	}
示例#9
0
	int _wrap_Contact_getVelocity(lua_State * L)
	{
		Contact * t = luax_checkcontact(L, 1);
		return t->getVelocity(L);
	}
示例#10
0
	int _wrap_Contact_getPosition(lua_State * L)
	{
		Contact * t = luax_checkcontact(L, 1);
		return t->getPosition(L);
	}
示例#11
0
int w_Contact_isTouching(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	lua_pushboolean(L, t->isTouching());
	return 1;
}
示例#12
0
int w_Contact_isEnabled(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	lua_pushboolean(L, t->isEnabled());
	return 1;
}
示例#13
0
int w_Contact_getFriction(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	lua_pushnumber(L, t->getFriction());
	return 1;
}
示例#14
0
int w_Contact_getTangentSpeed(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	lua_pushnumber(L, t->getTangentSpeed());
	return 1;
}
示例#15
0
int w_Contact_resetRestitution(lua_State *L)
{
	Contact *t = luax_checkcontact(L, 1);
	t->resetRestitution();
	return 0;
}