aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp
diff options
context:
space:
mode:
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