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

Method preAllocate

physx/source/simulationcontroller/src/ScScene.cpp:1065–1076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1063///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1064
1065void Sc::Scene::preAllocate(PxU32 nbStatics, PxU32 nbBodies, PxU32 nbStaticShapes, PxU32 nbDynamicShapes)
1066{
1067 // PT: TODO: this is only used for my addActors benchmark for now. Pre-allocate more arrays here.
1068
1069 mActiveBodies.reserve(PxMax<PxU32>(64,nbBodies));
1070
1071 mStaticSimPool->preAllocate(nbStatics);
1072
1073 mBodySimPool->preAllocate(nbBodies);
1074
1075 mShapeSimPool->preAllocate(nbStaticShapes + nbDynamicShapes);
1076}
1077
1078///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1079

Callers 2

loadFromDescMethod · 0.45
setLimitsMethod · 0.45

Calls 1

reserveMethod · 0.45

Tested by

no test coverage detected