PT: TODO: consider passing the payload directly to this function, for a cleaner interface that makes more sense. But the shape & actor pointers are used directly in the function, so this whole thing is fishy.
| 309 | // PT: TODO: consider passing the payload directly to this function, for a cleaner interface that makes more sense. |
| 310 | // But the shape & actor pointers are used directly in the function, so this whole thing is fishy. |
| 311 | PrunerData SceneQueryManager::addPrunerShape(const Scb::Shape& scbShape, const Scb::Actor& scbActor, bool dynamic, PrunerCompoundId compoundId, const PxBounds3* bounds, bool hasPrunerStructure) |
| 312 | { |
| 313 | mPrunerNeedsUpdating = true; |
| 314 | |
| 315 | PrunerPayload pp; |
| 316 | pp.data[0] = size_t(&scbShape); //PAYLOAD |
| 317 | pp.data[1] = size_t(&scbActor); //PAYLOAD |
| 318 | |
| 319 | const PxU32 index = PxU32(dynamic); |
| 320 | PrunerHandle handle; |
| 321 | |
| 322 | mPrunerExt[index].invalidateTimestamp(); |
| 323 | if(compoundId == INVALID_PRUNERHANDLE) |
| 324 | { |
| 325 | PxBounds3 b; |
| 326 | if(bounds) |
| 327 | inflateBounds(b, *bounds); |
| 328 | else |
| 329 | (gComputeBoundsTable[dynamic])(b, scbShape, scbActor); |
| 330 | |
| 331 | PX_ASSERT(mPrunerExt[index].pruner()); |
| 332 | mPrunerExt[index].pruner()->addObjects(&handle, &b, &pp, 1, hasPrunerStructure); |
| 333 | |
| 334 | mPrunerExt[index].growDirtyList(handle); |
| 335 | } |
| 336 | else |
| 337 | { |
| 338 | PxBounds3 b; |
| 339 | const PxTransform& shape2Actor = scbShape.getShape2Actor(); |
| 340 | Gu::computeBounds(b, scbShape.getGeometry(), shape2Actor, 0.0f, NULL, SQ_PRUNER_INFLATION); |
| 341 | |
| 342 | PX_ASSERT(mCompoundPrunerExt.pruner()); |
| 343 | mCompoundPrunerExt.pruner()->addObject(compoundId, handle, b, pp); |
| 344 | } |
| 345 | |
| 346 | return createPrunerData(index, handle); |
| 347 | } |
| 348 | |
| 349 | const PrunerPayload& SceneQueryManager::getPayload(PrunerCompoundId compoundId, PrunerData data) const |
| 350 | { |
nothing calls this directly
no test coverage detected