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

Method resetBodiesForceAndTorque

src/systems/DynamicsSystem.cpp:186–194  ·  view source on GitHub ↗

Reset the external force and torque applied to the bodies

Source from the content-addressed store, hash-verified

184
185// Reset the external force and torque applied to the bodies
186void DynamicsSystem::resetBodiesForceAndTorque() {
187
188 // For each body of the world
189 const uint32 nbRigidBodyComponents = mRigidBodyComponents.getNbComponents();
190 for (uint32 i=0; i < nbRigidBodyComponents; i++) {
191 mRigidBodyComponents.mExternalForces[i].setToZero();
192 mRigidBodyComponents.mExternalTorques[i].setToZero();
193 }
194}
195
196// Reset the split velocities of the bodies
197void DynamicsSystem::resetSplitVelocities() {

Callers 1

updateMethod · 0.80

Calls 2

getNbComponentsMethod · 0.80
setToZeroMethod · 0.45

Tested by

no test coverage detected