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

Method destroyComponent

src/components/TransformComponents.cpp:147–157  ·  view source on GitHub ↗

Destroy a component at a given index

Source from the content-addressed store, hash-verified

145
146// Destroy a component at a given index
147void TransformComponents::destroyComponent(uint32 index) {
148
149 Components::destroyComponent(index);
150
151 assert(mMapEntityToComponentIndex[mBodies[index]] == index);
152
153 mMapEntityToComponentIndex.remove(mBodies[index]);
154
155 mBodies[index].~Entity();
156 mTransforms[index].~Transform();
157}

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected