diff options
Diffstat (limited to 'PhysX_3.4/Source/LowLevel/common/src/pipeline/PxcNpContactPrepShared.cpp')
| -rw-r--r-- | PhysX_3.4/Source/LowLevel/common/src/pipeline/PxcNpContactPrepShared.cpp | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/PhysX_3.4/Source/LowLevel/common/src/pipeline/PxcNpContactPrepShared.cpp b/PhysX_3.4/Source/LowLevel/common/src/pipeline/PxcNpContactPrepShared.cpp index e0fa6262..466a2d45 100644 --- a/PhysX_3.4/Source/LowLevel/common/src/pipeline/PxcNpContactPrepShared.cpp +++ b/PhysX_3.4/Source/LowLevel/common/src/pipeline/PxcNpContactPrepShared.cpp @@ -552,72 +552,3 @@ PxU32 physx::writeCompressedContact(const Gu::ContactPoint* const PX_RESTRICT co return totalRequiredSize; } - -//ML: isMeshType is used in the GPU codepath. If the collision pair is mesh/heightfield vs primitives, we need to allocate enough memory for the mForceAndIndiceStreamPool in the threadContext. -bool physx::finishContacts(PxcNpWorkUnit& input, PxsContactManagerOutput& npOutput, PxcNpThreadContext& threadContext, PxsMaterialInfo* PX_RESTRICT pMaterials, const bool isMeshType) -{ - ContactBuffer& buffer = threadContext.mContactBuffer; - - PX_ASSERT((npOutput.statusFlag & PxsContactManagerStatusFlag::eTOUCH_KNOWN) != PxsContactManagerStatusFlag::eTOUCH_KNOWN); - PxU8 statusFlags = PxU16(npOutput.statusFlag & (~PxsContactManagerStatusFlag::eTOUCH_KNOWN)); - if (buffer.count != 0) - statusFlags |= PxsContactManagerStatusFlag::eHAS_TOUCH; - else - statusFlags |= PxsContactManagerStatusFlag::eHAS_NO_TOUCH; - - npOutput.nbContacts = Ps::to8(buffer.count); - - if(buffer.count==0) - { - npOutput.statusFlag = statusFlags; - npOutput.nbContacts = 0; - npOutput.nbPatches = 0; - return true; - } - - -#if PX_ENABLE_SIM_STATS - if(buffer.count) - threadContext.mNbDiscreteContactPairsWithContacts++; -#endif - - npOutput.statusFlag = statusFlags; - - PxU32 contactForceByteSize = buffer.count * sizeof(PxReal); - - //Regardless of the flags, we need to now record the compressed contact stream - - PxU16 compressedContactSize; - - const bool createReports = - input.flags & PxcNpWorkUnitFlag::eOUTPUT_CONTACTS - || threadContext.mCreateContactStream - || (input.flags & PxcNpWorkUnitFlag::eFORCE_THRESHOLD); - - if (!buffer.count || (!isMeshType && !createReports)) - { - contactForceByteSize = 0; - } - - bool res = (writeCompressedContact(buffer.contacts, buffer.count, &threadContext, npOutput.nbContacts, npOutput.contactPatches, npOutput.contactPoints, compressedContactSize, - reinterpret_cast<PxReal*&>(npOutput.contactForces), contactForceByteSize, threadContext.mMaterialManager, ((input.flags & PxcNpWorkUnitFlag::eMODIFIABLE_CONTACT) != 0), - false, pMaterials, npOutput.nbPatches, 0, NULL, NULL, threadContext.mCreateAveragePoint, threadContext.mContactStreamPool, - threadContext.mPatchStreamPool, threadContext.mForceAndIndiceStreamPool, isMeshType) != 0) || (buffer.count == 0); - - //handle buffer overflow - if (buffer.count && !npOutput.nbContacts) - { - PxU8 thisStatusFlags = PxU16(npOutput.statusFlag & (~PxsContactManagerStatusFlag::eTOUCH_KNOWN)); - thisStatusFlags |= PxsContactManagerStatusFlag::eHAS_NO_TOUCH; - - npOutput.statusFlag = thisStatusFlags; - npOutput.nbContacts = 0; - npOutput.nbPatches = 0; -#if PX_ENABLE_SIM_STATS - if(buffer.count) - threadContext.mNbDiscreteContactPairsWithContacts--; -#endif - } - - return res; -} |