Daniele Bartolini 4 лет назад
Родитель
Сommit
dac45d5180
100 измененных файлов с 283 добавлено и 133 удалено
  1. 1 1
      3rdparty/bullet3/src/Bullet3Common/b3AlignedObjectArray.h
  2. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3ContactSolverInfo.h
  3. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Generic6DofConstraint.cpp
  4. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Generic6DofConstraint.h
  5. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3JacobianEntry.h
  6. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Point2PointConstraint.cpp
  7. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Point2PointConstraint.h
  8. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3SolverBody.h
  9. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3SolverConstraint.h
  10. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3TypedConstraint.cpp
  11. 1 1
      3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3TypedConstraint.h
  12. 1 1
      3rdparty/bullet3/src/Bullet3Geometry/b3AabbUtil.h
  13. 1 1
      3rdparty/bullet3/src/Bullet3Geometry/b3GeometryUtil.cpp
  14. 1 1
      3rdparty/bullet3/src/Bullet3Geometry/b3GeometryUtil.h
  15. 1 1
      3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3ContactCache.cpp
  16. 1 1
      3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3GjkEpa.cpp
  17. 1 1
      3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3GjkEpa.h
  18. 1 1
      3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3QuantizedBvh.cpp
  19. 1 1
      3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3QuantizedBvh.h
  20. 1 1
      3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3VoronoiSimplexSolver.cpp
  21. 1 1
      3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3VoronoiSimplexSolver.h
  22. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
  23. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h
  24. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btAxisSweep3Internal.h
  25. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h
  26. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
  27. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h
  28. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
  29. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h
  30. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDbvt.cpp
  31. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDbvt.h
  32. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp
  33. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDispatcher.h
  34. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
  35. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
  36. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h
  37. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
  38. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
  39. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
  40. 1 1
      3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h
  41. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
  42. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h
  43. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
  44. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
  45. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h
  46. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp
  47. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.h
  48. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h
  49. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h
  50. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
  51. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h
  52. 19 2
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcherMt.cpp
  53. 2 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcherMt.h
  54. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp
  55. 4 2
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionObject.h
  56. 3 5
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
  57. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
  58. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
  59. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
  60. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h
  61. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
  62. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
  63. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
  64. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h
  65. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
  66. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
  67. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
  68. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h
  69. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp
  70. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h
  71. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp
  72. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h
  73. 1 3
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp
  74. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btManifoldResult.h
  75. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp
  76. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h
  77. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
  78. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h
  79. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
  80. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h
  81. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
  82. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
  83. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btUnionFind.cpp
  84. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btUnionFind.h
  85. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionShapes/btBox2dShape.cpp
  86. 1 1
      3rdparty/bullet3/src/BulletCollision/CollisionShapes/btBox2dShape.h
  87. 119 17
      3rdparty/bullet3/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
  88. 38 9
      3rdparty/bullet3/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
  89. 4 1
      3rdparty/bullet3/src/BulletCollision/CollisionShapes/btSdfCollisionShape.cpp
  90. 1 1
      3rdparty/bullet3/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp
  91. 1 1
      3rdparty/bullet3/src/BulletCollision/Gimpact/btGenericPoolAllocator.h
  92. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
  93. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h
  94. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp
  95. 2 2
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h
  96. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
  97. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
  98. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
  99. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h
  100. 1 1
      3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp

+ 1 - 1
3rdparty/bullet3/src/Bullet3Common/b3AlignedObjectArray.h

@@ -22,7 +22,7 @@ subject to the following restrictions:
 ///If the platform doesn't support placement new, you can disable B3_USE_PLACEMENT_NEW
 ///then the b3AlignedObjectArray doesn't support objects with virtual methods, and non-trivial constructors/destructors
 ///You can enable B3_USE_MEMCPY, then swapping elements in the array will use memcpy instead of operator=
