mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Change WheelJoint:get/setSpringFrequencyHz to get/setSpringFrequency
This commit is contained in:
@@ -91,12 +91,12 @@ namespace box2d
|
||||
return Physics::scaleUp(Physics::scaleUp(joint->GetMotorTorque(inv_dt)));
|
||||
}
|
||||
|
||||
void WheelJoint::setSpringFrequencyHz(float hz)
|
||||
void WheelJoint::setSpringFrequency(float hz)
|
||||
{
|
||||
joint->SetSpringFrequencyHz(hz);
|
||||
}
|
||||
|
||||
float WheelJoint::getSpringFrequencyHz() const
|
||||
float WheelJoint::getSpringFrequency() const
|
||||
{
|
||||
return joint->GetSpringFrequencyHz();
|
||||
}
|
||||
|
||||
@@ -101,12 +101,12 @@ namespace box2d
|
||||
* Set the spring frequency, in hertz. Setting the frequency to 0
|
||||
* disables the spring.
|
||||
**/
|
||||
void setSpringFrequencyHz(float hz);
|
||||
void setSpringFrequency(float hz);
|
||||
|
||||
/**
|
||||
* Get the spring frequency, in hertz.
|
||||
**/
|
||||
float getSpringFrequencyHz() const;
|
||||
float getSpringFrequency() const;
|
||||
|
||||
/**
|
||||
* Set the spring damping ratio.
|
||||
|
||||
@@ -101,18 +101,18 @@ namespace box2d
|
||||
return 1;
|
||||
}
|
||||
|
||||
int w_WheelJoint_setSpringFrequencyHz(lua_State * L)
|
||||
int w_WheelJoint_setSpringFrequency(lua_State * L)
|
||||
{
|
||||
WheelJoint * t = luax_checkwheeljoint(L, 1);
|
||||
float arg1 = (float)luaL_checknumber(L, 2);
|
||||
t->setSpringFrequencyHz(arg1);
|
||||
t->setSpringFrequency(arg1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int w_WheelJoint_getSpringFrequencyHz(lua_State * L)
|
||||
int w_WheelJoint_getSpringFrequency(lua_State * L)
|
||||
{
|
||||
WheelJoint * t = luax_checkwheeljoint(L, 1);
|
||||
lua_pushnumber(L, t->getSpringFrequencyHz());
|
||||
lua_pushnumber(L, t->getSpringFrequency());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -141,8 +141,8 @@ namespace box2d
|
||||
{ "setMaxMotorTorque", w_WheelJoint_setMaxMotorTorque },
|
||||
{ "getMaxMotorTorque", w_WheelJoint_getMaxMotorTorque },
|
||||
{ "getMotorTorque", w_WheelJoint_getMotorTorque },
|
||||
{ "setSpringFrequencyHz", w_WheelJoint_setSpringFrequencyHz },
|
||||
{ "getSpringFrequencyHz", w_WheelJoint_getSpringFrequencyHz },
|
||||
{ "setSpringFrequency", w_WheelJoint_setSpringFrequency },
|
||||
{ "getSpringFrequency", w_WheelJoint_getSpringFrequency },
|
||||
{ "setSpringDampingRatio", w_WheelJoint_setSpringDampingRatio },
|
||||
{ "getSpringDampingRatio", w_WheelJoint_getSpringDampingRatio },
|
||||
// From Joint.
|
||||
|
||||
@@ -42,8 +42,8 @@ namespace box2d
|
||||
int w_WheelJoint_setMaxMotorTorque(lua_State * L);
|
||||
int w_WheelJoint_getMaxMotorTorque(lua_State * L);
|
||||
int w_WheelJoint_getMotorTorque(lua_State * L);
|
||||
int w_WheelJoint_setSpringFrequencyHz(lua_State * L);
|
||||
int w_WheelJoint_getSpringFrequencyHz(lua_State * L);
|
||||
int w_WheelJoint_setSpringFrequency(lua_State * L);
|
||||
int w_WheelJoint_getSpringFrequency(lua_State * L);
|
||||
int w_WheelJoint_setSpringDampingRatio(lua_State * L);
|
||||
int w_WheelJoint_getSpringDampingRatio(lua_State * L);
|
||||
extern "C" int luaopen_wheeljoint(lua_State * L);
|
||||
|
||||
Reference in New Issue
Block a user