static cpDampedSpring *push_cpDampedSpring (lua_State *L) { cpDampedSpring *ds = cpDampedSpringAlloc(); cpDampedSpring **pds = (cpDampedSpring **)lua_newuserdata(L, sizeof(cpDampedSpring*)); *pds = ds; luaL_getmetatable(L, "cpDampedSpring"); lua_setmetatable(L, -2); return ds; }
cpConstraint * cpDampedSpringNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping) { return (cpConstraint *)cpDampedSpringInit(cpDampedSpringAlloc(), a, b, anchr1, anchr2, restLength, stiffness, damping); }