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

Function NvFlexExtAllocParticles

extensions/flexExtContainer.cpp:472–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472int NvFlexExtAllocParticles(NvFlexExtContainer* c, int n, int* indices)
473{
474 const int numToAlloc = Min(int(c->mFreeList.size()), n);
475 const int start = int(c->mFreeList.size())-numToAlloc;
476
477 if (numToAlloc)
478 {
479 memcpy(indices, &c->mFreeList[start], numToAlloc*sizeof(int));
480 c->mFreeList.resize(start);
481 }
482
483 c->mNeedsActiveListRebuild = true;
484
485 return numToAlloc;
486}
487
488void NvFlexExtFreeParticles(NvFlexExtContainer* c, int n, const int* indices)
489{

Callers 1

NvFlexExtCreateInstanceFunction · 0.85

Calls 3

sizeMethod · 0.80
resizeMethod · 0.80
MinFunction · 0.50

Tested by

no test coverage detected