Set the maximum motor torque * @param maxMotorTorque The maximum torque (in Newtons) of the joint motor */
| 181 | * @param maxMotorTorque The maximum torque (in Newtons) of the joint motor |
| 182 | */ |
| 183 | void HingeJoint::setMaxMotorTorque(decimal maxMotorTorque) { |
| 184 | |
| 185 | const decimal torque = mWorld.mHingeJointsComponents.getMaxMotorTorque(mEntity); |
| 186 | |
| 187 | if (maxMotorTorque != torque) { |
| 188 | |
| 189 | assert(torque >= decimal(0.0)); |
| 190 | mWorld.mHingeJointsComponents.setMaxMotorTorque(mEntity, maxMotorTorque); |
| 191 | |
| 192 | // Wake up the two bodies of the joint |
| 193 | awakeBodies(); |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | |
| 198 | // Return true if the limits of the joint are enabled |
nothing calls this directly
no test coverage detected