diff --git a/src/modules/physics/box2d/PrismaticJoint.cpp b/src/modules/physics/box2d/PrismaticJoint.cpp index 617f1f49f..05c708f50 100644 --- a/src/modules/physics/box2d/PrismaticJoint.cpp +++ b/src/modules/physics/box2d/PrismaticJoint.cpp @@ -61,9 +61,9 @@ float PrismaticJoint::getJointSpeed() const return Physics::scaleUp(joint->GetJointSpeed()); } -void PrismaticJoint::enableMotor(bool motor) +void PrismaticJoint::setMotorEnabled(bool enable) { - return joint->EnableMotor(motor); + return joint->EnableMotor(enable); } bool PrismaticJoint::isMotorEnabled() const @@ -96,12 +96,12 @@ float PrismaticJoint::getMaxMotorForce() const return Physics::scaleUp(joint->GetMaxMotorForce()); } -void PrismaticJoint::enableLimit(bool limit) +void PrismaticJoint::setLimitsEnabled(bool enable) { - joint->EnableLimit(limit); + joint->EnableLimit(enable); } -bool PrismaticJoint::isLimitEnabled() const +bool PrismaticJoint::hasLimitsEnabled() const { return joint->IsLimitEnabled(); } diff --git a/src/modules/physics/box2d/PrismaticJoint.h b/src/modules/physics/box2d/PrismaticJoint.h index c412dd225..4c42340cd 100644 --- a/src/modules/physics/box2d/PrismaticJoint.h +++ b/src/modules/physics/box2d/PrismaticJoint.h @@ -59,7 +59,7 @@ public: /** * Enable/disable the joint motor. **/ - void enableMotor(bool motor); + void setMotorEnabled(bool enable); /** * Checks whether the motor is enabled. @@ -93,14 +93,14 @@ public: float getMaxMotorForce() const; /** - * Enable/disable the joint limit. + * Enable/disable the joint limits. **/ - void enableLimit(bool limit); + void setLimitsEnabled(bool enable); /** * Checks whether limits are enabled. **/ - bool isLimitEnabled() const; + bool hasLimitsEnabled() const; /** * Sets the upper limit, usually in meters. diff --git a/src/modules/physics/box2d/RevoluteJoint.cpp b/src/modules/physics/box2d/RevoluteJoint.cpp index 5f9b90fa0..bb5dfba9f 100644 --- a/src/modules/physics/box2d/RevoluteJoint.cpp +++ b/src/modules/physics/box2d/RevoluteJoint.cpp @@ -58,9 +58,9 @@ float RevoluteJoint::getJointSpeed() const return joint->GetJointSpeed(); } -void RevoluteJoint::enableMotor(bool motor) +void RevoluteJoint::setMotorEnabled(bool enable) { - return joint->EnableMotor(motor); + return joint->EnableMotor(enable); } bool RevoluteJoint::isMotorEnabled() const @@ -93,12 +93,12 @@ float RevoluteJoint::getMaxMotorTorque() const return Physics::scaleUp(Physics::scaleUp(joint->GetMaxMotorTorque())); } -void RevoluteJoint::enableLimit(bool limit) +void RevoluteJoint::setLimitsEnabled(bool enable) { - joint->EnableLimit(limit); + joint->EnableLimit(enable); } -bool RevoluteJoint::isLimitEnabled() const +bool RevoluteJoint::hasLimitsEnabled() const { return joint->IsLimitEnabled(); } diff --git a/src/modules/physics/box2d/RevoluteJoint.h b/src/modules/physics/box2d/RevoluteJoint.h index 82b6113ae..2d2bc82e4 100644 --- a/src/modules/physics/box2d/RevoluteJoint.h +++ b/src/modules/physics/box2d/RevoluteJoint.h @@ -59,7 +59,7 @@ public: /** * Enable/disable the joint motor. **/ - void enableMotor(bool motor); + void setMotorEnabled(bool enable); /** * Checks whether the motor is enabled. @@ -95,12 +95,12 @@ public: /** * Enable/disable the joint limit. **/ - void enableLimit(bool limit); + void setLimitsEnabled(bool enable); /** * Checks whether limits are enabled. **/ - bool isLimitEnabled() const; + bool hasLimitsEnabled() const; /** * Sets the upper limit in degrees. diff --git a/src/modules/physics/box2d/WheelJoint.cpp b/src/modules/physics/box2d/WheelJoint.cpp index b5c27e2b4..2de0bd05e 100644 --- a/src/modules/physics/box2d/WheelJoint.cpp +++ b/src/modules/physics/box2d/WheelJoint.cpp @@ -58,9 +58,9 @@ float WheelJoint::getJointSpeed() const return Physics::scaleUp(joint->GetJointSpeed()); } -void WheelJoint::enableMotor(bool motor) +void WheelJoint::setMotorEnabled(bool enable) { - return joint->EnableMotor(motor); + return joint->EnableMotor(enable); } bool WheelJoint::isMotorEnabled() const diff --git a/src/modules/physics/box2d/WheelJoint.h b/src/modules/physics/box2d/WheelJoint.h index 7aaddccba..bc5961f79 100644 --- a/src/modules/physics/box2d/WheelJoint.h +++ b/src/modules/physics/box2d/WheelJoint.h @@ -60,7 +60,7 @@ public: /** * Enable/disable the joint motor. **/ - void enableMotor(bool motor); + void setMotorEnabled(bool enable); /** * Checks whether the motor is enabled. diff --git a/src/modules/physics/box2d/wrap_PrismaticJoint.cpp b/src/modules/physics/box2d/wrap_PrismaticJoint.cpp index 0cc24d88c..6ec44673c 100644 --- a/src/modules/physics/box2d/wrap_PrismaticJoint.cpp +++ b/src/modules/physics/box2d/wrap_PrismaticJoint.cpp @@ -50,11 +50,11 @@ int w_PrismaticJoint_getJointSpeed(lua_State *L) return 1; } -int w_PrismaticJoint_enableMotor(lua_State *L) +int w_PrismaticJoint_setMotorEnabled(lua_State *L) { PrismaticJoint *t = luax_checkprismaticjoint(L, 1); bool arg1 = luax_toboolean(L, 2); - t->enableMotor(arg1); + t->setMotorEnabled(arg1); return 0; } @@ -103,18 +103,18 @@ int w_PrismaticJoint_getMaxMotorForce(lua_State *L) return 1; } -int w_PrismaticJoint_enableLimit(lua_State *L) +int w_PrismaticJoint_setLimitsEnabled(lua_State *L) { PrismaticJoint *t = luax_checkprismaticjoint(L, 1); bool arg1 = luax_toboolean(L, 2); - t->enableLimit(arg1); + t->setLimitsEnabled(arg1); return 0; } -int w_PrismaticJoint_isLimitEnabled(lua_State *L) +int w_PrismaticJoint_hasLimitsEnabled(lua_State *L) { PrismaticJoint *t = luax_checkprismaticjoint(L, 1); - luax_pushboolean(L, t->isLimitEnabled()); + luax_pushboolean(L, t->hasLimitsEnabled()); return 1; } @@ -168,15 +168,15 @@ static const luaL_Reg functions[] = { { "getJointTranslation", w_PrismaticJoint_getJointTranslation }, { "getJointSpeed", w_PrismaticJoint_getJointSpeed }, - { "enableMotor", w_PrismaticJoint_enableMotor }, + { "setMotorEnabled", w_PrismaticJoint_setMotorEnabled }, { "isMotorEnabled", w_PrismaticJoint_isMotorEnabled }, { "setMaxMotorForce", w_PrismaticJoint_setMaxMotorForce }, { "setMotorSpeed", w_PrismaticJoint_setMotorSpeed }, { "getMotorSpeed", w_PrismaticJoint_getMotorSpeed }, { "getMotorForce", w_PrismaticJoint_getMotorForce }, { "getMaxMotorForce", w_PrismaticJoint_getMaxMotorForce }, - { "enableLimit", w_PrismaticJoint_enableLimit }, - { "isLimitEnabled", w_PrismaticJoint_isLimitEnabled }, + { "setLimitsEnabled", w_PrismaticJoint_setLimitsEnabled }, + { "hasLimitsEnabled", w_PrismaticJoint_hasLimitsEnabled }, { "setUpperLimit", w_PrismaticJoint_setUpperLimit }, { "setLowerLimit", w_PrismaticJoint_setLowerLimit }, { "setLimits", w_PrismaticJoint_setLimits }, diff --git a/src/modules/physics/box2d/wrap_PrismaticJoint.h b/src/modules/physics/box2d/wrap_PrismaticJoint.h index a515137ab..ff480b150 100644 --- a/src/modules/physics/box2d/wrap_PrismaticJoint.h +++ b/src/modules/physics/box2d/wrap_PrismaticJoint.h @@ -36,15 +36,15 @@ namespace box2d PrismaticJoint *luax_checkprismaticjoint(lua_State *L, int idx); int w_PrismaticJoint_getJointTranslation(lua_State *L); int w_PrismaticJoint_getJointSpeed(lua_State *L); -int w_PrismaticJoint_enableMotor(lua_State *L); +int w_PrismaticJoint_setMotorEnabled(lua_State *L); int w_PrismaticJoint_isMotorEnabled(lua_State *L); int w_PrismaticJoint_setMaxMotorForce(lua_State *L); int w_PrismaticJoint_setMotorSpeed(lua_State *L); int w_PrismaticJoint_getMotorSpeed(lua_State *L); int w_PrismaticJoint_getMotorForce(lua_State *L); int w_PrismaticJoint_getMaxMotorForce(lua_State *L); -int w_PrismaticJoint_enableLimit(lua_State *L); -int w_PrismaticJoint_isLimitEnabled(lua_State *L); +int w_PrismaticJoint_setLimitsEnabled(lua_State *L); +int w_PrismaticJoint_hasLimitsEnabled(lua_State *L); int w_PrismaticJoint_setUpperLimit(lua_State *L); int w_PrismaticJoint_setLowerLimit(lua_State *L); int w_PrismaticJoint_setLimits(lua_State *L); diff --git a/src/modules/physics/box2d/wrap_RevoluteJoint.cpp b/src/modules/physics/box2d/wrap_RevoluteJoint.cpp index 02268310c..931a7bdbd 100644 --- a/src/modules/physics/box2d/wrap_RevoluteJoint.cpp +++ b/src/modules/physics/box2d/wrap_RevoluteJoint.cpp @@ -50,11 +50,11 @@ int w_RevoluteJoint_getJointSpeed(lua_State *L) return 1; } -int w_RevoluteJoint_enableMotor(lua_State *L) +int w_RevoluteJoint_setMotorEnabled(lua_State *L) { RevoluteJoint *t = luax_checkrevolutejoint(L, 1); bool arg1 = luax_toboolean(L, 2); - t->enableMotor(arg1); + t->setMotorEnabled(arg1); return 0; } @@ -103,18 +103,18 @@ int w_RevoluteJoint_getMaxMotorTorque(lua_State *L) return 1; } -int w_RevoluteJoint_enableLimit(lua_State *L) +int w_RevoluteJoint_setLimitsEnabled(lua_State *L) { RevoluteJoint *t = luax_checkrevolutejoint(L, 1); bool arg1 = luax_toboolean(L, 2); - t->enableLimit(arg1); + t->setLimitsEnabled(arg1); return 0; } -int w_RevoluteJoint_isLimitEnabled(lua_State *L) +int w_RevoluteJoint_hasLimitsEnabled(lua_State *L) { RevoluteJoint *t = luax_checkrevolutejoint(L, 1); - luax_pushboolean(L, t->isLimitEnabled()); + luax_pushboolean(L, t->hasLimitsEnabled()); return 1; } @@ -168,15 +168,15 @@ static const luaL_Reg functions[] = { { "getJointAngle", w_RevoluteJoint_getJointAngle }, { "getJointSpeed", w_RevoluteJoint_getJointSpeed }, - { "enableMotor", w_RevoluteJoint_enableMotor }, + { "setMotorEnabled", w_RevoluteJoint_setMotorEnabled }, { "isMotorEnabled", w_RevoluteJoint_isMotorEnabled }, { "setMaxMotorTorque", w_RevoluteJoint_setMaxMotorTorque }, { "setMotorSpeed", w_RevoluteJoint_setMotorSpeed }, { "getMotorSpeed", w_RevoluteJoint_getMotorSpeed }, { "getMotorTorque", w_RevoluteJoint_getMotorTorque }, { "getMaxMotorTorque", w_RevoluteJoint_getMaxMotorTorque }, - { "enableLimit", w_RevoluteJoint_enableLimit }, - { "isLimitEnabled", w_RevoluteJoint_isLimitEnabled }, + { "setLimitsEnabled", w_RevoluteJoint_setLimitsEnabled }, + { "hasLimitsEnabled", w_RevoluteJoint_hasLimitsEnabled }, { "setUpperLimit", w_RevoluteJoint_setUpperLimit }, { "setLowerLimit", w_RevoluteJoint_setLowerLimit }, { "setLimits", w_RevoluteJoint_setLimits }, diff --git a/src/modules/physics/box2d/wrap_RevoluteJoint.h b/src/modules/physics/box2d/wrap_RevoluteJoint.h index 31e1f59fc..edd20003a 100644 --- a/src/modules/physics/box2d/wrap_RevoluteJoint.h +++ b/src/modules/physics/box2d/wrap_RevoluteJoint.h @@ -36,15 +36,15 @@ namespace box2d RevoluteJoint *luax_checkrevolutejoint(lua_State *L, int idx); int w_RevoluteJoint_getJointAngle(lua_State *L); int w_RevoluteJoint_getJointSpeed(lua_State *L); -int w_RevoluteJoint_enableMotor(lua_State *L); +int w_RevoluteJoint_setMotorEnabled(lua_State *L); int w_RevoluteJoint_isMotorEnabled(lua_State *L); int w_RevoluteJoint_setMaxMotorTorque(lua_State *L); int w_RevoluteJoint_setMotorSpeed(lua_State *L); int w_RevoluteJoint_getMotorSpeed(lua_State *L); int w_RevoluteJoint_getMotorTorque(lua_State *L); int w_RevoluteJoint_getMaxMotorTorque(lua_State *L); -int w_RevoluteJoint_enableLimit(lua_State *L); -int w_RevoluteJoint_isLimitEnabled(lua_State *L); +int w_RevoluteJoint_setLimitsEnabled(lua_State *L); +int w_RevoluteJoint_hasLimitsEnabled(lua_State *L); int w_RevoluteJoint_setUpperLimit(lua_State *L); int w_RevoluteJoint_setLowerLimit(lua_State *L); int w_RevoluteJoint_setLimits(lua_State *L); diff --git a/src/modules/physics/box2d/wrap_WheelJoint.cpp b/src/modules/physics/box2d/wrap_WheelJoint.cpp index 7ae00db19..f6df28913 100644 --- a/src/modules/physics/box2d/wrap_WheelJoint.cpp +++ b/src/modules/physics/box2d/wrap_WheelJoint.cpp @@ -49,11 +49,11 @@ int w_WheelJoint_getJointSpeed(lua_State *L) return 1; } -int w_WheelJoint_enableMotor(lua_State *L) +int w_WheelJoint_setMotorEnabled(lua_State *L) { WheelJoint *t = luax_checkwheeljoint(L, 1); bool arg1 = luax_toboolean(L, 2); - t->enableMotor(arg1); + t->setMotorEnabled(arg1); return 0; } @@ -136,7 +136,7 @@ static const luaL_Reg functions[] = { { "getJointTranslation", w_WheelJoint_getJointTranslation }, { "getJointSpeed", w_WheelJoint_getJointSpeed }, - { "enableMotor", w_WheelJoint_enableMotor }, + { "setMotorEnabled", w_WheelJoint_setMotorEnabled }, { "isMotorEnabled", w_WheelJoint_isMotorEnabled }, { "setMotorSpeed", w_WheelJoint_setMotorSpeed }, { "getMotorSpeed", w_WheelJoint_getMotorSpeed }, diff --git a/src/modules/physics/box2d/wrap_WheelJoint.h b/src/modules/physics/box2d/wrap_WheelJoint.h index ed22c0256..96b2f55e6 100644 --- a/src/modules/physics/box2d/wrap_WheelJoint.h +++ b/src/modules/physics/box2d/wrap_WheelJoint.h @@ -36,7 +36,7 @@ namespace box2d WheelJoint *luax_checkwheeljoint(lua_State *L, int idx); int w_WheelJoint_getJointTranslation(lua_State *L); int w_WheelJoint_getJointSpeed(lua_State *L); -int w_WheelJoint_enableMotor(lua_State *L); +int w_WheelJoint_setMotorEnabled(lua_State *L); int w_WheelJoint_isMotorEnabled(lua_State *L); int w_WheelJoint_setMotorSpeed(lua_State *L); int w_WheelJoint_getMotorSpeed(lua_State *L);