Change WheelJoint:get/setSpringFrequencyHz to get/setSpringFrequency

This commit is contained in:
Bill Meltsner
2012-02-06 10:32:33 -05:00
parent 20f4e567b3
commit 57dabc9f89
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -91,12 +91,12 @@ namespace box2d
return Physics::scaleUp(Physics::scaleUp(joint->GetMotorTorque(inv_dt))); return Physics::scaleUp(Physics::scaleUp(joint->GetMotorTorque(inv_dt)));
} }
void WheelJoint::setSpringFrequencyHz(float hz) void WheelJoint::setSpringFrequency(float hz)
{ {
joint->SetSpringFrequencyHz(hz); joint->SetSpringFrequencyHz(hz);
} }
float WheelJoint::getSpringFrequencyHz() const float WheelJoint::getSpringFrequency() const
{ {
return joint->GetSpringFrequencyHz(); return joint->GetSpringFrequencyHz();
} }
+2 -2
View File
@@ -101,12 +101,12 @@ namespace box2d
* Set the spring frequency, in hertz. Setting the frequency to 0 * Set the spring frequency, in hertz. Setting the frequency to 0
* disables the spring. * disables the spring.
**/ **/
void setSpringFrequencyHz(float hz); void setSpringFrequency(float hz);
/** /**
* Get the spring frequency, in hertz. * Get the spring frequency, in hertz.
**/ **/
float getSpringFrequencyHz() const; float getSpringFrequency() const;
/** /**
* Set the spring damping ratio. * Set the spring damping ratio.
@@ -101,18 +101,18 @@ namespace box2d
return 1; return 1;
} }
int w_WheelJoint_setSpringFrequencyHz(lua_State * L) int w_WheelJoint_setSpringFrequency(lua_State * L)
{ {
WheelJoint * t = luax_checkwheeljoint(L, 1); WheelJoint * t = luax_checkwheeljoint(L, 1);
float arg1 = (float)luaL_checknumber(L, 2); float arg1 = (float)luaL_checknumber(L, 2);
t->setSpringFrequencyHz(arg1); t->setSpringFrequency(arg1);
return 0; return 0;
} }
int w_WheelJoint_getSpringFrequencyHz(lua_State * L) int w_WheelJoint_getSpringFrequency(lua_State * L)
{ {
WheelJoint * t = luax_checkwheeljoint(L, 1); WheelJoint * t = luax_checkwheeljoint(L, 1);
lua_pushnumber(L, t->getSpringFrequencyHz()); lua_pushnumber(L, t->getSpringFrequency());
return 1; return 1;
} }
@@ -141,8 +141,8 @@ namespace box2d
{ "setMaxMotorTorque", w_WheelJoint_setMaxMotorTorque }, { "setMaxMotorTorque", w_WheelJoint_setMaxMotorTorque },
{ "getMaxMotorTorque", w_WheelJoint_getMaxMotorTorque }, { "getMaxMotorTorque", w_WheelJoint_getMaxMotorTorque },
{ "getMotorTorque", w_WheelJoint_getMotorTorque }, { "getMotorTorque", w_WheelJoint_getMotorTorque },
{ "setSpringFrequencyHz", w_WheelJoint_setSpringFrequencyHz }, { "setSpringFrequency", w_WheelJoint_setSpringFrequency },
{ "getSpringFrequencyHz", w_WheelJoint_getSpringFrequencyHz }, { "getSpringFrequency", w_WheelJoint_getSpringFrequency },
{ "setSpringDampingRatio", w_WheelJoint_setSpringDampingRatio }, { "setSpringDampingRatio", w_WheelJoint_setSpringDampingRatio },
{ "getSpringDampingRatio", w_WheelJoint_getSpringDampingRatio }, { "getSpringDampingRatio", w_WheelJoint_getSpringDampingRatio },
// From Joint. // From Joint.
+2 -2
View File
@@ -42,8 +42,8 @@ namespace box2d
int w_WheelJoint_setMaxMotorTorque(lua_State * L); int w_WheelJoint_setMaxMotorTorque(lua_State * L);
int w_WheelJoint_getMaxMotorTorque(lua_State * L); int w_WheelJoint_getMaxMotorTorque(lua_State * L);
int w_WheelJoint_getMotorTorque(lua_State * L); int w_WheelJoint_getMotorTorque(lua_State * L);
int w_WheelJoint_setSpringFrequencyHz(lua_State * L); int w_WheelJoint_setSpringFrequency(lua_State * L);
int w_WheelJoint_getSpringFrequencyHz(lua_State * L); int w_WheelJoint_getSpringFrequency(lua_State * L);
int w_WheelJoint_setSpringDampingRatio(lua_State * L); int w_WheelJoint_setSpringDampingRatio(lua_State * L);
int w_WheelJoint_getSpringDampingRatio(lua_State * L); int w_WheelJoint_getSpringDampingRatio(lua_State * L);
extern "C" int luaopen_wheeljoint(lua_State * L); extern "C" int luaopen_wheeljoint(lua_State * L);