| 436 | } |
| 437 | |
| 438 | static void _createParentArray(PxU32 totalNbNodes, PxU32* parentIndices, const AABBTreeRuntimeNode* parentNode, const AABBTreeRuntimeNode* currentNode, const AABBTreeRuntimeNode* root) |
| 439 | { |
| 440 | const PxU32 parentIndex = PxU32(parentNode - root); |
| 441 | const PxU32 currentIndex = PxU32(currentNode - root); |
| 442 | PX_ASSERT(parentIndex<totalNbNodes); |
| 443 | PX_ASSERT(currentIndex<totalNbNodes); |
| 444 | PX_UNUSED(totalNbNodes); |
| 445 | parentIndices[currentIndex] = parentIndex; |
| 446 | |
| 447 | if(!currentNode->isLeaf()) |
| 448 | { |
| 449 | _createParentArray(totalNbNodes, parentIndices, currentNode, currentNode->getPos(root), root); |
| 450 | _createParentArray(totalNbNodes, parentIndices, currentNode, currentNode->getNeg(root), root); |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | void AABBTree::markNodeForRefit(TreeNodeIndex nodeIndex) |
| 455 | { |