| 1308 | |
| 1309 | template <int inflateT> |
| 1310 | static PxAgain processBucket( |
| 1311 | PxU32 nb, const BucketBox* PX_RESTRICT baseBoxes, PrunerPayload* PX_RESTRICT baseObjects, |
| 1312 | PxU32 offset, PxU32 totalAllocated, |
| 1313 | const PxVec3& rayOrig, const PxVec3& rayDir, float& maxDist, |
| 1314 | #ifdef CAN_USE_MOVEMASK |
| 1315 | RayParams* PX_RESTRICT rayParams, |
| 1316 | #else |
| 1317 | BPRayAABBTest& test, const PxVec3& inflate, |
| 1318 | #endif |
| 1319 | PrunerCallback& pcb, PxU32& _rayMinLimitInt, PxU32& _rayMaxLimitInt, PxU32 sortAxis) |
| 1320 | { |
| 1321 | PX_UNUSED(totalAllocated); |
| 1322 | |
| 1323 | const BucketBox* PX_RESTRICT _boxes = baseBoxes + offset; |
| 1324 | PrunerPayload* PX_RESTRICT _objects = baseObjects + offset; |
| 1325 | |
| 1326 | PxU32 rayMinLimitInt = _rayMinLimitInt; |
| 1327 | PxU32 rayMaxLimitInt = _rayMaxLimitInt; |
| 1328 | |
| 1329 | const BucketBox* last = _boxes + nb; |
| 1330 | |
| 1331 | while(_boxes!=last) |
| 1332 | { |
| 1333 | const BucketBox& currentBox = *_boxes++; |
| 1334 | PrunerPayload* currentObject = _objects++; |
| 1335 | |
| 1336 | if(currentBox.mData1<rayMinLimitInt) |
| 1337 | continue; |
| 1338 | |
| 1339 | if(currentBox.mData0>rayMaxLimitInt) |
| 1340 | goto Exit; |
| 1341 | |
| 1342 | #ifdef CAN_USE_MOVEMASK |
| 1343 | if(!_segmentAABB<inflateT>(currentBox, rayParams)) |
| 1344 | continue; |
| 1345 | #else |
| 1346 | if(!_segmentAABB<inflateT>(currentBox, test)) |
| 1347 | continue; |
| 1348 | #endif |
| 1349 | |
| 1350 | const float MaxDist = maxDist; |
| 1351 | const PxAgain again = pcb.invoke(maxDist, *currentObject); |
| 1352 | if(!again) |
| 1353 | return false; |
| 1354 | if(maxDist < MaxDist) |
| 1355 | { |
| 1356 | float rayMinLimit, rayMaxLimit; |
| 1357 | #ifdef CAN_USE_MOVEMASK |
| 1358 | if(inflateT) |
| 1359 | computeRayLimits(rayMinLimit, rayMaxLimit, rayOrig, rayDir, maxDist, rayParams->mInflate, sortAxis); |
| 1360 | else |
| 1361 | computeRayLimits(rayMinLimit, rayMaxLimit, rayOrig, rayDir, maxDist, sortAxis); |
| 1362 | |
| 1363 | precomputeRayData(rayParams, rayOrig, rayDir, maxDist); |
| 1364 | #else |
| 1365 | if(inflateT) |
| 1366 | computeRayLimits(rayMinLimit, rayMaxLimit, rayOrig, rayDir, maxDist, inflate, sortAxis); |
| 1367 | else |
nothing calls this directly
no test coverage detected