MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / overlap

Method overlap

deps/physx/physx/source/physx/src/NpBatchQuery.cpp:494–512  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 8

generic_overlapMethod · 0.45
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