MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / overlap

Method overlap

physx/source/physx/src/NpBatchQuery.cpp:493–511  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

491
492///////////////////////////////////////////////////////////////////////////////
493void NpBatchQuery::overlap(
494 const PxGeometry& geometry, const PxTransform& pose, PxU16 maxTouchHits,
495 const PxQueryFilterData& fd, void* userData, const PxQueryCache* cache)
496{
497 PX_CHECK_AND_RETURN(pose.isValid(), "NpBatchQuery::overlapMultiple pose is not valid.");
498 if (mNbOverlaps >= mDesc.queryMemory.getMaxOverlapsPerExecute())
499 {
500 PX_CHECK_AND_RETURN(mNbOverlaps < mDesc.queryMemory.getMaxOverlapsPerExecute(),
501 "PxBatchQuery: number of overlap() calls exceeds PxBatchQueryMemory::overlapResultBufferSize, query discarded");
502 return;
503 }
504 CHECK_RUNNING("PxBatchQuery::overlap: This batch is still executing, skipping query.")
505 mNbOverlaps++;
506
507 writeBatchHeader(BatchStreamHeader(PxHitFlags(), cache, fd, userData, maxTouchHits, QTypeROS::eOVERLAP));
508 writeQueryInput(mStream, MultiQueryInput(&geometry, &pose));
509
510 Ps::atomicExchange(&mBatchQueryIsRunning, 0);
511}
512
513void NpBatchQuery::sweep(
514 const PxGeometry& geometry, const PxTransform& pose, const PxVec3& unitDir, const PxReal distance, PxU16 maxTouchHits,

Callers 7

tryStandupMethod · 0.45
tryStandupMethod · 0.45
createTestCompoundMethod · 0.45
overlapMultipleMethod · 0.45
overlapAnyMethod · 0.45
findTouchedGeometryMethod · 0.45

Calls 5

writeQueryInputFunction · 0.85
MultiQueryInputClass · 0.85
BatchStreamHeaderClass · 0.70
atomicExchangeFunction · 0.50
isValidMethod · 0.45

Tested by

no test coverage detected