| 1063 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 1064 | |
| 1065 | void 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 |
no test coverage detected