summaryrefslogtreecommitdiff
path: root/modules/bullet
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-13 14:28:05 +0100
committerGitHub <noreply@github.com>2020-02-13 14:28:05 +0100
commitdcfe44f4479ddbf3518d3e753fbf242845402ae4 (patch)
tree08e9b17099079836ffae47c4cf234d0bd115c909 /modules/bullet
parent835406cf04f0200a0504ae171964c687c559eb1e (diff)
parent54ac8eaba661a599983ae4774113d1a15cfa461a (diff)
Merge pull request #36175 from akien-mga/remove-more-deprecated-stuff
Remove deprecated methods and code
Diffstat (limited to 'modules/bullet')
-rw-r--r--modules/bullet/cone_twist_joint_bullet.cpp10
-rw-r--r--modules/bullet/generic_6dof_joint_bullet.cpp22
-rw-r--r--modules/bullet/hinge_joint_bullet.cpp15
-rw-r--r--modules/bullet/pin_joint_bullet.cpp5
4 files changed, 32 insertions, 20 deletions
diff --git a/modules/bullet/cone_twist_joint_bullet.cpp b/modules/bullet/cone_twist_joint_bullet.cpp
index afeafcc356..23eb39fe7e 100644
--- a/modules/bullet/cone_twist_joint_bullet.cpp
+++ b/modules/bullet/cone_twist_joint_bullet.cpp
@@ -82,8 +82,8 @@ void ConeTwistJointBullet::set_param(PhysicsServer::ConeTwistJointParam p_param,
case PhysicsServer::CONE_TWIST_JOINT_RELAXATION:
coneConstraint->setLimit(coneConstraint->getSwingSpan1(), coneConstraint->getSwingSpan2(), coneConstraint->getTwistSpan(), coneConstraint->getLimitSoftness(), coneConstraint->getBiasFactor(), p_value);
break;
- default:
- WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
+ case PhysicsServer::CONE_TWIST_MAX:
+ // Internal size value, nothing to do.
break;
}
}
@@ -100,8 +100,10 @@ real_t ConeTwistJointBullet::get_param(PhysicsServer::ConeTwistJointParam p_para
return coneConstraint->getLimitSoftness();
case PhysicsServer::CONE_TWIST_JOINT_RELAXATION:
return coneConstraint->getRelaxationFactor();
- default:
- WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
+ case PhysicsServer::CONE_TWIST_MAX:
+ // Internal size value, nothing to do.
return 0;
}
+ // Compiler doesn't seem to notice that all code paths are fulfilled...
+ return 0;
}
diff --git a/modules/bullet/generic_6dof_joint_bullet.cpp b/modules/bullet/generic_6dof_joint_bullet.cpp
index 86bedd6c45..45ab3d3bb2 100644
--- a/modules/bullet/generic_6dof_joint_bullet.cpp
+++ b/modules/bullet/generic_6dof_joint_bullet.cpp
@@ -173,6 +173,9 @@ void Generic6DOFJointBullet::set_param(Vector3::Axis p_axis, PhysicsServer::G6DO
case PhysicsServer::G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT:
sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_equilibriumPoint = p_value;
break;
+ case PhysicsServer::G6DOF_JOINT_MAX:
+ // Internal size value, nothing to do.
+ break;
default:
WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
break;
@@ -214,6 +217,9 @@ real_t Generic6DOFJointBullet::get_param(Vector3::Axis p_axis, PhysicsServer::G6
return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_springDamping;
case PhysicsServer::G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT:
return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_equilibriumPoint;
+ case PhysicsServer::G6DOF_JOINT_MAX:
+ // Internal size value, nothing to do.
+ return 0;
default:
WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
return 0;
@@ -240,20 +246,20 @@ void Generic6DOFJointBullet::set_flag(Vector3::Axis p_axis, PhysicsServer::G6DOF
sixDOFConstraint->setLimit(p_axis + 3, 0, -1); // Free
}
break;
+ case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING:
+ sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_enableSpring = p_value;
+ break;
+ case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING:
+ sixDOFConstraint->getTranslationalLimitMotor()->m_enableSpring[p_axis] = p_value;
+ break;
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_MOTOR:
sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_enableMotor = flags[p_axis][p_flag];
break;
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR:
sixDOFConstraint->getTranslationalLimitMotor()->m_enableMotor[p_axis] = flags[p_axis][p_flag];
break;
- case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING:
- sixDOFConstraint->getTranslationalLimitMotor()->m_enableSpring[p_axis] = p_value;
- break;
- case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING:
- sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_enableSpring = p_value;
- break;
- default:
- WARN_DEPRECATED_MSG("The flag " + itos(p_flag) + " is deprecated.");
+ case PhysicsServer::G6DOF_JOINT_FLAG_MAX:
+ // Internal size value, nothing to do.
break;
}
}
diff --git a/modules/bullet/hinge_joint_bullet.cpp b/modules/bullet/hinge_joint_bullet.cpp
index 49e67bfbc1..970732688a 100644
--- a/modules/bullet/hinge_joint_bullet.cpp
+++ b/modules/bullet/hinge_joint_bullet.cpp
@@ -95,6 +95,9 @@ real_t HingeJointBullet::get_hinge_angle() {
void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t p_value) {
switch (p_param) {
+ case PhysicsServer::HINGE_JOINT_BIAS:
+ WARN_DEPRECATED_MSG("The HingeJoint parameter \"bias\" is deprecated.");
+ break;
case PhysicsServer::HINGE_JOINT_LIMIT_UPPER:
hingeConstraint->setLimit(hingeConstraint->getLowerLimit(), p_value, hingeConstraint->getLimitSoftness(), hingeConstraint->getLimitBiasFactor(), hingeConstraint->getLimitRelaxationFactor());
break;
@@ -116,8 +119,8 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
hingeConstraint->setMaxMotorImpulse(p_value);
break;
- default:
- WARN_DEPRECATED_MSG("The HingeJoint parameter " + itos(p_param) + " is deprecated.");
+ case PhysicsServer::HINGE_JOINT_MAX:
+ // Internal size value, nothing to do.
break;
}
}
@@ -125,8 +128,8 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const {
switch (p_param) {
case PhysicsServer::HINGE_JOINT_BIAS:
+ WARN_DEPRECATED_MSG("The HingeJoint parameter \"bias\" is deprecated.");
return 0;
- break;
case PhysicsServer::HINGE_JOINT_LIMIT_UPPER:
return hingeConstraint->getUpperLimit();
case PhysicsServer::HINGE_JOINT_LIMIT_LOWER:
@@ -141,10 +144,12 @@ real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const
return hingeConstraint->getMotorTargetVelocity();
case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
return hingeConstraint->getMaxMotorImpulse();
- default:
- WARN_DEPRECATED_MSG("The HingeJoint parameter " + itos(p_param) + " is deprecated.");
+ case PhysicsServer::HINGE_JOINT_MAX:
+ // Internal size value, nothing to do.
return 0;
}
+ // Compiler doesn't seem to notice that all code paths are fulfilled...
+ return 0;
}
void HingeJointBullet::set_flag(PhysicsServer::HingeJointFlag p_flag, bool p_value) {
diff --git a/modules/bullet/pin_joint_bullet.cpp b/modules/bullet/pin_joint_bullet.cpp
index 1c2e5e65cc..8d109f1866 100644
--- a/modules/bullet/pin_joint_bullet.cpp
+++ b/modules/bullet/pin_joint_bullet.cpp
@@ -84,10 +84,9 @@ real_t PinJointBullet::get_param(PhysicsServer::PinJointParam p_param) const {
return p2pConstraint->m_setting.m_damping;
case PhysicsServer::PIN_JOINT_IMPULSE_CLAMP:
return p2pConstraint->m_setting.m_impulseClamp;
- default:
- WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
- return 0;
}
+ // Compiler doesn't seem to notice that all code paths are fulfilled...
+ return 0;
}
void PinJointBullet::setPivotInA(const Vector3 &p_pos) {