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

Method setJointDisabled

src/engine/PhysicsWorld.cpp:189–206  ·  view source on GitHub ↗

Notify the world whether a joint is disabled or not

Source from the content-addressed store, hash-verified

187
188// Notify the world whether a joint is disabled or not
189void PhysicsWorld::setJointDisabled(Entity jointEntity, bool isDisabled) {
190
191 if (isDisabled == mJointsComponents.getIsEntityDisabled(jointEntity)) return;
192
193 mJointsComponents.setIsEntityDisabled(jointEntity, isDisabled);
194 if (mBallAndSocketJointsComponents.hasComponent(jointEntity)) {
195 mBallAndSocketJointsComponents.setIsEntityDisabled(jointEntity, isDisabled);
196 }
197 if (mFixedJointsComponents.hasComponent(jointEntity)) {
198 mFixedJointsComponents.setIsEntityDisabled(jointEntity, isDisabled);
199 }
200 if (mHingeJointsComponents.hasComponent(jointEntity)) {
201 mHingeJointsComponents.setIsEntityDisabled(jointEntity, isDisabled);
202 }
203 if (mSliderJointsComponents.hasComponent(jointEntity)) {
204 mSliderJointsComponents.setIsEntityDisabled(jointEntity, isDisabled);
205 }
206}
207
208// Return true if two bodies overlap
209/// Use this method if you are not interested in contacts but if you simply want to know

Callers

nothing calls this directly

Calls 3

getIsEntityDisabledMethod · 0.80
setIsEntityDisabledMethod · 0.80
hasComponentMethod · 0.80

Tested by

no test coverage detected