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

Function intersect3D

physx/source/lowlevelaabb/src/BpBroadPhaseMBP.cpp:1187–1198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185
1186#ifdef MBP_USE_NO_CMP_OVERLAP_3D
1187static PX_FORCE_INLINE bool intersect3D(const MBP_AABB& a, const MBP_AABB& b)
1188{
1189 // PT: warning, only valid with the special encoding in InitFrom2
1190 const PxU32 bits0 = (b.mMaxY - a.mMinY)&0x80000000;
1191 const PxU32 bits1 = (b.mMaxZ - a.mMinZ)&0x80000000;
1192 const PxU32 bits2 = (a.mMaxY - b.mMinY)&0x80000000;
1193 const PxU32 bits3 = (a.mMaxZ - b.mMinZ)&0x80000000;
1194 const PxU32 bits4 = (b.mMaxX - a.mMinX)&0x80000000;
1195 const PxU32 bits5 = (a.mMaxX - b.mMinX)&0x80000000;
1196 const PxU32 mask = bits0|(bits1>>1)|(bits2>>2)|(bits3>>3)|(bits4>>4)|(bits5>>5);
1197 return !mask;
1198}
1199#endif
1200
1201#ifdef CHECK_NB_OVERLAPS

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected