@bloomengine/engine 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (527) hide show
  1. package/native/tvos/metal-patched/Cargo.toml +178 -0
  2. package/native/tvos/metal-patched/LICENSE-APACHE +201 -0
  3. package/native/tvos/metal-patched/LICENSE-MIT +25 -0
  4. package/native/tvos/metal-patched/src/acceleration_structure.rs +667 -0
  5. package/native/tvos/metal-patched/src/acceleration_structure_pass.rs +108 -0
  6. package/native/tvos/metal-patched/src/argument.rs +366 -0
  7. package/native/tvos/metal-patched/src/blitpass.rs +102 -0
  8. package/native/tvos/metal-patched/src/buffer.rs +71 -0
  9. package/native/tvos/metal-patched/src/capturedescriptor.rs +76 -0
  10. package/native/tvos/metal-patched/src/capturemanager.rs +113 -0
  11. package/native/tvos/metal-patched/src/commandbuffer.rs +192 -0
  12. package/native/tvos/metal-patched/src/commandqueue.rs +44 -0
  13. package/native/tvos/metal-patched/src/computepass.rs +107 -0
  14. package/native/tvos/metal-patched/src/constants.rs +152 -0
  15. package/native/tvos/metal-patched/src/counters.rs +119 -0
  16. package/native/tvos/metal-patched/src/depthstencil.rs +190 -0
  17. package/native/tvos/metal-patched/src/device.rs +2134 -0
  18. package/native/tvos/metal-patched/src/drawable.rs +39 -0
  19. package/native/tvos/metal-patched/src/encoder.rs +2041 -0
  20. package/native/tvos/metal-patched/src/heap.rs +281 -0
  21. package/native/tvos/metal-patched/src/indirect_encoder.rs +344 -0
  22. package/native/tvos/metal-patched/src/lib.rs +657 -0
  23. package/native/tvos/metal-patched/src/library.rs +902 -0
  24. package/native/tvos/metal-patched/src/mps.rs +575 -0
  25. package/native/tvos/metal-patched/src/pipeline/compute.rs +475 -0
  26. package/native/tvos/metal-patched/src/pipeline/mod.rs +71 -0
  27. package/native/tvos/metal-patched/src/pipeline/render.rs +762 -0
  28. package/native/tvos/metal-patched/src/renderpass.rs +443 -0
  29. package/native/tvos/metal-patched/src/resource.rs +182 -0
  30. package/native/tvos/metal-patched/src/sampler.rs +165 -0
  31. package/native/tvos/metal-patched/src/sync.rs +178 -0
  32. package/native/tvos/metal-patched/src/texture.rs +352 -0
  33. package/native/tvos/metal-patched/src/types.rs +90 -0
  34. package/native/tvos/metal-patched/src/vertexdescriptor.rs +250 -0
  35. package/package.json +8 -11
  36. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/build.gradle +0 -51
  37. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/AndroidManifest.xml +0 -20
  38. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/cpp/CMakeLists.txt +0 -20
  39. package/native/third_party/JoltPhysics/Build/Android/UnitTests/build.gradle +0 -51
  40. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/AndroidManifest.xml +0 -20
  41. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/cpp/CMakeLists.txt +0 -20
  42. package/native/third_party/JoltPhysics/Build/Android/build.gradle +0 -17
  43. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.jar +0 -0
  44. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.properties +0 -5
  45. package/native/third_party/JoltPhysics/Build/Android/gradle.properties +0 -21
  46. package/native/third_party/JoltPhysics/Build/Android/gradlew +0 -185
  47. package/native/third_party/JoltPhysics/Build/Android/gradlew.bat +0 -89
  48. package/native/third_party/JoltPhysics/Build/Android/settings.gradle +0 -10
  49. package/native/third_party/JoltPhysics/Build/CMakeLists.txt +0 -449
  50. package/native/third_party/JoltPhysics/Build/README.md +0 -250
  51. package/native/third_party/JoltPhysics/Build/cmake_linux_clang_gcc.sh +0 -28
  52. package/native/third_party/JoltPhysics/Build/cmake_linux_emscripten.sh +0 -19
  53. package/native/third_party/JoltPhysics/Build/cmake_linux_mingw.sh +0 -19
  54. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl.bat +0 -3
  55. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_32bit.bat +0 -3
  56. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm.bat +0 -3
  57. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm_32bit.bat +0 -4
  58. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_cross_platform_deterministic.bat +0 -3
  59. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_double.bat +0 -3
  60. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_no_object_stream.bat +0 -3
  61. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang.bat +0 -10
  62. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_cross_platform_deterministic.bat +0 -10
  63. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_double.bat +0 -10
  64. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp.bat +0 -5
  65. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp_arm.bat +0 -5
  66. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl.bat +0 -3
  67. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_cross_platform_deterministic.bat +0 -3
  68. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_double.bat +0 -3
  69. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang.bat +0 -10
  70. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_cross_platform_deterministic.bat +0 -10
  71. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_double.bat +0 -10
  72. package/native/third_party/JoltPhysics/Build/cmake_windows_mingw.sh +0 -19
  73. package/native/third_party/JoltPhysics/Build/cmake_xcode_ios.sh +0 -4
  74. package/native/third_party/JoltPhysics/Build/cmake_xcode_macos.sh +0 -4
  75. package/native/third_party/JoltPhysics/Build/iOS/JoltViewerInfo.plist +0 -34
  76. package/native/third_party/JoltPhysics/Build/iOS/SamplesInfo.plist +0 -34
  77. package/native/third_party/JoltPhysics/Build/iOS/UnitTestsInfo.plist +0 -34
  78. package/native/third_party/JoltPhysics/Build/macOS/icon.icns +0 -0
  79. package/native/third_party/JoltPhysics/Build/macos_install_vulkan_sdk.sh +0 -13
  80. package/native/third_party/JoltPhysics/Build/ubuntu24_install_vulkan_sdk.sh +0 -4
  81. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.cpp +0 -242
  82. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.h +0 -121
  83. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeToBuffer.h +0 -296
  84. package/native/third_party/JoltPhysics/Jolt/AABBTree/NodeCodec/NodeCodecQuadTreeHalfFloat.h +0 -323
  85. package/native/third_party/JoltPhysics/Jolt/AABBTree/TriangleCodec/TriangleCodecIndexed8BitPackSOA4Flags.h +0 -555
  86. package/native/third_party/JoltPhysics/Jolt/ConfigurationString.h +0 -112
  87. package/native/third_party/JoltPhysics/Jolt/Core/ARMNeon.h +0 -94
  88. package/native/third_party/JoltPhysics/Jolt/Core/Array.h +0 -713
  89. package/native/third_party/JoltPhysics/Jolt/Core/Atomics.h +0 -44
  90. package/native/third_party/JoltPhysics/Jolt/Core/BinaryHeap.h +0 -96
  91. package/native/third_party/JoltPhysics/Jolt/Core/ByteBuffer.h +0 -74
  92. package/native/third_party/JoltPhysics/Jolt/Core/Color.cpp +0 -38
  93. package/native/third_party/JoltPhysics/Jolt/Core/Color.h +0 -98
  94. package/native/third_party/JoltPhysics/Jolt/Core/Core.h +0 -652
  95. package/native/third_party/JoltPhysics/Jolt/Core/FPControlWord.h +0 -143
  96. package/native/third_party/JoltPhysics/Jolt/Core/FPException.h +0 -96
  97. package/native/third_party/JoltPhysics/Jolt/Core/FPFlushDenormals.h +0 -43
  98. package/native/third_party/JoltPhysics/Jolt/Core/Factory.cpp +0 -92
  99. package/native/third_party/JoltPhysics/Jolt/Core/Factory.h +0 -54
  100. package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.h +0 -122
  101. package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl +0 -215
  102. package/native/third_party/JoltPhysics/Jolt/Core/HashCombine.h +0 -234
  103. package/native/third_party/JoltPhysics/Jolt/Core/HashTable.h +0 -876
  104. package/native/third_party/JoltPhysics/Jolt/Core/InsertionSort.h +0 -58
  105. package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.cpp +0 -27
  106. package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.h +0 -38
  107. package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.h +0 -311
  108. package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.inl +0 -56
  109. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.cpp +0 -65
  110. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.h +0 -62
  111. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp +0 -364
  112. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.h +0 -101
  113. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.cpp +0 -230
  114. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.h +0 -85
  115. package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.cpp +0 -51
  116. package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.h +0 -67
  117. package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.h +0 -182
  118. package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.inl +0 -351
  119. package/native/third_party/JoltPhysics/Jolt/Core/Memory.cpp +0 -85
  120. package/native/third_party/JoltPhysics/Jolt/Core/Memory.h +0 -85
  121. package/native/third_party/JoltPhysics/Jolt/Core/Mutex.h +0 -223
  122. package/native/third_party/JoltPhysics/Jolt/Core/MutexArray.h +0 -98
  123. package/native/third_party/JoltPhysics/Jolt/Core/NonCopyable.h +0 -18
  124. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.cpp +0 -677
  125. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.h +0 -301
  126. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.inl +0 -90
  127. package/native/third_party/JoltPhysics/Jolt/Core/QuickSort.h +0 -137
  128. package/native/third_party/JoltPhysics/Jolt/Core/RTTI.cpp +0 -149
  129. package/native/third_party/JoltPhysics/Jolt/Core/RTTI.h +0 -436
  130. package/native/third_party/JoltPhysics/Jolt/Core/Reference.h +0 -244
  131. package/native/third_party/JoltPhysics/Jolt/Core/Result.h +0 -174
  132. package/native/third_party/JoltPhysics/Jolt/Core/STLAlignedAllocator.h +0 -72
  133. package/native/third_party/JoltPhysics/Jolt/Core/STLAllocator.h +0 -127
  134. package/native/third_party/JoltPhysics/Jolt/Core/STLLocalAllocator.h +0 -170
  135. package/native/third_party/JoltPhysics/Jolt/Core/STLTempAllocator.h +0 -80
  136. package/native/third_party/JoltPhysics/Jolt/Core/ScopeExit.h +0 -49
  137. package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.cpp +0 -135
  138. package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.h +0 -68
  139. package/native/third_party/JoltPhysics/Jolt/Core/StaticArray.h +0 -329
  140. package/native/third_party/JoltPhysics/Jolt/Core/StreamIn.h +0 -120
  141. package/native/third_party/JoltPhysics/Jolt/Core/StreamOut.h +0 -97
  142. package/native/third_party/JoltPhysics/Jolt/Core/StreamUtils.h +0 -168
  143. package/native/third_party/JoltPhysics/Jolt/Core/StreamWrapper.h +0 -53
  144. package/native/third_party/JoltPhysics/Jolt/Core/StridedPtr.h +0 -63
  145. package/native/third_party/JoltPhysics/Jolt/Core/StringTools.cpp +0 -101
  146. package/native/third_party/JoltPhysics/Jolt/Core/StringTools.h +0 -38
  147. package/native/third_party/JoltPhysics/Jolt/Core/TempAllocator.h +0 -209
  148. package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.cpp +0 -37
  149. package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.h +0 -58
  150. package/native/third_party/JoltPhysics/Jolt/Core/UnorderedMap.h +0 -80
  151. package/native/third_party/JoltPhysics/Jolt/Core/UnorderedSet.h +0 -32
  152. package/native/third_party/JoltPhysics/Jolt/Geometry/AABox.h +0 -313
  153. package/native/third_party/JoltPhysics/Jolt/Geometry/AABox4.h +0 -224
  154. package/native/third_party/JoltPhysics/Jolt/Geometry/ClipPoly.h +0 -200
  155. package/native/third_party/JoltPhysics/Jolt/Geometry/ClosestPoint.h +0 -498
  156. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.cpp +0 -1467
  157. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.h +0 -276
  158. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.cpp +0 -335
  159. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.h +0 -105
  160. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexSupport.h +0 -188
  161. package/native/third_party/JoltPhysics/Jolt/Geometry/EPAConvexHullBuilder.h +0 -845
  162. package/native/third_party/JoltPhysics/Jolt/Geometry/EPAPenetrationDepth.h +0 -557
  163. package/native/third_party/JoltPhysics/Jolt/Geometry/Ellipse.h +0 -77
  164. package/native/third_party/JoltPhysics/Jolt/Geometry/GJKClosestPoint.h +0 -945
  165. package/native/third_party/JoltPhysics/Jolt/Geometry/IndexedTriangle.h +0 -130
  166. package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.cpp +0 -222
  167. package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.h +0 -19
  168. package/native/third_party/JoltPhysics/Jolt/Geometry/MortonCode.h +0 -40
  169. package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.cpp +0 -178
  170. package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.h +0 -39
  171. package/native/third_party/JoltPhysics/Jolt/Geometry/Plane.h +0 -104
  172. package/native/third_party/JoltPhysics/Jolt/Geometry/RayAABox.h +0 -241
  173. package/native/third_party/JoltPhysics/Jolt/Geometry/RayCapsule.h +0 -37
  174. package/native/third_party/JoltPhysics/Jolt/Geometry/RayCylinder.h +0 -101
  175. package/native/third_party/JoltPhysics/Jolt/Geometry/RaySphere.h +0 -96
  176. package/native/third_party/JoltPhysics/Jolt/Geometry/RayTriangle.h +0 -158
  177. package/native/third_party/JoltPhysics/Jolt/Geometry/Sphere.h +0 -72
  178. package/native/third_party/JoltPhysics/Jolt/Geometry/Triangle.h +0 -34
  179. package/native/third_party/JoltPhysics/Jolt/Jolt.cmake +0 -703
  180. package/native/third_party/JoltPhysics/Jolt/Jolt.h +0 -16
  181. package/native/third_party/JoltPhysics/Jolt/Jolt.natvis +0 -116
  182. package/native/third_party/JoltPhysics/Jolt/Math/BVec16.h +0 -99
  183. package/native/third_party/JoltPhysics/Jolt/Math/BVec16.inl +0 -177
  184. package/native/third_party/JoltPhysics/Jolt/Math/DMat44.h +0 -158
  185. package/native/third_party/JoltPhysics/Jolt/Math/DMat44.inl +0 -310
  186. package/native/third_party/JoltPhysics/Jolt/Math/DVec3.h +0 -291
  187. package/native/third_party/JoltPhysics/Jolt/Math/DVec3.inl +0 -941
  188. package/native/third_party/JoltPhysics/Jolt/Math/Double3.h +0 -48
  189. package/native/third_party/JoltPhysics/Jolt/Math/DynMatrix.h +0 -31
  190. package/native/third_party/JoltPhysics/Jolt/Math/EigenValueSymmetric.h +0 -177
  191. package/native/third_party/JoltPhysics/Jolt/Math/FindRoot.h +0 -42
  192. package/native/third_party/JoltPhysics/Jolt/Math/Float2.h +0 -36
  193. package/native/third_party/JoltPhysics/Jolt/Math/Float3.h +0 -50
  194. package/native/third_party/JoltPhysics/Jolt/Math/Float4.h +0 -44
  195. package/native/third_party/JoltPhysics/Jolt/Math/GaussianElimination.h +0 -102
  196. package/native/third_party/JoltPhysics/Jolt/Math/HalfFloat.h +0 -208
  197. package/native/third_party/JoltPhysics/Jolt/Math/Mat44.h +0 -243
  198. package/native/third_party/JoltPhysics/Jolt/Math/Mat44.inl +0 -952
  199. package/native/third_party/JoltPhysics/Jolt/Math/Math.h +0 -208
  200. package/native/third_party/JoltPhysics/Jolt/Math/MathTypes.h +0 -32
  201. package/native/third_party/JoltPhysics/Jolt/Math/Matrix.h +0 -259
  202. package/native/third_party/JoltPhysics/Jolt/Math/Quat.h +0 -268
  203. package/native/third_party/JoltPhysics/Jolt/Math/Quat.inl +0 -406
  204. package/native/third_party/JoltPhysics/Jolt/Math/Real.h +0 -44
  205. package/native/third_party/JoltPhysics/Jolt/Math/Swizzle.h +0 -19
  206. package/native/third_party/JoltPhysics/Jolt/Math/Trigonometry.h +0 -79
  207. package/native/third_party/JoltPhysics/Jolt/Math/UVec4.h +0 -232
  208. package/native/third_party/JoltPhysics/Jolt/Math/UVec4.inl +0 -636
  209. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.cpp +0 -71
  210. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.h +0 -308
  211. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.inl +0 -942
  212. package/native/third_party/JoltPhysics/Jolt/Math/Vec4.h +0 -320
  213. package/native/third_party/JoltPhysics/Jolt/Math/Vec4.inl +0 -1152
  214. package/native/third_party/JoltPhysics/Jolt/Math/Vector.h +0 -211
  215. package/native/third_party/JoltPhysics/Jolt/ObjectStream/GetPrimitiveTypeOfType.h +0 -54
  216. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.cpp +0 -38
  217. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.h +0 -337
  218. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.cpp +0 -252
  219. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.h +0 -57
  220. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.cpp +0 -165
  221. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.h +0 -57
  222. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.cpp +0 -635
  223. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.h +0 -148
  224. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.cpp +0 -166
  225. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.h +0 -101
  226. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.cpp +0 -418
  227. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.h +0 -55
  228. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.cpp +0 -255
  229. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.h +0 -62
  230. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTypes.h +0 -26
  231. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttribute.h +0 -111
  232. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeEnum.h +0 -67
  233. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeTyped.h +0 -60
  234. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.cpp +0 -15
  235. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.h +0 -170
  236. package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.cpp +0 -70
  237. package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.h +0 -45
  238. package/native/third_party/JoltPhysics/Jolt/Physics/Body/AllowedDOFs.h +0 -68
  239. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.cpp +0 -426
  240. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.h +0 -452
  241. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.inl +0 -197
  242. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyAccess.h +0 -68
  243. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyActivationListener.h +0 -28
  244. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.cpp +0 -234
  245. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.h +0 -124
  246. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyFilter.h +0 -130
  247. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyID.h +0 -101
  248. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.cpp +0 -1099
  249. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.h +0 -324
  250. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLock.h +0 -111
  251. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockInterface.h +0 -134
  252. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockMulti.h +0 -120
  253. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.cpp +0 -1220
  254. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.h +0 -403
  255. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyPair.h +0 -36
  256. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyType.h +0 -19
  257. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.cpp +0 -185
  258. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.h +0 -58
  259. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.cpp +0 -92
  260. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.h +0 -308
  261. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.inl +0 -178
  262. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionQuality.h +0 -31
  263. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionType.h +0 -17
  264. package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.cpp +0 -354
  265. package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.h +0 -159
  266. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.cpp +0 -59
  267. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.h +0 -157
  268. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterID.h +0 -98
  269. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.cpp +0 -1933
  270. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.h +0 -752
  271. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/AABoxCast.h +0 -20
  272. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdgeMode.h +0 -17
  273. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdges.h +0 -114
  274. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BackFaceMode.h +0 -16
  275. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.cpp +0 -16
  276. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.h +0 -109
  277. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.cpp +0 -313
  278. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h +0 -38
  279. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h +0 -148
  280. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h +0 -92
  281. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceTable.h +0 -64
  282. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.cpp +0 -629
  283. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h +0 -108
  284. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h +0 -56
  285. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterMask.h +0 -35
  286. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterTable.h +0 -66
  287. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.cpp +0 -1768
  288. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.h +0 -389
  289. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.cpp +0 -107
  290. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.h +0 -46
  291. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastResult.h +0 -37
  292. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.cpp +0 -223
  293. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.h +0 -49
  294. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollectFacesMode.h +0 -16
  295. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.cpp +0 -155
  296. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.h +0 -56
  297. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollidePointResult.h +0 -25
  298. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShape.h +0 -106
  299. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShapeVsShapePerLeaf.h +0 -94
  300. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h +0 -110
  301. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVerticesVsTriangles.h +0 -102
  302. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.cpp +0 -121
  303. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.h +0 -50
  304. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollector.h +0 -109
  305. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollectorImpl.h +0 -219
  306. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.cpp +0 -107
  307. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.h +0 -97
  308. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.cpp +0 -35
  309. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.h +0 -97
  310. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ContactListener.h +0 -143
  311. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.cpp +0 -213
  312. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.h +0 -48
  313. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.cpp +0 -32
  314. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.h +0 -46
  315. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.cpp +0 -38
  316. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.h +0 -130
  317. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/InternalEdgeRemovingCollector.h +0 -279
  318. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.cpp +0 -271
  319. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.h +0 -44
  320. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.cpp +0 -448
  321. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.h +0 -77
  322. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.cpp +0 -62
  323. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.h +0 -110
  324. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayer.h +0 -111
  325. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterMask.h +0 -52
  326. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterTable.h +0 -78
  327. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.cpp +0 -35
  328. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.h +0 -57
  329. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.cpp +0 -38
  330. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.h +0 -37
  331. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/RayCast.h +0 -87
  332. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.cpp +0 -318
  333. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.h +0 -115
  334. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.cpp +0 -438
  335. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.h +0 -129
  336. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.cpp +0 -433
  337. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.h +0 -354
  338. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShapeVisitors.h +0 -461
  339. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.cpp +0 -1311
  340. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.h +0 -202
  341. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.cpp +0 -566
  342. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.h +0 -150
  343. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.cpp +0 -418
  344. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.h +0 -126
  345. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.cpp +0 -87
  346. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.h +0 -80
  347. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.cpp +0 -64
  348. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.h +0 -75
  349. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/GetTrianglesContext.h +0 -248
  350. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.cpp +0 -2754
  351. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.h +0 -380
  352. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.cpp +0 -1305
  353. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.h +0 -228
  354. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.cpp +0 -596
  355. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.h +0 -176
  356. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.cpp +0 -217
  357. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h +0 -140
  358. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.cpp +0 -541
  359. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.h +0 -147
  360. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h +0 -319
  361. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.cpp +0 -333
  362. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h +0 -161
  363. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaleHelpers.h +0 -83
  364. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.cpp +0 -238
  365. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.h +0 -145
  366. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.cpp +0 -325
  367. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.h +0 -466
  368. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.cpp +0 -347
  369. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.h +0 -125
  370. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.cpp +0 -674
  371. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.h +0 -139
  372. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeID.h +0 -138
  373. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeIDPair.h +0 -65
  374. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.cpp +0 -453
  375. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.gliffy +0 -1
  376. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h +0 -135
  377. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.cpp +0 -691
  378. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.h +0 -132
  379. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.cpp +0 -430
  380. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.h +0 -143
  381. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeCast.h +0 -173
  382. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeFilter.h +0 -73
  383. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilter.h +0 -40
  384. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilterWrapper.h +0 -58
  385. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SortReverseAndStore.h +0 -48
  386. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.cpp +0 -180
  387. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.h +0 -194
  388. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/CalculateSolverSteps.h +0 -70
  389. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.cpp +0 -246
  390. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.h +0 -133
  391. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.cpp +0 -73
  392. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.h +0 -243
  393. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.cpp +0 -289
  394. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.h +0 -100
  395. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h +0 -257
  396. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h +0 -682
  397. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h +0 -276
  398. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h +0 -195
  399. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h +0 -222
  400. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h +0 -246
  401. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h +0 -239
  402. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h +0 -196
  403. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h +0 -283
  404. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h +0 -246
  405. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SpringPart.h +0 -169
  406. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h +0 -597
  407. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.cpp +0 -1804
  408. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.h +0 -524
  409. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.cpp +0 -266
  410. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.h +0 -120
  411. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.cpp +0 -215
  412. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.h +0 -96
  413. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.cpp +0 -188
  414. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.h +0 -116
  415. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.cpp +0 -443
  416. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.h +0 -205
  417. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.cpp +0 -43
  418. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.h +0 -66
  419. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.cpp +0 -458
  420. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.h +0 -191
  421. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.cpp +0 -85
  422. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.h +0 -76
  423. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.cpp +0 -308
  424. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.h +0 -54
  425. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.cpp +0 -157
  426. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.h +0 -94
  427. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.cpp +0 -253
  428. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.h +0 -137
  429. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.cpp +0 -189
  430. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.h +0 -118
  431. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.cpp +0 -900
  432. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.h +0 -289
  433. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.cpp +0 -501
  434. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.h +0 -198
  435. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.cpp +0 -35
  436. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.h +0 -70
  437. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.cpp +0 -524
  438. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.h +0 -197
  439. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.cpp +0 -56
  440. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.h +0 -65
  441. package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.cpp +0 -17
  442. package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.h +0 -159
  443. package/native/third_party/JoltPhysics/Jolt/Physics/EActivation.h +0 -16
  444. package/native/third_party/JoltPhysics/Jolt/Physics/EPhysicsUpdateError.h +0 -37
  445. package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.cpp +0 -492
  446. package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.h +0 -144
  447. package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.cpp +0 -582
  448. package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.h +0 -187
  449. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsLock.h +0 -169
  450. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.cpp +0 -261
  451. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.h +0 -104
  452. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSettings.h +0 -125
  453. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsStepListener.h +0 -37
  454. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.cpp +0 -2915
  455. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.h +0 -391
  456. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.cpp +0 -25
  457. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.h +0 -176
  458. package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.cpp +0 -744
  459. package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.h +0 -245
  460. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyContactListener.h +0 -55
  461. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.cpp +0 -128
  462. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.h +0 -75
  463. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyManifold.h +0 -74
  464. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp +0 -1501
  465. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.h +0 -333
  466. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.cpp +0 -354
  467. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.h +0 -73
  468. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.cpp +0 -1487
  469. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.h +0 -390
  470. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyUpdateContext.h +0 -63
  471. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyVertex.h +0 -36
  472. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorder.h +0 -136
  473. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.cpp +0 -90
  474. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.h +0 -50
  475. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.cpp +0 -306
  476. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.h +0 -119
  477. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.cpp +0 -547
  478. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.h +0 -169
  479. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.cpp +0 -33
  480. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.h +0 -33
  481. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.cpp +0 -376
  482. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.h +0 -146
  483. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.cpp +0 -703
  484. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.h +0 -252
  485. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.cpp +0 -17
  486. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.h +0 -87
  487. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.cpp +0 -81
  488. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.h +0 -39
  489. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.cpp +0 -122
  490. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.h +0 -93
  491. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.cpp +0 -52
  492. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.h +0 -56
  493. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.cpp +0 -159
  494. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.h +0 -87
  495. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.cpp +0 -93
  496. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.h +0 -148
  497. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.cpp +0 -866
  498. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.h +0 -205
  499. package/native/third_party/JoltPhysics/Jolt/RegisterTypes.cpp +0 -204
  500. package/native/third_party/JoltPhysics/Jolt/RegisterTypes.h +0 -29
  501. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.cpp +0 -1107
  502. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.h +0 -383
  503. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.cpp +0 -168
  504. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.h +0 -48
  505. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.cpp +0 -158
  506. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.h +0 -130
  507. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.cpp +0 -80
  508. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.h +0 -88
  509. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.cpp +0 -165
  510. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.h +0 -91
  511. package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.cpp +0 -82
  512. package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.h +0 -72
  513. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.cpp +0 -237
  514. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.h +0 -145
  515. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.cpp +0 -87
  516. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.h +0 -82
  517. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.cpp +0 -73
  518. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.h +0 -84
  519. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.cpp +0 -139
  520. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.h +0 -52
  521. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.cpp +0 -43
  522. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.h +0 -28
  523. package/native/third_party/JoltPhysics/LICENSE +0 -7
  524. package/native/third_party/JoltPhysics/README.md +0 -173
  525. package/native/third_party/bloom_jolt/CMakeLists.txt +0 -87
  526. package/native/third_party/bloom_jolt/include/bloom_jolt.h +0 -519
  527. package/native/third_party/bloom_jolt/src/bloom_jolt.cpp +0 -1780
