| 416 | } |
| 417 | |
| 418 | void AABBTree::fullRefit(const PxBounds3* boxes) |
| 419 | { |
| 420 | PX_ASSERT(boxes); |
| 421 | |
| 422 | const PxU32* indices = mIndices; |
| 423 | AABBTreeRuntimeNode* const nodeBase = mRuntimePool; |
| 424 | PX_ASSERT(nodeBase); |
| 425 | |
| 426 | // Bottom-up update |
| 427 | PxU32 index = mTotalNbNodes; |
| 428 | while(index--) |
| 429 | { |
| 430 | AABBTreeRuntimeNode* current = nodeBase + index; |
| 431 | if(index) |
| 432 | Ps::prefetch(current - 1); |
| 433 | |
| 434 | refitNode(current, boxes, indices, nodeBase); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | static void _createParentArray(PxU32 totalNbNodes, PxU32* parentIndices, const AABBTreeRuntimeNode* parentNode, const AABBTreeRuntimeNode* currentNode, const AABBTreeRuntimeNode* root) |
| 439 | { |