| 470 | } |
| 471 | |
| 472 | int 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 | |
| 488 | void NvFlexExtFreeParticles(NvFlexExtContainer* c, int n, const int* indices) |
| 489 | { |
no test coverage detected