aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h
diff options
context:
space:
mode:
authorSheikh Dawood <[email protected]>2018-08-13 13:37:04 -0500
committerSheikh Dawood <[email protected]>2018-08-13 13:37:04 -0500
commit3f9977d72f8a481e76b6ad643a3d312a8cf9b551 (patch)
tree8dfa563cf2a06498b56b055af133bd066f1f349c /PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h
parentPhysX 3.4, APEX 1.4 patch release @24214033 (diff)
downloadphysx-3.4-3f9977d72f8a481e76b6ad643a3d312a8cf9b551.tar.xz
physx-3.4-3f9977d72f8a481e76b6ad643a3d312a8cf9b551.zip
PhysX 3.4, APEX 1.4 patch release @24698370
Diffstat (limited to 'PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h')
-rw-r--r--PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h b/PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h
index 6ba0aff2..eede65ff 100644
--- a/PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h
+++ b/PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.h
@@ -103,9 +103,12 @@ namespace Cct
// with fixed-size slabs to get the best of both worlds but it would make iterating over
// triangles more complicated and would need more refactoring. So for now we don't bother,
// but we'll keep this note here for the next time this problem shows up.
-// const PxU32 naturalGrowthSize = maxNbEntries ? maxNbEntries*2 : 2;
-// const PxU32 newSize = PxMax(requiredSize, naturalGrowthSize);
- const PxU32 newSize = requiredSize;
+ // PT: new August 2018: turns out PX-837 was correct. Not doing this produces very large
+ // performance problems (like: the app freezes!) in SampleCCT. We didn't see it because
+ // it's an internal sample that it rarely used these days...
+ const PxU32 naturalGrowthSize = maxNbEntries ? maxNbEntries*2 : 2;
+ const PxU32 newSize = PxMax(requiredSize, naturalGrowthSize);
+// const PxU32 newSize = requiredSize;
Ps::Array<PxTriangle>::reserve(newSize);
}
@@ -129,6 +132,11 @@ namespace Cct
return Ps::Array<PxTriangle>::size();
}
+ PX_FORCE_INLINE const PxTriangle* begin() const
+ {
+ return Ps::Array<PxTriangle>::begin();
+ }
+
PX_FORCE_INLINE void clear()
{
Ps::Array<PxTriangle>::clear();