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

Method destroyComponent

src/components/FixedJointComponents.cpp:253–276  ·  view source on GitHub ↗

Destroy a component at a given index

Source from the content-addressed store, hash-verified

251
252// Destroy a component at a given index
253void FixedJointComponents::destroyComponent(uint32 index) {
254
255 Components::destroyComponent(index);
256
257 assert(mMapEntityToComponentIndex[mJointEntities[index]] == index);
258
259 mMapEntityToComponentIndex.remove(mJointEntities[index]);
260
261 mJointEntities[index].~Entity();
262 mJoints[index] = nullptr;
263 mLocalAnchorPointBody1[index].~Vector3();
264 mLocalAnchorPointBody2[index].~Vector3();
265 mR1World[index].~Vector3();
266 mR2World[index].~Vector3();
267 mI1[index].~Matrix3x3();
268 mI2[index].~Matrix3x3();
269 mImpulseTranslation[index].~Vector3();
270 mImpulseRotation[index].~Vector3();
271 mInverseMassMatrixTranslation[index].~Matrix3x3();
272 mInverseMassMatrixRotation[index].~Matrix3x3();
273 mBiasTranslation[index].~Vector3();
274 mBiasRotation[index].~Vector3();
275 mInitOrientationDifferenceInv[index].~Quaternion();
276}

Callers

nothing calls this directly

Calls 2

~Vector3Method · 0.80
removeMethod · 0.45

Tested by

no test coverage detected