|
@@ -31,7 +31,41 @@ namespace box2d
|
|
|
return luax_checktype<WeldJoint>(L, idx, "WeldJoint", PHYSICS_WELD_JOINT_T);
|
|
|
}
|
|
|
|
|
|
+ int w_WeldJoint_setFrequency(lua_State * L)
|
|
|
+ {
|
|
|
+ WeldJoint * t = luax_checkweldjoint(L, 1);
|
|
|
+ float arg1 = (float)luaL_checknumber(L, 2);
|
|
|
+ t->setFrequency(arg1);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ int w_WeldJoint_getFrequency(lua_State * L)
|
|
|
+ {
|
|
|
+ WeldJoint * t = luax_checkweldjoint(L, 1);
|
|
|
+ lua_pushnumber(L, t->getFrequency());
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ int w_WeldJoint_setDampingRatio(lua_State * L)
|
|
|
+ {
|
|
|
+ WeldJoint * t = luax_checkweldjoint(L, 1);
|
|
|
+ float arg1 = (float)luaL_checknumber(L, 2);
|
|
|
+ t->setDampingRatio(arg1);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ int w_WeldJoint_getDampingRatio(lua_State * L)
|
|
|
+ {
|
|
|
+ WeldJoint * t = luax_checkweldjoint(L, 1);
|
|
|
+ lua_pushnumber(L, t->getDampingRatio());
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
static const luaL_Reg functions[] = {
|
|
|
+ { "setFrequency", w_WeldJoint_setFrequency },
|
|
|
+ { "getFrequency", w_WeldJoint_getFrequency },
|
|
|
+ { "setDampingRatio", w_WeldJoint_setDampingRatio },
|
|
|
+ { "getDampingRatio", w_WeldJoint_getDampingRatio },
|
|
|
// From Joint.
|
|
|
{ "getType", w_Joint_getType },
|
|
|
{ "getAnchors", w_Joint_getAnchors },
|