MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / setMaxMotorTorque

Method setMaxMotorTorque

src/constraint/HingeJoint.cpp:183–195  ·  view source on GitHub ↗

Set the maximum motor torque * @param maxMotorTorque The maximum torque (in Newtons) of the joint motor */

Source from the content-addressed store, hash-verified

181 * @param maxMotorTorque The maximum torque (in Newtons) of the joint motor
182 */
183void 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

Callers

nothing calls this directly

Calls 1

getMaxMotorTorqueMethod · 0.45

Tested by

no test coverage detected