Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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);
}