aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2017-11-20 11:35:52 -0600
committerSheikh Dawood Abdul Ajees <[email protected]>2017-11-20 11:35:52 -0600
commit3cc1861221d761b7f0301b9b61de4e1aa18c09f4 (patch)
treea51eb808016e1710a4bbd537000a493250602944 /PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp
parentPhysX 3.4.1, APEX 1.4.1 Release @22845541 (diff)
downloadphysx-3.4-3cc1861221d761b7f0301b9b61de4e1aa18c09f4.tar.xz
physx-3.4-3cc1861221d761b7f0301b9b61de4e1aa18c09f4.zip
PhysX 3.4.1, APEX 1.4.1 Release @23131702
Diffstat (limited to 'PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp')
-rw-r--r--PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp
index fbe0ab4a..cce99cd4 100644
--- a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp
+++ b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp
@@ -55,22 +55,24 @@ public:
PCMSphereVsMeshContactGeneration mGeneration;
PCMSphereVsHeightfieldContactGenerationCallback(
- const Ps::aos::Vec3VArg sphereCenter,
- const Ps::aos::FloatVArg sphereRadius,
- const Ps::aos::FloatVArg contactDistance,
- const Ps::aos::FloatVArg replaceBreakingThreshold,
+ const Ps::aos::Vec3VArg sphereCenter,
+ const Ps::aos::FloatVArg sphereRadius,
+ const Ps::aos::FloatVArg contactDistance,
+ const Ps::aos::FloatVArg replaceBreakingThreshold,
- const PsTransformV& sphereTransform,
- const PsTransformV& heightfieldTransform,
- const PxTransform& heightfieldTransform1,
- Gu::MultiplePersistentContactManifold& multiManifold,
- Gu::ContactBuffer& contactBuffer,
+ const PsTransformV& sphereTransform,
+ const PsTransformV& heightfieldTransform,
+ const PxTransform& heightfieldTransform1,
+ Gu::MultiplePersistentContactManifold& multiManifold,
+ Gu::ContactBuffer& contactBuffer,
+ Ps::InlineArray<PxU32, LOCAL_CONTACTS_SIZE>* deferredContacts,
Gu::HeightFieldUtil& hfUtil
) :
PCMHeightfieldContactGenerationCallback<PCMSphereVsHeightfieldContactGenerationCallback>(hfUtil, heightfieldTransform1),
- mGeneration(sphereCenter, sphereRadius, contactDistance, replaceBreakingThreshold, sphereTransform, heightfieldTransform, multiManifold, contactBuffer)
+ mGeneration(sphereCenter, sphereRadius, contactDistance, replaceBreakingThreshold, sphereTransform,
+ heightfieldTransform, multiManifold, contactBuffer, deferredContacts)
{
}
@@ -123,6 +125,8 @@ bool Gu::pcmContactSphereHeightField(GU_CONTACT_METHOD_ARGS)
PxBounds3 bounds(sphereCenterShape1Space - inflatedRadiusV, sphereCenterShape1Space + inflatedRadiusV);
+ Ps::InlineArray<PxU32, LOCAL_CONTACTS_SIZE> delayedContacts;
+
PCMSphereVsHeightfieldContactGenerationCallback blockCallback(
sphereCenter,
sphereRadius,
@@ -133,10 +137,12 @@ bool Gu::pcmContactSphereHeightField(GU_CONTACT_METHOD_ARGS)
transform1,
multiManifold,
contactBuffer,
+ &delayedContacts,
hfUtil);
hfUtil.overlapAABBTriangles(transform1, bounds, 0, &blockCallback);
+ blockCallback.mGeneration.generateLastContacts();
blockCallback.mGeneration.processContacts(GU_SPHERE_MANIFOLD_CACHE_SIZE, false);
}
else