MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/FleX / NvFlexExtDestroyInstance

Function NvFlexExtDestroyInstance

extensions/flexExtContainer.cpp:687–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685}
686
687void NvFlexExtDestroyInstance(NvFlexExtContainer* c, const NvFlexExtInstance* inst)
688{
689 NvFlexExtFreeParticles(c, inst->numParticles, &inst->particleIndices[0]);
690 delete[] inst->particleIndices;
691
692 delete[] inst->shapeRotations;
693 delete[] inst->shapeTranslations;
694
695 // TODO: O(N) remove
696 std::vector<NvFlexExtInstance*>::iterator iter = std::find(c->mInstances.begin(), c->mInstances.end(), inst);
697 assert(iter != c->mInstances.end());
698 c->mInstances.erase(iter);
699
700 c->mNeedsCompact = true;
701 c->mNeedsActiveListRebuild = true;
702
703 delete inst;
704}
705
706void NvFlexExtTickContainer(NvFlexExtContainer* c, float dt, int substeps, bool enableTiming)
707{

Callers

nothing calls this directly

Calls 1

NvFlexExtFreeParticlesFunction · 0.85

Tested by

no test coverage detected