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

Function NvFlexExtGetActiveList

extensions/flexExtContainer.cpp:506–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504}
505
506int NvFlexExtGetActiveList(NvFlexExtContainer* c, int* indices)
507{
508 int count = 0;
509
510 Bitmap inactive(c->mMaxParticles);
511
512 // create bitmap
513 for (size_t i=0; i < c->mFreeList.size(); ++i)
514 {
515 // if this fires then somehow a duplicate has ended up in the free list (double delete)
516 assert(!inactive.IsSet(c->mFreeList[i]));
517
518 inactive.Set(c->mFreeList[i]);
519 }
520
521 // iterate bitmap to find active elements
522 for (int i=0; i < c->mMaxParticles; ++i)
523 if (inactive.IsSet(i) == false)
524 indices[count++] = i;
525
526 return count;
527}
528
529NvFlexExtParticleData NvFlexExtMapParticleData(NvFlexExtContainer* c)
530{

Callers 1

NvFlexExtPushToDeviceFunction · 0.85

Calls 3

sizeMethod · 0.80
IsSetMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected