Destroy a component at a given index
| 251 | |
| 252 | // Destroy a component at a given index |
| 253 | void 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 | } |