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

Method destroyComponent

src/components/JointComponents.cpp:194–206  ·  view source on GitHub ↗

Destroy a component at a given index

Source from the content-addressed store, hash-verified

192
193// Destroy a component at a given index
194void JointComponents::destroyComponent(uint32 index) {
195
196 Components::destroyComponent(index);
197
198 assert(mMapEntityToComponentIndex[mJointEntities[index]] == index);
199
200 mMapEntityToComponentIndex.remove(mJointEntities[index]);
201
202 mJointEntities[index].~Entity();
203 mBody1Entities[index].~Entity();
204 mBody2Entities[index].~Entity();
205 mJoints[index] = nullptr;
206}

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected