| 553 | } |
| 554 | |
| 555 | void SceneQueryManager::addCompoundShape(const Gu::BVHStructure& bvhStructure, PrunerCompoundId compoundId, const PxTransform& compoundTransform, PrunerData* prunerData, const Scb::Shape** scbShapes, const Scb::Actor& scbActor) |
| 556 | { |
| 557 | PX_ASSERT(mCompoundPrunerExt.mPruner); |
| 558 | |
| 559 | const PxU32 nbShapes = bvhStructure.getNbBounds(); |
| 560 | |
| 561 | PX_ALLOCA(res, PrunerHandle, nbShapes); |
| 562 | PX_ALLOCA(payloads, PrunerPayload, nbShapes); |
| 563 | |
| 564 | for(PxU32 i = 0; i < nbShapes; i++) |
| 565 | { |
| 566 | payloads[i].data[0] = size_t(scbShapes[i]); //PAYLOAD |
| 567 | payloads[i].data[1] = size_t(&scbActor); //PAYLOAD |
| 568 | } |
| 569 | |
| 570 | CompoundFlag::Enum flags = (scbActor.getActorType() == PxActorType::eRIGID_DYNAMIC) ? CompoundFlag::DYNAMIC_COMPOUND : CompoundFlag::STATIC_COMPOUND; |
| 571 | mCompoundPrunerExt.mPruner->addCompound(res, bvhStructure, compoundId, compoundTransform, flags, payloads); |
| 572 | const PxU32 index = (flags & CompoundFlag::STATIC_COMPOUND) ? PxU32(0) : PxU32(1); |
| 573 | mPrunerExt[index].invalidateTimestamp(); |
| 574 | |
| 575 | for(PxU32 i = 0; i < nbShapes; i++) |
| 576 | { |
| 577 | prunerData[i] = createPrunerData(index, res[i]); |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | void SceneQueryManager::updateCompoundActors(Sc::BodyCore*const* bodies, PxU32 numBodies) |
| 582 | { |
no test coverage detected