-///see discussion here: http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1231 and
+///see discussion here: https://bulletphysics.orgphpBB2/viewtopic.php?t=1231 and
 ///http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1240
 
 #define B3_USE_PLACEMENT_NEW 1

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3ContactSolverInfo.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Generic6DofConstraint.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Generic6DofConstraint.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3JacobianEntry.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Point2PointConstraint.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3Point2PointConstraint.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3SolverBody.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3SolverConstraint.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3TypedConstraint.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Dynamics/ConstraintSolver/b3TypedConstraint.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2010 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2010 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Geometry/b3AabbUtil.h

@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Geometry/b3GeometryUtil.cpp

@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3Geometry/b3GeometryUtil.h

@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3ContactCache.cpp

@@ -2,7 +2,7 @@
 #if 0
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3GjkEpa.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2008 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2008 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the

+ 1 - 1
3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3GjkEpa.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2008 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2008 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the

+ 1 - 1
3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3QuantizedBvh.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3QuantizedBvh.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3VoronoiSimplexSolver.cpp

@@ -1,7 +1,7 @@
 
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/Bullet3OpenCL/NarrowphaseCollision/b3VoronoiSimplexSolver.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp

@@ -1,6 +1,6 @@
 
 //Bullet Continuous Collision Detection and Physics Library
-//Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+//Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 //
 // btAxisSweep3

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h

@@ -1,5 +1,5 @@
 //Bullet Continuous Collision Detection and Physics Library
-//Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+//Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 //
 // btAxisSweep3.h

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btAxisSweep3Internal.h

@@ -1,5 +1,5 @@
 //Bullet Continuous Collision Detection and Physics Library
-//Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+//Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 //
 // btAxisSweep3.h

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDbvt.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDbvt.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2007 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2007 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btDispatcher.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h

@@ -1,7 +1,7 @@
 
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp

@@ -3,7 +3,7 @@
  * Original version is from Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith.
  * All rights reserved.  Email: [email protected]   Web: www.q12.org
  Bullet Continuous Collision Detection and Physics Library
- Bullet is Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+ Bullet is Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.h

