| 714 | } |
| 715 | |
| 716 | void PersistentActorAggregatePair::findOverlaps(PairArray& pairs, const PxBounds3* PX_RESTRICT bounds, const float* PX_RESTRICT contactDistances, const Bp::FilterGroup::Enum* PX_RESTRICT groups |
| 717 | #ifdef BP_FILTERING_USES_TYPE_IN_GROUP |
| 718 | , const bool* PX_RESTRICT lut |
| 719 | #endif |
| 720 | ) |
| 721 | { |
| 722 | if(0) |
| 723 | { |
| 724 | Aggregate singleActor(INVALID_ID, false); |
| 725 | singleActor.addAggregated(mActorHandle); |
| 726 | singleActor.allocateBounds(); |
| 727 | singleActor.computeBounds(bounds, contactDistances); |
| 728 | singleActor.getSortedMinBounds(); |
| 729 | mAggregate->getSortedMinBounds(); |
| 730 | doBipartiteBoxPruning_Leaf(&pairs, lut, &singleActor, mAggregate, groups); |
| 731 | } |
| 732 | else |
| 733 | { |
| 734 | |
| 735 | mAggregate->getSortedMinBounds(); |
| 736 | const PxU32 nb0 = mAggregate->getNbAggregated(); |
| 737 | const BoundsIndex* PX_RESTRICT remap0 = mAggregate->getIndices(); |
| 738 | const AABB_Xi* PX_RESTRICT boxes0_X = mAggregate->getBoundsX(); |
| 739 | const AABB_YZ* PX_RESTRICT boxes0_YZ = mAggregate->getBoundsYZ(); |
| 740 | |
| 741 | PX_ALIGN(16, AABB_Xi inflatedBoundsX[1+NB_SENTINELS]); |
| 742 | PX_ALIGN(16, AABB_YZ inflatedBoundsYZ); |
| 743 | |
| 744 | // Compute bounds |
| 745 | { |
| 746 | PX_ALIGN(16, PxVec4) boxMin; |
| 747 | PX_ALIGN(16, PxVec4) boxMax; |
| 748 | const BoundsIndex actorHandle = mActorHandle; |
| 749 | const PxBounds3& b = bounds[actorHandle]; |
| 750 | const Vec4V offsetV = V4Load(contactDistances[actorHandle]); |
| 751 | const Vec4V minimumV = V4Sub(V4LoadU(&b.minimum.x), offsetV); |
| 752 | const Vec4V maximumV = V4Add(V4LoadU(&b.maximum.x), offsetV); |
| 753 | V4StoreA(minimumV, &boxMin.x); |
| 754 | V4StoreA(maximumV, &boxMax.x); |
| 755 | inflatedBoundsX[0].initFromPxVec4(boxMin, boxMax); |
| 756 | inflatedBoundsYZ.initFromPxVec4(boxMin, boxMax); |
| 757 | |
| 758 | for(PxU32 i=0;i<NB_SENTINELS;i++) |
| 759 | inflatedBoundsX[1+i].initSentinel(); |
| 760 | } |
| 761 | |
| 762 | const PxU32 nb1 = 1; |
| 763 | const BoundsIndex* PX_RESTRICT remap1 = &mActorHandle; |
| 764 | const AABB_Xi* PX_RESTRICT boxes1_X = inflatedBoundsX; |
| 765 | const AABB_YZ* PX_RESTRICT boxes1_YZ = &inflatedBoundsYZ; |
| 766 | |
| 767 | boxPruningKernel<0>(&pairs, lut, nb0, remap0, boxes0_X, boxes0_YZ, nb1, remap1, boxes1_X, boxes1_YZ, groups); |
| 768 | boxPruningKernel<1>(&pairs, lut, nb1, remap1, boxes1_X, boxes1_YZ, nb0, remap0, boxes0_X, boxes0_YZ, groups); |
| 769 | |
| 770 | } |
| 771 | } |
| 772 | |
| 773 | bool PersistentActorAggregatePair::update(AABBManager& manager, BpCacheData* data) |
no test coverage detected