| 66 | /////////////////////////////////////////////////////////////////////////////////////////////// |
| 67 | |
| 68 | bool BVHCompoundPruner::addCompound(PrunerHandle* results, const Gu::BVHStructure& bvhStructure, PrunerCompoundId compoundId, const PxTransform& transform, CompoundFlag::Enum flags, const PrunerPayload* userData) |
| 69 | { |
| 70 | PX_ASSERT(bvhStructure.getNbBounds()); |
| 71 | |
| 72 | const PxBounds3 compoundBounds = PxBounds3::transformFast(transform, bvhStructure.getNodes()->mBV); |
| 73 | const PoolIndex poolIndex = mCompoundTreePool.addCompound(results, bvhStructure, compoundBounds, transform, flags, userData); |
| 74 | |
| 75 | mChangedLeaves.clear(); |
| 76 | IncrementalAABBTreeNode* node = mMainTree.insert(poolIndex, mCompoundTreePool.getCurrentCompoundBounds(), mChangedLeaves); |
| 77 | updateMapping(poolIndex, node); |
| 78 | |
| 79 | mActorPoolMap[compoundId] = poolIndex; |
| 80 | mPoolActorMap[poolIndex] = compoundId; |
| 81 | |
| 82 | #if PARANOIA_CHECKS |
| 83 | test(); |
| 84 | #endif |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | /////////////////////////////////////////////////////////////////////////////////////////////// |
| 89 |
no test coverage detected