| 1318 | } |
| 1319 | |
| 1320 | PxU32 NpScene::getActors(PxActorTypeFlags types, PxActor** buffer, PxU32 bufferSize, PxU32 startIndex) const |
| 1321 | { |
| 1322 | NP_READ_CHECK(this); |
| 1323 | |
| 1324 | PxU32 writeCount = 0; |
| 1325 | PxU32 virtualIndex = 0; // PT: virtual index of actor, continuous across different actor containers. |
| 1326 | |
| 1327 | if(types & (PxActorTypeFlag::eRIGID_STATIC | PxActorTypeFlag::eRIGID_DYNAMIC)) |
| 1328 | { |
| 1329 | const PxU32 size = mRigidActors.size(); |
| 1330 | for(PxU32 i=0; (i < size) && (writeCount < bufferSize); i++) |
| 1331 | { |
| 1332 | if ((types & PxActorTypeFlag::eRIGID_STATIC ) && mRigidActors[i]->is<PxRigidStatic>()) |
| 1333 | { |
| 1334 | if (virtualIndex >= startIndex) |
| 1335 | buffer[writeCount++] = mRigidActors[i]; |
| 1336 | virtualIndex++; |
| 1337 | } |
| 1338 | else if ((types & PxActorTypeFlag::eRIGID_DYNAMIC) && mRigidActors[i]->is<PxRigidDynamic>()) |
| 1339 | { |
| 1340 | if (virtualIndex >= startIndex) |
| 1341 | buffer[writeCount++] = mRigidActors[i]; |
| 1342 | virtualIndex++; |
| 1343 | } |
| 1344 | } |
| 1345 | } |
| 1346 | |
| 1347 | return writeCount; |
| 1348 | } |
| 1349 | |
| 1350 | /////////////////////////////////////////////////////////////////////////////// |
| 1351 |
no test coverage detected