@@ -4,7 +4,7 @@
  * All rights reserved.  Email: [email protected]   Web: www.q12.org
 
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 19 - 2
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcherMt.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.
@@ -29,6 +29,8 @@ btCollisionDispatcherMt::btCollisionDispatcherMt(btCollisionConfiguration* confi
 	: btCollisionDispatcher(config)
 {
 	m_batchManifoldsPtr.resize(btGetTaskScheduler()->getNumThreads());
+	m_batchReleasePtr.resize(btGetTaskScheduler()->getNumThreads());
+
 	m_batchUpdating = false;
 	m_grainSize = grainSize;  // iterations per task
 }
@@ -76,10 +78,11 @@ btPersistentManifold* btCollisionDispatcherMt::getNewManifold(const btCollisionO
 
 void btCollisionDispatcherMt::releaseManifold(btPersistentManifold* manifold)
 {
-	clearManifold(manifold);
 	//btAssert( !btThreadsAreRunning() );
+	
 	if (!m_batchUpdating)
 	{
+		clearManifold(manifold);
 		// batch updater will update manifold pointers array after finishing, so
 		// only need to update array when not batch-updating
 		int findIndex = manifold->m_index1a;
@@ -87,6 +90,9 @@ void btCollisionDispatcherMt::releaseManifold(btPersistentManifold* manifold)
 		m_manifoldsPtr.swap(findIndex, m_manifoldsPtr.size() - 1);
 		m_manifoldsPtr[findIndex]->m_index1a = findIndex;
 		m_manifoldsPtr.pop_back();
+	} else {
+		m_batchReleasePtr[btGetCurrentThreadIndex()].push_back(manifold);
+		return;
 	}
 
 	manifold->~btPersistentManifold();
@@ -154,6 +160,17 @@ void btCollisionDispatcherMt::dispatchAllCollisionPairs(btOverlappingPairCache*
 		batchManifoldsPtr.resizeNoInitialize(0);
 	}
 
+	// remove batched remove manifolds.
+	for (int i = 0; i < m_batchReleasePtr.size(); ++i)
+	{
+		btAlignedObjectArray<btPersistentManifold*>& batchManifoldsPtr = m_batchReleasePtr[i];
+		for (int j = 0; j < batchManifoldsPtr.size(); ++j)
+		{
+			releaseManifold(batchManifoldsPtr[j]);
+		}
+		batchManifoldsPtr.resizeNoInitialize(0);
+	}
+
 	// update the indices (used when releasing manifolds)
 	for (int i = 0; i < m_manifoldsPtr.size(); ++i)
 	{

+ 2 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionDispatcherMt.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.
@@ -31,6 +31,7 @@ public:
 
 protected:
 	btAlignedObjectArray<btAlignedObjectArray<btPersistentManifold*> > m_batchManifoldsPtr;
+	btAlignedObjectArray<btAlignedObjectArray<btPersistentManifold*> > m_batchReleasePtr;
 	bool m_batchUpdating;
 	int m_grainSize;
 };

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 4 - 2
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionObject.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.
@@ -24,6 +24,7 @@ subject to the following restrictions:
 #define WANTS_DEACTIVATION 3
 #define DISABLE_DEACTIVATION 4
 #define DISABLE_SIMULATION 5
+#define FIXED_BASE_MULTI_BODY 6
 
 struct btBroadphaseProxy;
 class btCollisionShape;
@@ -127,6 +128,7 @@ public:
 
 	enum CollisionFlags
 	{
+		CF_DYNAMIC_OBJECT = 0,
 		CF_STATIC_OBJECT = 1,
 		CF_KINEMATIC_OBJECT = 2,
 		CF_NO_CONTACT_RESPONSE = 4,
@@ -303,7 +305,7 @@ public:
 
 	SIMD_FORCE_INLINE bool isActive() const
 	{
-		return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
+		return ((getActivationState() != FIXED_BASE_MULTI_BODY) && (getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
 	}
 
 	void setRestitution(btScalar rest)

+ 3 - 5
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.
@@ -1037,7 +1037,7 @@ struct btSingleSweepCallback : public btBroadphaseRayCallback
 		  m_castShape(castShape)
 	{
 		btVector3 unnormalizedRayDir = (m_convexToTrans.getOrigin() - m_convexFromTrans.getOrigin());
-		btVector3 rayDir = unnormalizedRayDir.normalized();
+		btVector3 rayDir = unnormalizedRayDir.fuzzyZero() ? btVector3(btScalar(0.0), btScalar(0.0), btScalar(0.0)) : unnormalizedRayDir.normalized();
 		///what about division by zero? --> just set rayDirection[i] to INF/BT_LARGE_FLOAT
 		m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[0];
 		m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[1];
@@ -1294,9 +1294,7 @@ public:
 			btVector3 normalColor(1, 1, 0);
 			m_debugDrawer->drawLine(center, center + normal, normalColor);
 		}
-		m_debugDrawer->drawLine(wv0, wv1, m_color);
-		m_debugDrawer->drawLine(wv1, wv2, m_color);
-		m_debugDrawer->drawLine(wv2, wv0, m_color);
+		m_debugDrawer->drawTriangle(wv0, wv1, wv2, m_color, 1.0);
 	}
 };
 

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 3
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.
@@ -90,13 +90,11 @@ btManifoldResult::btManifoldResult(const btCollisionObjectWrapper* body0Wrap, co
 	: m_manifoldPtr(0),
 	  m_body0Wrap(body0Wrap),
 	  m_body1Wrap(body1Wrap)
-#ifdef DEBUG_PART_INDEX
 	  ,
 	  m_partId0(-1),
 	  m_partId1(-1),
 	  m_index0(-1),
 	  m_index1(-1)
-#endif  //DEBUG_PART_INDEX
 	  ,
 	  m_closestPointDistanceThreshold(0)
 {

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btManifoldResult.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp

@@ -1,7 +1,7 @@
 
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btUnionFind.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionDispatch/btUnionFind.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionShapes/btBox2dShape.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/CollisionShapes/btBox2dShape.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 119 - 17
3rdparty/bullet3/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp

@@ -17,6 +17,47 @@ subject to the following restrictions:
 
 #include "LinearMath/btTransformUtil.h"
 
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+	int heightStickWidth, int heightStickLength,
+	const float* heightfieldData, btScalar minHeight, btScalar maxHeight,
+	int upAxis, bool flipQuadEdges)
+	: m_userValue3(0), m_triangleInfoMap(0)
+{
+	initialize(heightStickWidth, heightStickLength, heightfieldData,
+			   /*heightScale=*/1, minHeight, maxHeight, upAxis, PHY_FLOAT,
+			   flipQuadEdges);
+}
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+	int heightStickWidth, int heightStickLength, const double* heightfieldData,
+	btScalar minHeight, btScalar maxHeight, int upAxis, bool flipQuadEdges)
+	: m_userValue3(0), m_triangleInfoMap(0)
+{
+	initialize(heightStickWidth, heightStickLength, heightfieldData,
+			   /*heightScale=*/1, minHeight, maxHeight, upAxis, PHY_DOUBLE,
+			   flipQuadEdges);
+}
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+	int heightStickWidth, int heightStickLength, const short* heightfieldData, btScalar heightScale,
+	btScalar minHeight, btScalar maxHeight, int upAxis, bool flipQuadEdges)
+	: m_userValue3(0), m_triangleInfoMap(0)
+{
+	initialize(heightStickWidth, heightStickLength, heightfieldData,
+			   heightScale, minHeight, maxHeight, upAxis, PHY_SHORT,
+			   flipQuadEdges);
+}
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+	int heightStickWidth, int heightStickLength, const unsigned char* heightfieldData, btScalar heightScale,
+	btScalar minHeight, btScalar maxHeight, int upAxis, bool flipQuadEdges)
+	: m_userValue3(0), m_triangleInfoMap(0)
+{
+	initialize(heightStickWidth, heightStickLength, heightfieldData,
+			   heightScale, minHeight, maxHeight, upAxis, PHY_UCHAR,
+			   flipQuadEdges);
+}
+
 btHeightfieldTerrainShape::btHeightfieldTerrainShape(
 	int heightStickWidth, int heightStickLength, const void* heightfieldData,
 	btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis,
@@ -24,6 +65,10 @@ btHeightfieldTerrainShape::btHeightfieldTerrainShape(
 	:m_userValue3(0),
 	m_triangleInfoMap(0)
 {
+	// legacy constructor: Assumes PHY_FLOAT means btScalar.
+#ifdef BT_USE_DOUBLE_PRECISION
+	if (hdt == PHY_FLOAT) hdt = PHY_DOUBLE;
+#endif
 	initialize(heightStickWidth, heightStickLength, heightfieldData,
 			   heightScale, minHeight, maxHeight, upAxis, hdt,
 			   flipQuadEdges);
@@ -33,9 +78,12 @@ btHeightfieldTerrainShape::btHeightfieldTerrainShape(int heightStickWidth, int h
 	:	m_userValue3(0),
 	m_triangleInfoMap(0)
 {
-	// legacy constructor: support only float or unsigned char,
-	// 	and min height is zero
+	// legacy constructor: support only btScalar or unsigned char data,
+	// and min height is zero.
 	PHY_ScalarType hdt = (useFloatData) ? PHY_FLOAT : PHY_UCHAR;
+#ifdef BT_USE_DOUBLE_PRECISION
+	if (hdt == PHY_FLOAT) hdt = PHY_DOUBLE;
+#endif
 	btScalar minHeight = 0.0f;
 
 	// previously, height = uchar * maxHeight / 65535.
@@ -59,7 +107,7 @@ void btHeightfieldTerrainShape::initialize(
 	// btAssert(heightScale) -- do we care?  Trust caller here
 	btAssert(minHeight <= maxHeight);                                    // && "bad min/max height");
 	btAssert(upAxis >= 0 && upAxis < 3);                                 // && "bad upAxis--should be in range [0,2]");
-	btAssert(hdt != PHY_UCHAR || hdt != PHY_FLOAT || hdt != PHY_SHORT);  // && "Bad height data type enum");
+	btAssert(hdt != PHY_UCHAR || hdt != PHY_FLOAT || hdt != PHY_DOUBLE || hdt != PHY_SHORT);  // && "Bad height data type enum");
 
 	// initialize member variables
 	m_shapeType = TERRAIN_SHAPE_PROXYTYPE;
@@ -152,6 +200,12 @@ btHeightfieldTerrainShape::getRawHeightFieldValue(int x, int y) const
 			break;
 		}
 
+		case PHY_DOUBLE:
+		{
+			val = m_heightfieldDataDouble[(y * m_heightStickWidth) + x];
+			break;
+		}
+
 		case PHY_UCHAR:
 		{
 			unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y * m_heightStickWidth) + x];
@@ -232,6 +286,30 @@ getQuantized(
 	return (int)(x + 0.5);
 }
 
+// Equivalent to std::minmax({a, b, c}).
+// Performs at most 3 comparisons.
+static btHeightfieldTerrainShape::Range minmaxRange(btScalar a, btScalar b, btScalar c)
+{
+	if (a > b)
+	{
+		if (b > c)
+			return btHeightfieldTerrainShape::Range(c, a);
+		else if (a > c)
+			return btHeightfieldTerrainShape::Range(b, a);
+		else
+			return btHeightfieldTerrainShape::Range(b, c);
+	}
+	else
+	{
+		if (a > c)
+			return btHeightfieldTerrainShape::Range(c, b);
+		else if (b > c)
+			return btHeightfieldTerrainShape::Range(a, b);
+		else
+			return btHeightfieldTerrainShape::Range(a, c);
+	}
+}
+
 /// given input vector, return quantized version
 /**
   This routine is basically determining the gridpoint indices for a given
@@ -334,7 +412,8 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
 	}
 
 	// TODO If m_vboundsGrid is available, use it to determine if we really need to process this area
-
+	
+	const Range aabbUpRange(aabbMin[m_upAxis], aabbMax[m_upAxis]);
 	for (int j = startJ; j < endJ; j++)
 	{
 		for (int x = startX; x < endX; x++)
@@ -349,29 +428,51 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
 
 			if (m_flipQuadEdges || (m_useDiamondSubdivision && !((j + x) & 1)) || (m_useZigzagSubdivision && !(j & 1)))
 			{
-				//first triangle
 				getVertex(x, j, vertices[indices[0]]);
 				getVertex(x, j + 1, vertices[indices[1]]);
 				getVertex(x + 1, j + 1, vertices[indices[2]]);
-				callback->processTriangle(vertices, 2 * x, j);
-				//second triangle
-				//  getVertex(x,j,vertices[0]);//already got this vertex before, thanks to Danny Chapman
-				getVertex(x + 1, j + 1, vertices[indices[1]]);
+
+				// Skip triangle processing if the triangle is out-of-AABB.
+				Range upRange = minmaxRange(vertices[0][m_upAxis], vertices[1][m_upAxis], vertices[2][m_upAxis]);
+
+				if (upRange.overlaps(aabbUpRange))
+					callback->processTriangle(vertices, 2 * x, j);
+			
+				// already set: getVertex(x, j, vertices[indices[0]])
+
+				// equivalent to: getVertex(x + 1, j + 1, vertices[indices[1]]);
+				vertices[indices[1]] = vertices[indices[2]];
+
 				getVertex(x + 1, j, vertices[indices[2]]);
-				callback->processTriangle(vertices, 2 * x+1, j);
+				upRange.min = btMin(upRange.min, vertices[indices[2]][m_upAxis]);
+				upRange.max = btMax(upRange.max, vertices[indices[2]][m_upAxis]);
+
+				if (upRange.overlaps(aabbUpRange))
+					callback->processTriangle(vertices, 2 * x + 1, j);
 			}
 			else
 			{
-				//first triangle
 				getVertex(x, j, vertices[indices[0]]);
 				getVertex(x, j + 1, vertices[indices[1]]);
 				getVertex(x + 1, j, vertices[indices[2]]);
-				callback->processTriangle(vertices, 2 * x, j);
-				//second triangle
-				getVertex(x + 1, j, vertices[indices[0]]);
-				//getVertex(x,j+1,vertices[1]);
+
+				// Skip triangle processing if the triangle is out-of-AABB.
+				Range upRange = minmaxRange(vertices[0][m_upAxis], vertices[1][m_upAxis], vertices[2][m_upAxis]);
+
+				if (upRange.overlaps(aabbUpRange))
+					callback->processTriangle(vertices, 2 * x, j);
+
+				// already set: getVertex(x, j + 1, vertices[indices[1]]);
+
+				// equivalent to: getVertex(x + 1, j, vertices[indices[0]]);
+				vertices[indices[0]] = vertices[indices[2]];
+
 				getVertex(x + 1, j + 1, vertices[indices[2]]);
-				callback->processTriangle(vertices, 2 * x+1, j);
+				upRange.min = btMin(upRange.min, vertices[indices[2]][m_upAxis]);
+				upRange.max = btMax(upRange.max, vertices[indices[2]][m_upAxis]);
+
+				if (upRange.overlaps(aabbUpRange))
+					callback->processTriangle(vertices, 2 * x + 1, j);
 			}
 		}
 	}
@@ -727,6 +828,7 @@ void btHeightfieldTerrainShape::performRaycast(btTriangleCallback* callback, con
 		{
 			// Don't use chunks, the ray is too short in the plane
 			gridRaycast(processTriangles, beginPos, endPos, &indices[0]);
+			return;
 		}
 
 		ProcessVBoundsAction processVBounds(m_vboundsGrid, &indices[0]);
@@ -846,4 +948,4 @@ void btHeightfieldTerrainShape::buildAccelerator(int chunkSize)
 void btHeightfieldTerrainShape::clearAccelerator()
 {
 	m_vboundsGrid.clear();
-}
+}

+ 38 - 9
3rdparty/bullet3/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h

@@ -50,17 +50,15 @@ subject to the following restrictions:
   The heightfield heights are determined from the data type used for the
   heightfieldData array.  
 
-   - PHY_UCHAR: height at a point is the uchar value at the
+   - unsigned char: height at a point is the uchar value at the
        grid point, multipled by heightScale.  uchar isn't recommended
        because of its inability to deal with negative values, and
        low resolution (8-bit).
 
-   - PHY_SHORT: height at a point is the short int value at that grid
+   - short: height at a point is the short int value at that grid
        point, multipled by heightScale.
 
-   - PHY_FLOAT: height at a point is the float value at that grid
-       point.  heightScale is ignored when using the float heightfield
-       data type.
+   - float or dobule: height at a point is the value at that grid point.
 
   Whatever the caller specifies as minHeight and maxHeight will be honored.
   The class will not inspect the heightfield to discover the actual minimum
@@ -75,6 +73,14 @@ btHeightfieldTerrainShape : public btConcaveShape
 public:
 	struct Range
 	{
+		Range() {}
+		Range(btScalar min, btScalar max) : min(min), max(max) {}
+
+		bool overlaps(const Range& other) const
+		{
+			return !(min > other.max || max < other.min);
+		}
+
 		btScalar min;
 		btScalar max;
 	};
@@ -95,7 +101,8 @@ protected:
 	union {
 		const unsigned char* m_heightfieldDataUnsignedChar;
 		const short* m_heightfieldDataShort;
-		const btScalar* m_heightfieldDataFloat;
+		const float* m_heightfieldDataFloat;
+		const double* m_heightfieldDataDouble;
 		const void* m_heightfieldDataUnknown;
 	};
 
@@ -135,11 +142,33 @@ protected:
 public:
 	BT_DECLARE_ALIGNED_ALLOCATOR();
 
-	/// preferred constructor
+	/// preferred constructors
+	btHeightfieldTerrainShape(
+		int heightStickWidth, int heightStickLength,
+		const float* heightfieldData, btScalar minHeight, btScalar maxHeight,
+		int upAxis, bool flipQuadEdges);
+	btHeightfieldTerrainShape(
+		int heightStickWidth, int heightStickLength,
+		const double* heightfieldData, btScalar minHeight, btScalar maxHeight,
+		int upAxis, bool flipQuadEdges);
+	btHeightfieldTerrainShape(
+		int heightStickWidth, int heightStickLength,
+		const short* heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight,
+		int upAxis, bool flipQuadEdges);
+	btHeightfieldTerrainShape(
+		int heightStickWidth, int heightStickLength,
+		const unsigned char* heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight,
+		int upAxis, bool flipQuadEdges);
+
+	/// legacy constructor
 	/**
 	  This constructor supports a range of heightfield
 	  data types, and allows for a non-zero minimum height value.
 	  heightScale is needed for any integer-based heightfield data types.
+
+	  This legacy constructor considers `PHY_FLOAT` to mean `btScalar`.
+	  With `BT_USE_DOUBLE_PRECISION`, it will expect `heightfieldData`
+	  to be double-precision.
 	 */
 	btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength,
 							  const void* heightfieldData, btScalar heightScale,
@@ -150,7 +179,7 @@ public:
 	/// legacy constructor
 	/**
 	  The legacy constructor assumes the heightfield has a minimum height
-	  of zero.  Only unsigned char or floats are supported.  For legacy
+	  of zero.  Only unsigned char or btScalar data are supported.  For legacy
 	  compatibility reasons, heightScale is calculated as maxHeight / 65535 
 	  (and is only used when useFloatData = false).
  	 */
@@ -218,4 +247,4 @@ public:
 	}
 };
 
-#endif  //BT_HEIGHTFIELD_TERRAIN_SHAPE_H
+#endif  //BT_HEIGHTFIELD_TERRAIN_SHAPE_H

+ 4 - 1
3rdparty/bullet3/src/BulletCollision/CollisionShapes/btSdfCollisionShape.cpp

@@ -2,8 +2,11 @@
 #include "btMiniSDF.h"
 #include "LinearMath/btAabbUtil2.h"
 
-struct btSdfCollisionShapeInternalData
+ATTRIBUTE_ALIGNED16(struct)
+btSdfCollisionShapeInternalData
 {
+	BT_DECLARE_ALIGNED_ALLOCATOR();
+
 	btVector3 m_localScaling;
 	btScalar m_margin;
 	btMiniSDF m_sdf;

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp

@@ -5,7 +5,7 @@ General purpose allocator class
 */
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/Gimpact/btGenericPoolAllocator.h

@@ -5,7 +5,7 @@ General purpose allocator class
 */
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 2 - 2
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.
@@ -30,7 +30,7 @@ class btMinkowskiSumShape;
 #define MAX_CONVEX_CAST_EPSILON btScalar(0.0001)
 #endif
 ///Typically the conservative advancement reaches solution in a few iterations, clip it to 32 for degenerate cases.
-///See discussion about this here http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=565
+///See discussion about this here https://bulletphysics.orgphpBB2/viewtopic.php?t=565
 //will need to digg deeper to make the algorithm more robust
 //since, a large epsilon can cause an early termination with false
 //positive results (ray intersections that shouldn't be there)

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2006 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 1 - 1
3rdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp

@@ -1,6 +1,6 @@
 /*
 Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2008 Erwin Coumans  http://continuousphysics.com/Bullet/
+Copyright (c) 2003-2008 Erwin Coumans  https://bulletphysics.org
 
 This software is provided 'as-is', without any express or implied warranty.
 In no event will the authors be held liable for any damages arising from the

Некоторые файлы не были показаны из-за большого количества измененных файлов