MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / resize

Method resize

physx/source/scenequery/src/SqAABBTree.cpp:331–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331void Sq::BitArray::resize(PxU32 maxBitNumber)
332{
333 const PxU32 newSize = BitsToDwords(maxBitNumber);
334 if (newSize <= mSize)
335 return;
336
337 PxU32* newBits = reinterpret_cast<PxU32*>(PX_ALLOC(sizeof(PxU32)*newSize, "BitArray::mBits"));
338 PxMemZero(newBits + mSize, (newSize - mSize) * sizeof(PxU32));
339 PxMemCopy(newBits, mBits, mSize*sizeof(PxU32));
340 PX_FREE(mBits);
341 mBits = newBits;
342 mSize = newSize;
343}
344
345static PX_FORCE_INLINE PxU32 getNbPrimitives(PxU32 data) { return (data>>1)&15; }
346static PX_FORCE_INLINE const PxU32* getPrimitives(const PxU32* base, PxU32 data) { return base + (data>>5); }

Callers 12

checkResizeMethod · 0.45
SceneMethod · 0.45
setActiveActorsMethod · 0.45
resizeDeletedIDMapFunction · 0.45
ConstraintSimMethod · 0.45
preallocateMethod · 0.45
growDirtyListMethod · 0.45
updateMappingMethod · 0.45
mergeTreeMethod · 0.45
updateMappingMethod · 0.45

Calls 3

BitsToDwordsFunction · 0.85
PxMemZeroFunction · 0.85
PxMemCopyFunction · 0.85

Tested by

no test coverage detected