@@ -1,752 +0,0 @@
1
- // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2
- // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3
- // SPDX-License-Identifier: MIT
4
-
5
- #pragma once
6
-
7
- #include <Jolt/Physics/Character/CharacterBase.h>
8
- #include <Jolt/Physics/Character/CharacterID.h>
9
- #include <Jolt/Physics/Body/MotionType.h>
10
- #include <Jolt/Physics/Body/BodyFilter.h>
11
- #include <Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h>
12
- #include <Jolt/Physics/Collision/ObjectLayer.h>
13
- #include <Jolt/Physics/Collision/TransformedShape.h>
14
- #include <Jolt/Core/STLTempAllocator.h>
15
-
16
- JPH_NAMESPACE_BEGIN
17
-
18
- class CharacterVirtual;
19
- class CollideShapeSettings;
20
-
21
- /// Contains the configuration of a character
22
- class JPH_EXPORT CharacterVirtualSettings : public CharacterBaseSettings
23
- {
24
- public:
25
- JPH_OVERRIDE_NEW_DELETE
26
-
27
- /// Constructor
28
- CharacterVirtualSettings() = default;
29
- CharacterVirtualSettings(const CharacterVirtualSettings &) = default;
30
- CharacterVirtualSettings & operator = (const CharacterVirtualSettings &) = default;
31
-
32
- /// ID to give to this character. This is used for deterministically sorting and as an identifier to represent the character in the contact removal callback.
33
- CharacterID mID = CharacterID::sNextCharacterID();
34
-
35
- /// Character mass (kg). Used to push down objects with gravity when the character is standing on top.
36
- float mMass = 70.0f;
37
-
38
- /// Maximum force with which the character can push other bodies (N).
39
- float mMaxStrength = 100.0f;
40
-
41
- /// An extra offset applied to the shape in local space. This allows applying an extra offset to the shape in local space.
42
- Vec3 mShapeOffset = Vec3::sZero();
43
-
44
- ///@name Movement settings
45
- EBackFaceMode mBackFaceMode = EBackFaceMode::CollideWithBackFaces; ///< When colliding with back faces, the character will not be able to move through back facing triangles. Use this if you have triangles that need to collide on both sides.
46
- float mPredictiveContactDistance = 0.1f; ///< How far to scan outside of the shape for predictive contacts. A value of 0 will most likely cause the character to get stuck as it cannot properly calculate a sliding direction anymore. A value that's too high will cause ghost collisions.
47
- uint mMaxCollisionIterations = 5; ///< Max amount of collision loops
48
- uint mMaxConstraintIterations = 15; ///< How often to try stepping in the constraint solving
49
- float mMinTimeRemaining = 1.0e-4f; ///< Early out condition: If this much time is left to simulate we are done
50
- float mCollisionTolerance = 1.0e-3f; ///< How far we're willing to penetrate geometry
51
- float mCharacterPadding = 0.02f; ///< How far we try to stay away from the geometry, this ensures that the sweep will hit as little as possible lowering the collision cost and reducing the risk of getting stuck
52
- uint mMaxNumHits = 256; ///< Max num hits to collect in order to avoid excess of contact points collection
53
- float mHitReductionCosMaxAngle = 0.999f; ///< Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off.
54
- float mPenetrationRecoverySpeed = 1.0f; ///< This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in one update
55
-
56
- /// This character can optionally have an inner rigid body. This rigid body can be used to give the character presence in the world. When set it means that:
57
- /// - Regular collision checks (e.g. NarrowPhaseQuery::CastRay) will collide with the rigid body (they cannot collide with CharacterVirtual since it is not added to the broad phase)
58
- /// - Regular contact callbacks will be called through the ContactListener (next to the ones that will be passed to the CharacterContactListener)
59
- /// - Fast moving objects of motion quality LinearCast will not be able to pass through the CharacterVirtual in 1 time step
60
- RefConst<Shape> mInnerBodyShape;
61
-
62
- /// For a deterministic simulation, it is important to have a deterministic body ID. When set and when mInnerBodyShape is specified,
63
- /// the inner body will be created with this specified ID instead of a generated ID.
64
- BodyID mInnerBodyIDOverride;
65
-
66
- /// Layer that the inner rigid body will be added to
67
- ObjectLayer mInnerBodyLayer = 0;
68
- };
69
-
70
- /// This class contains settings that allow you to override the behavior of a character's collision response
71
- class CharacterContactSettings
72
- {
73
- public:
74
- /// True when the object can push the virtual character.
75
- bool mCanPushCharacter = true;
76
-
77
- /// True when the virtual character can apply impulses (push) the body.
78
- /// Note that this only works against rigid bodies. Other CharacterVirtual objects can only be moved in their own update,
79
- /// so you must ensure that in their OnCharacterContactAdded mCanPushCharacter is true.
80
- bool mCanReceiveImpulses = true;
81
- };
82
-
83
- /// This class receives callbacks when a virtual character hits something.
84
- /// Once created, register it on a CharacterVirtual by using the character's SetListener method.
85
- class JPH_EXPORT CharacterContactListener
86
- {
87
- public:
88
- /// Destructor
89
- virtual ~CharacterContactListener() = default;
90
-
91
- /// Callback to adjust the velocity of a body as seen by the character. Can be adjusted to e.g. implement a conveyor belt or an inertial dampener system of a sci-fi space ship.
92
- /// Note that inBody2 is locked during the callback so you can read its properties freely.
93
- virtual void OnAdjustBodyVelocity(const CharacterVirtual *inCharacter, const Body &inBody2, Vec3 &ioLinearVelocity, Vec3 &ioAngularVelocity) { /* Do nothing, the linear and angular velocity are already filled in */ }
94
-
95
- /// Checks if a character can collide with specified body. Return true if the contact is valid.
96
- virtual bool OnContactValidate(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2) { return true; }
97
-
98
- /// Same as OnContactValidate but when colliding with a CharacterVirtual
99
- virtual bool OnCharacterContactValidate(const CharacterVirtual *inCharacter, const CharacterVirtual *inOtherCharacter, const SubShapeID &inSubShapeID2) { return true; }
100
-
101
- /// Called whenever the character collides with a body for the first time.
102
- /// @param inCharacter Character that is being solved
103
- /// @param inBodyID2 Body ID of body that is being hit
104
- /// @param inSubShapeID2 Sub shape ID of shape that is being hit
105
- /// @param inContactPosition World space contact position
106
- /// @param inContactNormal World space contact normal
107
- /// @param ioSettings Settings returned by the contact callback to indicate how the character should behave
108
- virtual void OnContactAdded(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, CharacterContactSettings &ioSettings) { /* Default do nothing */ }
109
-
110
- /// Called whenever the character persists colliding with a body.
111
- /// @param inCharacter Character that is being solved
112
- /// @param inBodyID2 Body ID of body that is being hit
113
- /// @param inSubShapeID2 Sub shape ID of shape that is being hit
114
- /// @param inContactPosition World space contact position
115
- /// @param inContactNormal World space contact normal
116
- /// @param ioSettings Settings returned by the contact callback to indicate how the character should behave
117
- virtual void OnContactPersisted(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, CharacterContactSettings &ioSettings) { /* Default do nothing */ }
118
-
119
- /// Called whenever the character loses contact with a body.
120
- /// Note that there is no guarantee that the body or its sub shape still exists at this point. The body may have been deleted since the last update.
121
- /// @param inCharacter Character that is being solved
122
- /// @param inBodyID2 Body ID of body that is being hit
123
- /// @param inSubShapeID2 Sub shape ID of shape that is being hit
124
- virtual void OnContactRemoved(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2) { /* Default do nothing */ }
125
-
126
- /// Same as OnContactAdded but when colliding with a CharacterVirtual
127
- virtual void OnCharacterContactAdded(const CharacterVirtual *inCharacter, const CharacterVirtual *inOtherCharacter, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, CharacterContactSettings &ioSettings) { /* Default do nothing */ }
128
-
129
- /// Same as OnContactPersisted but when colliding with a CharacterVirtual
130
- virtual void OnCharacterContactPersisted(const CharacterVirtual *inCharacter, const CharacterVirtual *inOtherCharacter, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, CharacterContactSettings &ioSettings) { /* Default do nothing */ }
131
-
132
- /// Same as OnContactRemoved but when colliding with a CharacterVirtual
133
- /// Note that inOtherCharacterID can be the ID of a character that has been deleted. This happens if the character was in contact with this character during the last update, but has been deleted since.
134
- virtual void OnCharacterContactRemoved(const CharacterVirtual *inCharacter, const CharacterID &inOtherCharacterID, const SubShapeID &inSubShapeID2) { /* Default do nothing */ }
135
-
136
- /// Called whenever a contact is being used by the solver. Allows the listener to override the resulting character velocity (e.g. by preventing sliding along certain surfaces).
137
- /// @param inCharacter Character that is being solved
138
- /// @param inBodyID2 Body ID of body that is being hit
139
- /// @param inSubShapeID2 Sub shape ID of shape that is being hit
140
- /// @param inContactPosition World space contact position
141
- /// @param inContactNormal World space contact normal
142
- /// @param inContactVelocity World space velocity of contact point (e.g. for a moving platform)
143
- /// @param inContactMaterial Material of contact point
144
- /// @param inCharacterVelocity World space velocity of the character prior to hitting this contact
145
- /// @param ioNewCharacterVelocity Contains the calculated world space velocity of the character after hitting this contact, this velocity slides along the surface of the contact. Can be modified by the listener to provide an alternative velocity.
146
- virtual void OnContactSolve(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, Vec3Arg inContactVelocity, const PhysicsMaterial *inContactMaterial, Vec3Arg inCharacterVelocity, Vec3 &ioNewCharacterVelocity) { /* Default do nothing */ }
147
-
148
- /// Same as OnContactSolve but when colliding with a CharacterVirtual
149
- virtual void OnCharacterContactSolve(const CharacterVirtual *inCharacter, const CharacterVirtual *inOtherCharacter, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, Vec3Arg inContactVelocity, const PhysicsMaterial *inContactMaterial, Vec3Arg inCharacterVelocity, Vec3 &ioNewCharacterVelocity) { /* Default do nothing */ }
150
- };
151
-
152
- /// Interface class that allows a CharacterVirtual to check collision with other CharacterVirtual instances.
153
- /// Since CharacterVirtual instances are not registered anywhere, it is up to the application to test collision against relevant characters.
154
- /// The characters could be stored in a tree structure to make this more efficient.
155
- class JPH_EXPORT CharacterVsCharacterCollision : public NonCopyable
156
- {
157
- public:
158
- virtual ~CharacterVsCharacterCollision() = default;
159
-
160
- /// Collide a character against other CharacterVirtuals.
161
- /// @param inCharacter The character to collide.
162
- /// @param inCenterOfMassTransform Center of mass transform for this character.
163
- /// @param inCollideShapeSettings Settings for the collision check.
164
- /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin
165
- /// @param ioCollector Collision collector that receives the collision results.
166
- virtual void CollideCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const = 0;
167
-
168
- /// Cast a character against other CharacterVirtuals.
169
- /// @param inCharacter The character to cast.
170
- /// @param inCenterOfMassTransform Center of mass transform for this character.
171
- /// @param inDirection Direction and length to cast in.
172
- /// @param inShapeCastSettings Settings for the shape cast.
173
- /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin
174
- /// @param ioCollector Collision collector that receives the collision results.
175
- virtual void CastCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const = 0;
176
- };
177
-
178
- /// Simple collision checker that loops over all registered characters.
179
- /// This is a brute force checking algorithm. If you have a lot of characters you may want to store your characters
180
- /// in a hierarchical structure to make this more efficient.
181
- /// Note that this is not thread safe, so make sure that only one CharacterVirtual is checking collision at a time.
182
- class JPH_EXPORT CharacterVsCharacterCollisionSimple : public CharacterVsCharacterCollision
183
- {
184
- public:
185
- /// Add a character to the list of characters to check collision against.
186
- void Add(CharacterVirtual *inCharacter) { mCharacters.push_back(inCharacter); }
187
-
188
- /// Remove a character from the list of characters to check collision against.
189
- void Remove(const CharacterVirtual *inCharacter);
190
-
191
- // See: CharacterVsCharacterCollision
192
- virtual void CollideCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const override;
193
- virtual void CastCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const override;
194
-
195
- Array<CharacterVirtual *> mCharacters; ///< The list of characters to check collision against
196
- };
197
-
198
- /// Runtime character object.
199
- /// This object usually represents the player. Contrary to the Character class it doesn't use a rigid body but moves doing collision checks only (hence the name virtual).
200
- /// The advantage of this is that you can determine when the character moves in the frame (usually this has to happen at a very particular point in the frame)
201
- /// but the downside is that other objects don't see this virtual character. To make a CharacterVirtual visible to the simulation, you can optionally create an inner
202
- /// rigid body through CharacterVirtualSettings::mInnerBodyShape. A CharacterVirtual is not tracked by the PhysicsSystem so you need to update it yourself. This also means
203
- /// that a call to PhysicsSystem::SaveState will not save its state, you need to call CharacterVirtual::SaveState yourself.
204
- class JPH_EXPORT CharacterVirtual : public CharacterBase
205
- {
206
- public:
207
- JPH_OVERRIDE_NEW_DELETE
208
-
209
- /// Constructor
210
- /// @param inSettings The settings for the character
211
- /// @param inPosition Initial position for the character
212
- /// @param inRotation Initial rotation for the character (usually only around the up-axis)
213
- /// @param inUserData Application specific value
214
- /// @param inSystem Physics system that this character will be added to
215
- CharacterVirtual(const CharacterVirtualSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, uint64 inUserData, PhysicsSystem *inSystem);
216
-
217
- /// Constructor without user data
218
- CharacterVirtual(const CharacterVirtualSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, PhysicsSystem *inSystem) : CharacterVirtual(inSettings, inPosition, inRotation, 0, inSystem) { }
219
-
220
- /// Destructor
221
- virtual ~CharacterVirtual() override;
222
-
223
- /// The ID of this character
224
- inline const CharacterID & GetID() const { return mID; }
225
-
226
- /// Set the contact listener
227
- void SetListener(CharacterContactListener *inListener) { mListener = inListener; }
228
-
229
- /// Get the current contact listener
230
- CharacterContactListener * GetListener() const { return mListener; }
231
-
232
- /// Set the character vs character collision interface
233
- void SetCharacterVsCharacterCollision(CharacterVsCharacterCollision *inCharacterVsCharacterCollision) { mCharacterVsCharacterCollision = inCharacterVsCharacterCollision; }
234
-
235
- /// Get the linear velocity of the character (m / s)
236
- Vec3 GetLinearVelocity() const { return mLinearVelocity; }
237
-
238
- /// Set the linear velocity of the character (m / s)
239
- void SetLinearVelocity(Vec3Arg inLinearVelocity) { mLinearVelocity = inLinearVelocity; }
240
-
241
- /// Get the position of the character
242
- RVec3 GetPosition() const { return mPosition; }
243
-
244
- /// Set the position of the character
245
- void SetPosition(RVec3Arg inPosition) { mPosition = inPosition; UpdateInnerBodyTransform(); }
246
-
247
- /// Get the rotation of the character
248
- Quat GetRotation() const { return mRotation; }
249
-
250
- /// Set the rotation of the character
251
- void SetRotation(QuatArg inRotation) { mRotation = inRotation; UpdateInnerBodyTransform(); }
252
-
253
- // Get the center of mass position of the shape
254
- inline RVec3 GetCenterOfMassPosition() const { return mPosition + (mRotation * (mShapeOffset + mShape->GetCenterOfMass()) + mCharacterPadding * mUp); }
255
-
256
- /// Calculate the world transform of the character
257
- RMat44 GetWorldTransform() const { return RMat44::sRotationTranslation(mRotation, mPosition); }
258
-
259
- /// Calculates the transform for this character's center of mass
260
- RMat44 GetCenterOfMassTransform() const { return GetCenterOfMassTransform(mPosition, mRotation, mShape); }
261
-
262
- /// Character mass (kg)
263
- float GetMass() const { return mMass; }
264
- void SetMass(float inMass) { mMass = inMass; }
265
-
266
- /// Maximum force with which the character can push other bodies (N)
267
- float GetMaxStrength() const { return mMaxStrength; }
268
- void SetMaxStrength(float inMaxStrength) { mMaxStrength = inMaxStrength; }
269
-
270
- /// This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in one update
271
- float GetPenetrationRecoverySpeed() const { return mPenetrationRecoverySpeed; }
272
- void SetPenetrationRecoverySpeed(float inSpeed) { mPenetrationRecoverySpeed = inSpeed; }
273
-
274
- /// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex edges.
275
- bool GetEnhancedInternalEdgeRemoval() const { return mEnhancedInternalEdgeRemoval; }
276
- void SetEnhancedInternalEdgeRemoval(bool inApply) { mEnhancedInternalEdgeRemoval = inApply; }
277
-
278
- /// Character padding
279
- float GetCharacterPadding() const { return mCharacterPadding; }
280
-
281
- /// Max num hits to collect in order to avoid excess of contact points collection
282
- uint GetMaxNumHits() const { return mMaxNumHits; }
283
- void SetMaxNumHits(uint inMaxHits) { mMaxNumHits = inMaxHits; }
284
-
285
- /// Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off.
286
- float GetHitReductionCosMaxAngle() const { return mHitReductionCosMaxAngle; }
287
- void SetHitReductionCosMaxAngle(float inCosMaxAngle) { mHitReductionCosMaxAngle = inCosMaxAngle; }
288
-
289
- /// Returns if we exceeded the maximum number of hits during the last collision check and had to discard hits based on distance.
290
- /// This can be used to find areas that have too complex geometry for the character to navigate properly.
291
- /// To solve you can either increase the max number of hits or simplify the geometry. Note that the character simulation will
292
- /// try to do its best to select the most relevant contacts to avoid the character from getting stuck.
293
- bool GetMaxHitsExceeded() const { return mMaxHitsExceeded; }
294
-
295
- /// An extra offset applied to the shape in local space. This allows applying an extra offset to the shape in local space. Note that setting it on the fly can cause the shape to teleport into collision.
296
- Vec3 GetShapeOffset() const { return mShapeOffset; }
297
- void SetShapeOffset(Vec3Arg inShapeOffset) { mShapeOffset = inShapeOffset; UpdateInnerBodyTransform(); }
298
-
299
- /// Access to the user data, can be used for anything by the application
300
- uint64 GetUserData() const { return mUserData; }
301
- void SetUserData(uint64 inUserData);
302
-
303
- /// Optional inner rigid body that proxies the character in the world. Can be used to update body properties.
304
- BodyID GetInnerBodyID() const { return mInnerBodyID; }
305
-
306
- /// This function can be called prior to calling Update() to convert a desired velocity into a velocity that won't make the character move further onto steep slopes.
307
- /// This velocity can then be set on the character using SetLinearVelocity()
308
- /// @param inDesiredVelocity Velocity to clamp against steep walls
309
- /// @return A new velocity vector that won't make the character move up steep slopes
310
- Vec3 CancelVelocityTowardsSteepSlopes(Vec3Arg inDesiredVelocity) const;
311
-
312
- /// This function is internally called by Update, WalkStairs, StickToFloor and ExtendedUpdate and is responsible for tracking if contacts are added, persisted or removed.
313
- /// If you want to do multiple operations on a character (e.g. first Update then WalkStairs), you can surround the code with a StartTrackingContactChanges and FinishTrackingContactChanges pair
314
- /// to only receive a single callback per contact on the CharacterContactListener. If you don't do this then you could for example receive a contact added callback during the Update and a
315
- /// contact persisted callback during WalkStairs.
316
- void StartTrackingContactChanges();
317
-
318
- /// This call triggers contact removal callbacks and is used in conjunction with StartTrackingContactChanges.
319
- void FinishTrackingContactChanges();
320
-
321
- /// This is the main update function. It moves the character according to its current velocity (the character is similar to a kinematic body in the sense
322
- /// that you set the velocity and the character will follow unless collision is blocking the way). Note it's your own responsibility to apply gravity to the character velocity!
323
- /// Different surface materials (like ice) can be emulated by getting the ground material and adjusting the velocity and/or the max slope angle accordingly every frame.
324
- /// @param inDeltaTime Time step to simulate.
325
- /// @param inGravity Gravity vector (m/s^2). This gravity vector is only used when the character is standing on top of another object to apply downward force.
326
- /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase.
327
- /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer.
328
- /// @param inBodyFilter Filter that is used to check if a character collides with a body.
329
- /// @param inShapeFilter Filter that is used to check if a character collides with a subshape.
330
- /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns.
331
- void Update(float inDeltaTime, Vec3Arg inGravity, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator);
332
-
333
- /// This function will return true if the character has moved into a slope that is too steep (e.g. a vertical wall).
334
- /// You would call WalkStairs to attempt to step up stairs.
335
- /// @param inLinearVelocity The linear velocity that the player desired. This is used to determine if we're pushing into a step.
336
- bool CanWalkStairs(Vec3Arg inLinearVelocity) const;
337
-
338
- /// When stair walking is needed, you can call the WalkStairs function to cast up, forward and down again to try to find a valid position
339
- /// @param inDeltaTime Time step to simulate.
340
- /// @param inStepUp The direction and distance to step up (this corresponds to the max step height)
341
- /// @param inStepForward The direction and distance to step forward after the step up
342
- /// @param inStepForwardTest When running at a high frequency, inStepForward can be very small and it's likely that you hit the side of the stairs on the way down. This could produce a normal that violates the max slope angle. If this happens, we test again using this distance from the up position to see if we find a valid slope.
343
- /// @param inStepDownExtra An additional translation that is added when stepping down at the end. Allows you to step further down than up. Set to zero if you don't want this. Should be in the opposite direction of up.
344
- /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase.
345
- /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer.
346
- /// @param inBodyFilter Filter that is used to check if a character collides with a body.
347
- /// @param inShapeFilter Filter that is used to check if a character collides with a subshape.
348
- /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns.
349
- /// @return true if the stair walk was successful
350
- bool WalkStairs(float inDeltaTime, Vec3Arg inStepUp, Vec3Arg inStepForward, Vec3Arg inStepForwardTest, Vec3Arg inStepDownExtra, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator);
351
-
352
- /// This function can be used to artificially keep the character to the floor. Normally when a character is on a small step and starts moving horizontally, the character will
353
- /// lose contact with the floor because the initial vertical velocity is zero while the horizontal velocity is quite high. To prevent the character from losing contact with the floor,
354
- /// we do an additional collision check downwards and if we find the floor within a certain distance, we project the character onto the floor.
355
- /// @param inStepDown Max amount to project the character downwards (if no floor is found within this distance, the function will return false)
356
- /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase.
357
- /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer.
358
- /// @param inBodyFilter Filter that is used to check if a character collides with a body.
359
- /// @param inShapeFilter Filter that is used to check if a character collides with a subshape.
360
- /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns.
361
- /// @return True if the character was successfully projected onto the floor.
362
- bool StickToFloor(Vec3Arg inStepDown, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator);
363
-
364
- /// Settings struct with settings for ExtendedUpdate
365
- struct ExtendedUpdateSettings
366
- {
367
- Vec3 mStickToFloorStepDown { 0, -0.5f, 0 }; ///< See StickToFloor inStepDown parameter. Can be zero to turn off.
368
- Vec3 mWalkStairsStepUp { 0, 0.4f, 0 }; ///< See WalkStairs inStepUp parameter. Can be zero to turn off.
369
- float mWalkStairsMinStepForward { 0.02f }; ///< See WalkStairs inStepForward parameter. Note that the parameter only indicates a magnitude, direction is taken from current velocity.
370
- float mWalkStairsStepForwardTest { 0.15f }; ///< See WalkStairs inStepForwardTest parameter. Note that the parameter only indicates a magnitude, direction is taken from current velocity.
371
- float mWalkStairsCosAngleForwardContact { Cos(DegreesToRadians(75.0f)) }; ///< Cos(angle) where angle is the maximum angle between the ground normal in the horizontal plane and the character forward vector where we're willing to adjust the step forward test towards the contact normal.
372
- Vec3 mWalkStairsStepDownExtra { Vec3::sZero() }; ///< See WalkStairs inStepDownExtra
373
- };
374
-
375
- /// This function combines Update, StickToFloor and WalkStairs. This function serves as an example of how these functions could be combined.
376
- /// Before calling, call SetLinearVelocity to update the horizontal/vertical speed of the character, typically this is:
377
- /// - When on OnGround and not moving away from ground: velocity = GetGroundVelocity() + horizontal speed as input by player + optional vertical jump velocity + delta time * gravity
378
- /// - Else: velocity = current vertical velocity + horizontal speed as input by player + delta time * gravity
379
- /// @param inDeltaTime Time step to simulate.
380
- /// @param inGravity Gravity vector (m/s^2). This gravity vector is only used when the character is standing on top of another object to apply downward force.
381
- /// @param inSettings A structure containing settings for the algorithm.
382
- /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase.
383
- /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer.
384
- /// @param inBodyFilter Filter that is used to check if a character collides with a body.
385
- /// @param inShapeFilter Filter that is used to check if a character collides with a subshape.
386
- /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns.
387
- void ExtendedUpdate(float inDeltaTime, Vec3Arg inGravity, const ExtendedUpdateSettings &inSettings, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator);
388
-
389
- /// This function can be used after a character has teleported to determine the new contacts with the world.
390
- void RefreshContacts(const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator);
391
-
392
- /// Use the ground body ID to get an updated estimate of the ground velocity. This function can be used if the ground body has moved / changed velocity and you want a new estimate of the ground velocity.
393
- /// It will not perform collision detection, so is less accurate than RefreshContacts but a lot faster.
394
- void UpdateGroundVelocity();
395
-
396
- /// Switch the shape of the character (e.g. for stance).
397
- /// @param inShape The shape to switch to.
398
- /// @param inMaxPenetrationDepth When inMaxPenetrationDepth is not FLT_MAX, it checks if the new shape collides before switching shape. This is the max penetration we're willing to accept after the switch.
399
- /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase.
400
- /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer.
401
- /// @param inBodyFilter Filter that is used to check if a character collides with a body.
402
- /// @param inShapeFilter Filter that is used to check if a character collides with a subshape.
403
- /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns.
404
- /// @return Returns true if the switch succeeded.
405
- bool SetShape(const Shape *inShape, float inMaxPenetrationDepth, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator);
406
-
407
- /// Updates the shape of the inner rigid body. Should be called after a successful call to SetShape.
408
- void SetInnerBodyShape(const Shape *inShape);
409
-
410
- /// Get the transformed shape that represents the volume of the character, can be used for collision checks.
411
- TransformedShape GetTransformedShape() const { return TransformedShape(GetCenterOfMassPosition(), mRotation, mShape, mInnerBodyID); }
412
-
413
- /// @brief Get all contacts for the character at a particular location.
414
- /// When colliding with another character virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a hit.
415
- /// @param inPosition Position to test, note that this position will be corrected for the character padding.
416
- /// @param inRotation Rotation at which to test the shape.
417
- /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal.
418
- /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly).
419
- /// @param inShape Shape to test collision with.
420
- /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin
421
- /// @param ioCollector Collision collector that receives the collision results.
422
- /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase.
423
- /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer.
424
- /// @param inBodyFilter Filter that is used to check if a character collides with a body.
425
- /// @param inShapeFilter Filter that is used to check if a character collides with a subshape.
426
- void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter) const;
427
-
428
- /// Get the character settings that can recreate this character
429
- CharacterVirtualSettings GetCharacterVirtualSettings() const;
430
-
431
- // Saving / restoring state for replay
432
- virtual void SaveState(StateRecorder &inStream) const override;
433
- virtual void RestoreState(StateRecorder &inStream) override;
434
-
435
- #ifdef JPH_DEBUG_RENDERER
436
- static inline bool sDrawConstraints = false; ///< Draw the current state of the constraints for iteration 0 when creating them
437
- static inline bool sDrawWalkStairs = false; ///< Draw the state of the walk stairs algorithm
438
- static inline bool sDrawStickToFloor = false; ///< Draw the state of the stick to floor algorithm
439
- #endif
440
-
441
- /// Uniquely identifies a contact between a character and another body or character
442
- class ContactKey
443
- {
444
- public:
445
- /// Constructor
446
- ContactKey() = default;
447
- ContactKey(const ContactKey &inContact) = default;
448
- ContactKey(const BodyID &inBodyB, const SubShapeID &inSubShapeID) : mBodyB(inBodyB), mSubShapeIDB(inSubShapeID) { }
449
- ContactKey(const CharacterID &inCharacterIDB, const SubShapeID &inSubShapeID) : mCharacterIDB(inCharacterIDB), mSubShapeIDB(inSubShapeID) { }
450
- ContactKey & operator = (const ContactKey &inContact) = default;
451
-
452
- /// Checks if two contacts refer to the same body (or virtual character)
453
- inline bool IsSameBody(const ContactKey &inOther) const { return mBodyB == inOther.mBodyB && mCharacterIDB == inOther.mCharacterIDB; }
454
-
455
- /// Equality operator
456
- bool operator == (const ContactKey &inRHS) const
457
- {
458
- return mBodyB == inRHS.mBodyB && mCharacterIDB == inRHS.mCharacterIDB && mSubShapeIDB == inRHS.mSubShapeIDB;
459
- }
460
-
461
- bool operator != (const ContactKey &inRHS) const
462
- {
463
- return !(*this == inRHS);
464
- }
465
-
466
- /// Hash of this structure
467
- uint64 GetHash() const
468
- {
469
- static_assert(sizeof(BodyID) + sizeof(CharacterID) + sizeof(SubShapeID) == sizeof(ContactKey), "No padding expected");
470
- return HashBytes(this, sizeof(ContactKey));
471
- }
472
-
473
- // Saving / restoring state for replay
474
- void SaveState(StateRecorder &inStream) const;
475
- void RestoreState(StateRecorder &inStream);
476
-
477
- BodyID mBodyB; ///< ID of body we're colliding with (if not invalid)
478
- CharacterID mCharacterIDB; ///< Character we're colliding with (if not invalid)
479
- SubShapeID mSubShapeIDB; ///< Sub shape ID of body or character we're colliding with
480
- };
481
-
482
- /// Encapsulates a collision contact
483
- struct Contact : public ContactKey
484
- {
485
- // Saving / restoring state for replay
486
- void SaveState(StateRecorder &inStream) const;
487
- void RestoreState(StateRecorder &inStream);
488
-
489
- RVec3 mPosition; ///< Position where the character makes contact
490
- Vec3 mLinearVelocity; ///< Velocity of the contact point
491
- Vec3 mContactNormal; ///< Contact normal, pointing towards the character
492
- Vec3 mSurfaceNormal; ///< Surface normal of the contact
493
- float mDistance; ///< Distance to the contact <= 0 means that it is an actual contact, > 0 means predictive
494
- float mFraction; ///< Fraction along the path where this contact takes place
495
- EMotionType mMotionTypeB; ///< Motion type of B, used to determine the priority of the contact
496
- bool mIsSensorB; ///< If B is a sensor
497
- const CharacterVirtual * mCharacterB = nullptr; ///< Character we're colliding with (if not nullptr). Note that this may be a dangling pointer when accessed through GetActiveContacts(), use mCharacterIDB instead.
498
- uint64 mUserData; ///< User data of B
499
- const PhysicsMaterial * mMaterial; ///< Material of B
500
- bool mHadCollision = false; ///< If the character actually collided with the contact (can be false if a predictive contact never becomes a real one)
501
- bool mWasDiscarded = false; ///< If the contact validate callback chose to discard this contact or when the body is a sensor
502
- bool mCanPushCharacter = true; ///< When true, the velocity of the contact point can push the character
503
- };
504
-
505
- using TempContactList = Array<Contact, STLTempAllocator<Contact>>;
506
- using ContactList = Array<Contact>;
507
-
508
- /// Access to the internal list of contacts that the character has found.
509
- /// Note that only contacts that have their mHadCollision flag set are actual contacts.
510
- const ContactList & GetActiveContacts() const { return mActiveContacts; }
511
-
512
- /// Check if the character is currently in contact with or has collided with another body in the last operation (e.g. Update or WalkStairs)
513
- bool HasCollidedWith(const BodyID &inBody) const
514
- {
515
- for (const CharacterVirtual::Contact &c : mActiveContacts)
516
- if (c.mHadCollision && c.mBodyB == inBody)
517
- return true;
518
- return false;
519
- }
520
-
521
- /// Check if the character is currently in contact with or has collided with another character in the last time step (e.g. Update or WalkStairs)
522
- bool HasCollidedWith(const CharacterID &inCharacterID) const
523
- {
524
- for (const CharacterVirtual::Contact &c : mActiveContacts)
525
- if (c.mHadCollision && c.mCharacterIDB == inCharacterID)
526
- return true;
527
- return false;
528
- }
529
-
530
- /// Check if the character is currently in contact with or has collided with another character in the last time step (e.g. Update or WalkStairs)
531
- bool HasCollidedWith(const CharacterVirtual *inCharacter) const
532
- {
533
- return HasCollidedWith(inCharacter->GetID());
534
- }
535
-
536
- private:
537
- // Sorting predicate for making contact order deterministic
538
- struct ContactOrderingPredicate
539
- {
540
- inline bool operator () (const Contact &inLHS, const Contact &inRHS) const
541
- {
542
- if (inLHS.mBodyB != inRHS.mBodyB)
543
- return inLHS.mBodyB < inRHS.mBodyB;
544
-
545
- if (inLHS.mCharacterIDB != inRHS.mCharacterIDB)
546
- return inLHS.mCharacterIDB < inRHS.mCharacterIDB;
547
-
548
- return inLHS.mSubShapeIDB.GetValue() < inRHS.mSubShapeIDB.GetValue();
549
- }
550
- };
551
-
552
- using IgnoredContactList = Array<ContactKey, STLTempAllocator<ContactKey>>;
553
-
554
- // A constraint that limits the movement of the character
555
- struct Constraint
556
- {
557
- Contact * mContact; ///< Contact that this constraint was generated from
558
- float mTOI; ///< Calculated time of impact (can be negative if penetrating)
559
- float mProjectedVelocity; ///< Velocity of the contact projected on the contact normal (negative if separating)
560
- Vec3 mLinearVelocity; ///< Velocity of the contact (can contain a corrective velocity to resolve penetration)
561
- Plane mPlane; ///< Plane around the origin that describes how far we can displace (from the origin)
562
- bool mIsSteepSlope = false; ///< If this constraint belongs to a steep slope
563
- };
564
-
565
- using ConstraintList = Array<Constraint, STLTempAllocator<Constraint>>;
566
-
567
- // Collision collector that collects hits for CollideShape
568
- class ContactCollector : public CollideShapeCollector
569
- {
570
- public:
571
- ContactCollector(PhysicsSystem *inSystem, const CharacterVirtual *inCharacter, uint inMaxHits, float inHitReductionCosMaxAngle, Vec3Arg inUp, RVec3Arg inBaseOffset, TempContactList &outContacts) : mBaseOffset(inBaseOffset), mUp(inUp), mSystem(inSystem), mCharacter(inCharacter), mContacts(outContacts), mMaxHits(inMaxHits), mHitReductionCosMaxAngle(inHitReductionCosMaxAngle) { }
572
-
573
- virtual void SetUserData(uint64 inUserData) override { mOtherCharacter = reinterpret_cast<CharacterVirtual *>(inUserData); }
574
-
575
- virtual void AddHit(const CollideShapeResult &inResult) override;
576
-
577
- RVec3 mBaseOffset;
578
- Vec3 mUp;
579
- PhysicsSystem * mSystem;
580
- const CharacterVirtual * mCharacter;
581
- CharacterVirtual * mOtherCharacter = nullptr;
582
- TempContactList & mContacts;
583
- uint mMaxHits;
584
- float mHitReductionCosMaxAngle;
585
- bool mMaxHitsExceeded = false;
586
- };
587
-
588
- // A collision collector that collects hits for CastShape
589
- class ContactCastCollector : public CastShapeCollector
590
- {
591
- public:
592
- ContactCastCollector(PhysicsSystem *inSystem, const CharacterVirtual *inCharacter, Vec3Arg inDisplacement, Vec3Arg inUp, const IgnoredContactList &inIgnoredContacts, RVec3Arg inBaseOffset, Contact &outContact) : mBaseOffset(inBaseOffset), mDisplacement(inDisplacement), mUp(inUp), mSystem(inSystem), mCharacter(inCharacter), mIgnoredContacts(inIgnoredContacts), mContact(outContact) { }
593
-
594
- virtual void SetUserData(uint64 inUserData) override { mOtherCharacter = reinterpret_cast<CharacterVirtual *>(inUserData); }
595
-
596
- virtual void AddHit(const ShapeCastResult &inResult) override;
597
-
598
- RVec3 mBaseOffset;
599
- Vec3 mDisplacement;
600
- Vec3 mUp;
601
- PhysicsSystem * mSystem;
602
- const CharacterVirtual * mCharacter;
603
- CharacterVirtual * mOtherCharacter = nullptr;
604
- const IgnoredContactList & mIgnoredContacts;
605
- Contact & mContact;
606
- };
607
-
608
- // Helper function to convert a Jolt collision result into a contact
609
- template <class taCollector>
610
- inline static void sFillContactProperties(const CharacterVirtual *inCharacter, Contact &outContact, const Body &inBody, Vec3Arg inUp, RVec3Arg inBaseOffset, const taCollector &inCollector, const CollideShapeResult &inResult);
611
- inline static void sFillCharacterContactProperties(Contact &outContact, const CharacterVirtual *inOtherCharacter, RVec3Arg inBaseOffset, const CollideShapeResult &inResult);
612
-
613
- // Move the shape from ioPosition and try to displace it by inVelocity * inDeltaTime, this will try to slide the shape along the world geometry
614
- void MoveShape(RVec3 &ioPosition, Vec3Arg inVelocity, float inDeltaTime, ContactList *outActiveContacts, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator
615
- #ifdef JPH_DEBUG_RENDERER
616
- , bool inDrawConstraints = false
617
- #endif // JPH_DEBUG_RENDERER
618
- );
619
-
620
- // Ask the callback if inContact is a valid contact point
621
- bool ValidateContact(const Contact &inContact) const;
622
-
623
- // Trigger the contact callback for inContact and get the contact settings
624
- void ContactAdded(const Contact &inContact, CharacterContactSettings &ioSettings);
625
-
626
- // Tests the shape for collision around inPosition
627
- void GetContactsAtPosition(RVec3Arg inPosition, Vec3Arg inMovementDirection, const Shape *inShape, TempContactList &outContacts, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter) const;
628
-
629
- // Remove penetrating contacts with the same body that have conflicting normals, leaving these will make the character mover get stuck
630
- void RemoveConflictingContacts(TempContactList &ioContacts, IgnoredContactList &outIgnoredContacts) const;
631
-
632
- // Convert contacts into constraints. The character is assumed to start at the origin and the constraints are planes around the origin that confine the movement of the character.
633
- void DetermineConstraints(TempContactList &inContacts, float inDeltaTime, ConstraintList &outConstraints) const;
634
-
635
- // Use the constraints to solve the displacement of the character. This will slide the character on the planes around the origin for as far as possible.
636
- void SolveConstraints(Vec3Arg inVelocity, float inDeltaTime, float inTimeRemaining, ConstraintList &ioConstraints, IgnoredContactList &ioIgnoredContacts, float &outTimeSimulated, Vec3 &outDisplacement, TempAllocator &inAllocator
637
- #ifdef JPH_DEBUG_RENDERER
638
- , bool inDrawConstraints = false
639
- #endif // JPH_DEBUG_RENDERER
640
- );
641
-
642
- // Get the velocity of a body adjusted by the contact listener
643
- void GetAdjustedBodyVelocity(const Body& inBody, Vec3 &outLinearVelocity, Vec3 &outAngularVelocity) const;
644
-
645
- // Calculate the ground velocity of the character assuming it's standing on an object with specified linear and angular velocity and with specified center of mass.
646
- // Note that we don't just take the point velocity because a point on an object with angular velocity traces an arc,
647
- // so if you just take point velocity * delta time you get an error that accumulates over time
648
- Vec3 CalculateCharacterGroundVelocity(RVec3Arg inCenterOfMass, Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity, float inDeltaTime) const;
649
-
650
- // Handle contact with physics object that we're colliding against
651
- bool HandleContact(Vec3Arg inVelocity, Constraint &ioConstraint, float inDeltaTime);
652
-
653
- // Does a swept test of the shape from inPosition with displacement inDisplacement, returns true if there was a collision
654
- bool GetFirstContactForSweep(RVec3Arg inPosition, Vec3Arg inDisplacement, Contact &outContact, const IgnoredContactList &inIgnoredContacts, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter) const;
655
-
656
- // Store contacts so that we have proper ground information
657
- void StoreActiveContacts(const TempContactList &inContacts, TempAllocator &inAllocator);
658
-
659
- // This function will determine which contacts are touching the character and will calculate the one that is supporting us
660
- void UpdateSupportingContact(bool inSkipContactVelocityCheck, TempAllocator &inAllocator);
661
-
662
- /// This function can be called after moving the character to a new colliding position
663
- void MoveToContact(RVec3Arg inPosition, const Contact &inContact, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator);
664
-
665
- // This function returns the actual center of mass of the shape, not corrected for the character padding
666
- inline RMat44 GetCenterOfMassTransform(RVec3Arg inPosition, QuatArg inRotation, const Shape *inShape) const
667
- {
668
- return RMat44::sRotationTranslation(inRotation, inPosition).PreTranslated(mShapeOffset + inShape->GetCenterOfMass()).PostTranslated(mCharacterPadding * mUp);
669
- }
670
-
671
- // This function returns the position of the inner rigid body
672
- inline RVec3 GetInnerBodyPosition() const
673
- {
674
- return mPosition + (mRotation * mShapeOffset + mCharacterPadding * mUp);
675
- }
676
-
677
- // Move the inner rigid body to the current position
678
- void UpdateInnerBodyTransform();
679
-
680
- // ID
681
- CharacterID mID;
682
-
683
- // Our main listener for contacts
684
- CharacterContactListener * mListener = nullptr;
685
-
686
- // Interface to detect collision between characters
687
- CharacterVsCharacterCollision * mCharacterVsCharacterCollision = nullptr;
688
-
689
- // Movement settings
690
- EBackFaceMode mBackFaceMode; // When colliding with back faces, the character will not be able to move through back facing triangles. Use this if you have triangles that need to collide on both sides.
691
- float mPredictiveContactDistance; // How far to scan outside of the shape for predictive contacts. A value of 0 will most likely cause the character to get stuck as it cannot properly calculate a sliding direction anymore. A value that's too high will cause ghost collisions.
692
- uint mMaxCollisionIterations; // Max amount of collision loops
693
- uint mMaxConstraintIterations; // How often to try stepping in the constraint solving
694
- float mMinTimeRemaining; // Early out condition: If this much time is left to simulate we are done
695
- float mCollisionTolerance; // How far we're willing to penetrate geometry
696
- float mCharacterPadding; // How far we try to stay away from the geometry, this ensures that the sweep will hit as little as possible lowering the collision cost and reducing the risk of getting stuck
697
- uint mMaxNumHits; // Max num hits to collect in order to avoid excess of contact points collection
698
- float mHitReductionCosMaxAngle; // Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off.
699
- float mPenetrationRecoverySpeed; // This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in one update
700
- bool mEnhancedInternalEdgeRemoval; // Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex edges.
701
-
702
- // Character mass (kg)
703
- float mMass;
704
-
705
- // Maximum force with which the character can push other bodies (N)
706
- float mMaxStrength;
707
-
708
- // An extra offset applied to the shape in local space. This allows applying an extra offset to the shape in local space.
709
- Vec3 mShapeOffset = Vec3::sZero();
710
-
711
- // Current position (of the base, not the center of mass)
712
- RVec3 mPosition = RVec3::sZero();
713
-
714
- // Current rotation (of the base, not of the center of mass)
715
- Quat mRotation = Quat::sIdentity();
716
-
717
- // Current linear velocity
718
- Vec3 mLinearVelocity = Vec3::sZero();
719
-
720
- // List of contacts that were active in the last frame
721
- ContactList mActiveContacts;
722
-
723
- // Remembers how often we called StartTrackingContactChanges
724
- int mTrackingContactChanges = 0;
725
-
726
- // View from a contact listener perspective on which contacts have been added/removed
727
- struct ListenerContactValue
728
- {
729
- ListenerContactValue() = default;
730
- explicit ListenerContactValue(const CharacterContactSettings &inSettings) : mSettings(inSettings) { }
731
-
732
- CharacterContactSettings mSettings;
733
- int mCount = 0;
734
- };
735
-
736
- using ListenerContacts = UnorderedMap<ContactKey, ListenerContactValue>;
737
- ListenerContacts mListenerContacts;
738
-
739
- // Remembers the delta time of the last update
740
- float mLastDeltaTime = 1.0f / 60.0f;
741
-
742
- // Remember if we exceeded the maximum number of hits and had to remove similar contacts
743
- mutable bool mMaxHitsExceeded = false;
744
-
745
- // User data, can be used for anything by the application
746
- uint64 mUserData = 0;
747
-
748
- // The inner rigid body that proxies the character in the world
749
- BodyID mInnerBodyID;
750
- };
751
-
752
- JPH_NAMESPACE_END