| 89 | namespace physx |
| 90 | { |
| 91 | struct BatchStreamHeader |
| 92 | { |
| 93 | BatchStreamHeader( |
| 94 | PxHitFlags aHitFlags, const PxQueryCache* aCache, const PxQueryFilterData& aFd, |
| 95 | void* aUserData, PxU16 aMaxTouchHits, QTypeROS::Enum aHitTypeId) : |
| 96 | hitFlags(aHitFlags), fd(aFd), userData(aUserData), cache(aCache), |
| 97 | maxTouchHits(aMaxTouchHits), hitTypeId(char(aHitTypeId)) |
| 98 | { |
| 99 | nextQueryOffset = PxU32(NpBatchQuery::eTERMINAL); |
| 100 | } |
| 101 | |
| 102 | BatchStreamHeader() {} |
| 103 | |
| 104 | // TODO: possibly maintain 3 separate offset lists in the same array for raycasts/overlaps/sweeps |
| 105 | // offset of a 4-byte ptr to offset in the previously stored batch query in the stream, this is not a ptr because of reallocs |
| 106 | PxU32 nextQueryOffset; |
| 107 | PxHitFlags hitFlags; |
| 108 | PxQueryFilterData fd; |
| 109 | void* userData; |
| 110 | const PxQueryCache* cache; |
| 111 | PxU16 maxTouchHits; |
| 112 | char hitTypeId; // Sq::QTypeROS |
| 113 | }; |
| 114 | } // namespace physx |
| 115 | |
| 116 | static void writeGeom(BatchQueryStream& stream, const PxGeometry& geom) |