| 685 | } |
| 686 | |
| 687 | void 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 | |
| 706 | void NvFlexExtTickContainer(NvFlexExtContainer* c, float dt, int substeps, bool enableTiming) |
| 707 | { |
nothing calls this directly
no test coverage detected