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

Method destroyComponent

src/components/BodyComponents.cpp:179–191  ·  view source on GitHub ↗

Destroy a component at a given index

Source from the content-addressed store, hash-verified

177
178// Destroy a component at a given index
179void BodyComponents::destroyComponent(uint32 index) {
180
181 Components::destroyComponent(index);
182
183 assert(mMapEntityToComponentIndex[mBodiesEntities[index]] == index);
184
185 mMapEntityToComponentIndex.remove(mBodiesEntities[index]);
186
187 mBodiesEntities[index].~Entity();
188 mBodies[index] = nullptr;
189 mColliders[index].~Array<Entity>();
190 mUserData[index] = nullptr;
191}

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected