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

Function applyFilterEquation

physx/source/physx/src/NpQueryShared.h:41–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39using namespace Cm;
40
41PX_FORCE_INLINE bool applyFilterEquation(const Scb::Shape& scbShape, const PxFilterData& queryFd)
42{
43 // if the filterData field is non-zero, and the bitwise-AND value of filterData AND the shape's
44 // queryFilterData is zero, the shape is skipped.
45 if(queryFd.word0 | queryFd.word1 | queryFd.word2 | queryFd.word3)
46 {
47 const PxFilterData& objFd = scbShape.getScShape().getQueryFilterData();
48 const PxU32 keep = (queryFd.word0 & objFd.word0) | (queryFd.word1 & objFd.word1) | (queryFd.word2 & objFd.word2) | (queryFd.word3 & objFd.word3);
49 if(!keep)
50 return false;
51 }
52 return true;
53}
54
55//========================================================================================================================
56// these partial template specializations are used to generalize the query code to be reused for all permutations of

Callers 1

applyAllPreFiltersSQFunction · 0.85

Calls 1

getQueryFilterDataMethod · 0.80

Tested by

no test coverage detected