@bloomengine/engine 0.4.0 → 0.4.1

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 (493) hide show
  1. package/package.json +4 -11
  2. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/build.gradle +0 -51
  3. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/AndroidManifest.xml +0 -20
  4. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/cpp/CMakeLists.txt +0 -20
  5. package/native/third_party/JoltPhysics/Build/Android/UnitTests/build.gradle +0 -51
  6. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/AndroidManifest.xml +0 -20
  7. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/cpp/CMakeLists.txt +0 -20
  8. package/native/third_party/JoltPhysics/Build/Android/build.gradle +0 -17
  9. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.jar +0 -0
  10. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.properties +0 -5
  11. package/native/third_party/JoltPhysics/Build/Android/gradle.properties +0 -21
  12. package/native/third_party/JoltPhysics/Build/Android/gradlew +0 -185
  13. package/native/third_party/JoltPhysics/Build/Android/gradlew.bat +0 -89
  14. package/native/third_party/JoltPhysics/Build/Android/settings.gradle +0 -10
  15. package/native/third_party/JoltPhysics/Build/CMakeLists.txt +0 -449
  16. package/native/third_party/JoltPhysics/Build/README.md +0 -250
  17. package/native/third_party/JoltPhysics/Build/cmake_linux_clang_gcc.sh +0 -28
  18. package/native/third_party/JoltPhysics/Build/cmake_linux_emscripten.sh +0 -19
  19. package/native/third_party/JoltPhysics/Build/cmake_linux_mingw.sh +0 -19
  20. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl.bat +0 -3
  21. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_32bit.bat +0 -3
  22. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm.bat +0 -3
  23. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm_32bit.bat +0 -4
  24. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_cross_platform_deterministic.bat +0 -3
  25. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_double.bat +0 -3
  26. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_no_object_stream.bat +0 -3
  27. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang.bat +0 -10
  28. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_cross_platform_deterministic.bat +0 -10
  29. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_double.bat +0 -10
  30. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp.bat +0 -5
  31. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp_arm.bat +0 -5
  32. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl.bat +0 -3
  33. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_cross_platform_deterministic.bat +0 -3
  34. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_double.bat +0 -3
  35. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang.bat +0 -10
  36. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_cross_platform_deterministic.bat +0 -10
  37. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_double.bat +0 -10
  38. package/native/third_party/JoltPhysics/Build/cmake_windows_mingw.sh +0 -19
  39. package/native/third_party/JoltPhysics/Build/cmake_xcode_ios.sh +0 -4
  40. package/native/third_party/JoltPhysics/Build/cmake_xcode_macos.sh +0 -4
  41. package/native/third_party/JoltPhysics/Build/iOS/JoltViewerInfo.plist +0 -34
  42. package/native/third_party/JoltPhysics/Build/iOS/SamplesInfo.plist +0 -34
  43. package/native/third_party/JoltPhysics/Build/iOS/UnitTestsInfo.plist +0 -34
  44. package/native/third_party/JoltPhysics/Build/macOS/icon.icns +0 -0
  45. package/native/third_party/JoltPhysics/Build/macos_install_vulkan_sdk.sh +0 -13
  46. package/native/third_party/JoltPhysics/Build/ubuntu24_install_vulkan_sdk.sh +0 -4
  47. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.cpp +0 -242
  48. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.h +0 -121
  49. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeToBuffer.h +0 -296
  50. package/native/third_party/JoltPhysics/Jolt/AABBTree/NodeCodec/NodeCodecQuadTreeHalfFloat.h +0 -323
  51. package/native/third_party/JoltPhysics/Jolt/AABBTree/TriangleCodec/TriangleCodecIndexed8BitPackSOA4Flags.h +0 -555
  52. package/native/third_party/JoltPhysics/Jolt/ConfigurationString.h +0 -112
  53. package/native/third_party/JoltPhysics/Jolt/Core/ARMNeon.h +0 -94
  54. package/native/third_party/JoltPhysics/Jolt/Core/Array.h +0 -713
  55. package/native/third_party/JoltPhysics/Jolt/Core/Atomics.h +0 -44
  56. package/native/third_party/JoltPhysics/Jolt/Core/BinaryHeap.h +0 -96
  57. package/native/third_party/JoltPhysics/Jolt/Core/ByteBuffer.h +0 -74
  58. package/native/third_party/JoltPhysics/Jolt/Core/Color.cpp +0 -38
  59. package/native/third_party/JoltPhysics/Jolt/Core/Color.h +0 -98
  60. package/native/third_party/JoltPhysics/Jolt/Core/Core.h +0 -652
  61. package/native/third_party/JoltPhysics/Jolt/Core/FPControlWord.h +0 -143
  62. package/native/third_party/JoltPhysics/Jolt/Core/FPException.h +0 -96
  63. package/native/third_party/JoltPhysics/Jolt/Core/FPFlushDenormals.h +0 -43
  64. package/native/third_party/JoltPhysics/Jolt/Core/Factory.cpp +0 -92
  65. package/native/third_party/JoltPhysics/Jolt/Core/Factory.h +0 -54
  66. package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.h +0 -122
  67. package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl +0 -215
  68. package/native/third_party/JoltPhysics/Jolt/Core/HashCombine.h +0 -234
  69. package/native/third_party/JoltPhysics/Jolt/Core/HashTable.h +0 -876
  70. package/native/third_party/JoltPhysics/Jolt/Core/InsertionSort.h +0 -58
  71. package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.cpp +0 -27
  72. package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.h +0 -38
  73. package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.h +0 -311
  74. package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.inl +0 -56
  75. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.cpp +0 -65
  76. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.h +0 -62
  77. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp +0 -364
  78. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.h +0 -101
  79. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.cpp +0 -230
  80. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.h +0 -85
  81. package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.cpp +0 -51
  82. package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.h +0 -67
  83. package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.h +0 -182
  84. package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.inl +0 -351
  85. package/native/third_party/JoltPhysics/Jolt/Core/Memory.cpp +0 -85
  86. package/native/third_party/JoltPhysics/Jolt/Core/Memory.h +0 -85
  87. package/native/third_party/JoltPhysics/Jolt/Core/Mutex.h +0 -223
  88. package/native/third_party/JoltPhysics/Jolt/Core/MutexArray.h +0 -98
  89. package/native/third_party/JoltPhysics/Jolt/Core/NonCopyable.h +0 -18
  90. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.cpp +0 -677
  91. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.h +0 -301
  92. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.inl +0 -90
  93. package/native/third_party/JoltPhysics/Jolt/Core/QuickSort.h +0 -137
  94. package/native/third_party/JoltPhysics/Jolt/Core/RTTI.cpp +0 -149
  95. package/native/third_party/JoltPhysics/Jolt/Core/RTTI.h +0 -436
  96. package/native/third_party/JoltPhysics/Jolt/Core/Reference.h +0 -244
  97. package/native/third_party/JoltPhysics/Jolt/Core/Result.h +0 -174
  98. package/native/third_party/JoltPhysics/Jolt/Core/STLAlignedAllocator.h +0 -72
  99. package/native/third_party/JoltPhysics/Jolt/Core/STLAllocator.h +0 -127
  100. package/native/third_party/JoltPhysics/Jolt/Core/STLLocalAllocator.h +0 -170
  101. package/native/third_party/JoltPhysics/Jolt/Core/STLTempAllocator.h +0 -80
  102. package/native/third_party/JoltPhysics/Jolt/Core/ScopeExit.h +0 -49
  103. package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.cpp +0 -135
  104. package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.h +0 -68
  105. package/native/third_party/JoltPhysics/Jolt/Core/StaticArray.h +0 -329
  106. package/native/third_party/JoltPhysics/Jolt/Core/StreamIn.h +0 -120
  107. package/native/third_party/JoltPhysics/Jolt/Core/StreamOut.h +0 -97
  108. package/native/third_party/JoltPhysics/Jolt/Core/StreamUtils.h +0 -168
  109. package/native/third_party/JoltPhysics/Jolt/Core/StreamWrapper.h +0 -53
  110. package/native/third_party/JoltPhysics/Jolt/Core/StridedPtr.h +0 -63
  111. package/native/third_party/JoltPhysics/Jolt/Core/StringTools.cpp +0 -101
  112. package/native/third_party/JoltPhysics/Jolt/Core/StringTools.h +0 -38
  113. package/native/third_party/JoltPhysics/Jolt/Core/TempAllocator.h +0 -209
  114. package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.cpp +0 -37
  115. package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.h +0 -58
  116. package/native/third_party/JoltPhysics/Jolt/Core/UnorderedMap.h +0 -80
  117. package/native/third_party/JoltPhysics/Jolt/Core/UnorderedSet.h +0 -32
  118. package/native/third_party/JoltPhysics/Jolt/Geometry/AABox.h +0 -313
  119. package/native/third_party/JoltPhysics/Jolt/Geometry/AABox4.h +0 -224
  120. package/native/third_party/JoltPhysics/Jolt/Geometry/ClipPoly.h +0 -200
  121. package/native/third_party/JoltPhysics/Jolt/Geometry/ClosestPoint.h +0 -498
  122. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.cpp +0 -1467
  123. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.h +0 -276
  124. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.cpp +0 -335
  125. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.h +0 -105
  126. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexSupport.h +0 -188
  127. package/native/third_party/JoltPhysics/Jolt/Geometry/EPAConvexHullBuilder.h +0 -845
  128. package/native/third_party/JoltPhysics/Jolt/Geometry/EPAPenetrationDepth.h +0 -557
  129. package/native/third_party/JoltPhysics/Jolt/Geometry/Ellipse.h +0 -77
  130. package/native/third_party/JoltPhysics/Jolt/Geometry/GJKClosestPoint.h +0 -945
  131. package/native/third_party/JoltPhysics/Jolt/Geometry/IndexedTriangle.h +0 -130
  132. package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.cpp +0 -222
  133. package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.h +0 -19
  134. package/native/third_party/JoltPhysics/Jolt/Geometry/MortonCode.h +0 -40
  135. package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.cpp +0 -178
  136. package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.h +0 -39
  137. package/native/third_party/JoltPhysics/Jolt/Geometry/Plane.h +0 -104
  138. package/native/third_party/JoltPhysics/Jolt/Geometry/RayAABox.h +0 -241
  139. package/native/third_party/JoltPhysics/Jolt/Geometry/RayCapsule.h +0 -37
  140. package/native/third_party/JoltPhysics/Jolt/Geometry/RayCylinder.h +0 -101
  141. package/native/third_party/JoltPhysics/Jolt/Geometry/RaySphere.h +0 -96
  142. package/native/third_party/JoltPhysics/Jolt/Geometry/RayTriangle.h +0 -158
  143. package/native/third_party/JoltPhysics/Jolt/Geometry/Sphere.h +0 -72
  144. package/native/third_party/JoltPhysics/Jolt/Geometry/Triangle.h +0 -34
  145. package/native/third_party/JoltPhysics/Jolt/Jolt.cmake +0 -703
  146. package/native/third_party/JoltPhysics/Jolt/Jolt.h +0 -16
  147. package/native/third_party/JoltPhysics/Jolt/Jolt.natvis +0 -116
  148. package/native/third_party/JoltPhysics/Jolt/Math/BVec16.h +0 -99
  149. package/native/third_party/JoltPhysics/Jolt/Math/BVec16.inl +0 -177
  150. package/native/third_party/JoltPhysics/Jolt/Math/DMat44.h +0 -158
  151. package/native/third_party/JoltPhysics/Jolt/Math/DMat44.inl +0 -310
  152. package/native/third_party/JoltPhysics/Jolt/Math/DVec3.h +0 -291
  153. package/native/third_party/JoltPhysics/Jolt/Math/DVec3.inl +0 -941
  154. package/native/third_party/JoltPhysics/Jolt/Math/Double3.h +0 -48
  155. package/native/third_party/JoltPhysics/Jolt/Math/DynMatrix.h +0 -31
  156. package/native/third_party/JoltPhysics/Jolt/Math/EigenValueSymmetric.h +0 -177
  157. package/native/third_party/JoltPhysics/Jolt/Math/FindRoot.h +0 -42
  158. package/native/third_party/JoltPhysics/Jolt/Math/Float2.h +0 -36
  159. package/native/third_party/JoltPhysics/Jolt/Math/Float3.h +0 -50
  160. package/native/third_party/JoltPhysics/Jolt/Math/Float4.h +0 -44
  161. package/native/third_party/JoltPhysics/Jolt/Math/GaussianElimination.h +0 -102
  162. package/native/third_party/JoltPhysics/Jolt/Math/HalfFloat.h +0 -208
  163. package/native/third_party/JoltPhysics/Jolt/Math/Mat44.h +0 -243
  164. package/native/third_party/JoltPhysics/Jolt/Math/Mat44.inl +0 -952
  165. package/native/third_party/JoltPhysics/Jolt/Math/Math.h +0 -208
  166. package/native/third_party/JoltPhysics/Jolt/Math/MathTypes.h +0 -32
  167. package/native/third_party/JoltPhysics/Jolt/Math/Matrix.h +0 -259
  168. package/native/third_party/JoltPhysics/Jolt/Math/Quat.h +0 -268
  169. package/native/third_party/JoltPhysics/Jolt/Math/Quat.inl +0 -406
  170. package/native/third_party/JoltPhysics/Jolt/Math/Real.h +0 -44
  171. package/native/third_party/JoltPhysics/Jolt/Math/Swizzle.h +0 -19
  172. package/native/third_party/JoltPhysics/Jolt/Math/Trigonometry.h +0 -79
  173. package/native/third_party/JoltPhysics/Jolt/Math/UVec4.h +0 -232
  174. package/native/third_party/JoltPhysics/Jolt/Math/UVec4.inl +0 -636
  175. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.cpp +0 -71
  176. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.h +0 -308
  177. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.inl +0 -942
  178. package/native/third_party/JoltPhysics/Jolt/Math/Vec4.h +0 -320
  179. package/native/third_party/JoltPhysics/Jolt/Math/Vec4.inl +0 -1152
  180. package/native/third_party/JoltPhysics/Jolt/Math/Vector.h +0 -211
  181. package/native/third_party/JoltPhysics/Jolt/ObjectStream/GetPrimitiveTypeOfType.h +0 -54
  182. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.cpp +0 -38
  183. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.h +0 -337
  184. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.cpp +0 -252
  185. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.h +0 -57
  186. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.cpp +0 -165
  187. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.h +0 -57
  188. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.cpp +0 -635
  189. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.h +0 -148
  190. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.cpp +0 -166
  191. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.h +0 -101
  192. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.cpp +0 -418
  193. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.h +0 -55
  194. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.cpp +0 -255
  195. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.h +0 -62
  196. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTypes.h +0 -26
  197. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttribute.h +0 -111
  198. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeEnum.h +0 -67
  199. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeTyped.h +0 -60
  200. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.cpp +0 -15
  201. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.h +0 -170
  202. package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.cpp +0 -70
  203. package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.h +0 -45
  204. package/native/third_party/JoltPhysics/Jolt/Physics/Body/AllowedDOFs.h +0 -68
  205. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.cpp +0 -426
  206. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.h +0 -452
  207. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.inl +0 -197
  208. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyAccess.h +0 -68
  209. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyActivationListener.h +0 -28
  210. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.cpp +0 -234
  211. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.h +0 -124
  212. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyFilter.h +0 -130
  213. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyID.h +0 -101
  214. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.cpp +0 -1099
  215. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.h +0 -324
  216. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLock.h +0 -111
  217. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockInterface.h +0 -134
  218. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockMulti.h +0 -120
  219. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.cpp +0 -1220
  220. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.h +0 -403
  221. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyPair.h +0 -36
  222. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyType.h +0 -19
  223. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.cpp +0 -185
  224. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.h +0 -58
  225. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.cpp +0 -92
  226. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.h +0 -308
  227. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.inl +0 -178
  228. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionQuality.h +0 -31
  229. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionType.h +0 -17
  230. package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.cpp +0 -354
  231. package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.h +0 -159
  232. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.cpp +0 -59
  233. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.h +0 -157
  234. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterID.h +0 -98
  235. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.cpp +0 -1933
  236. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.h +0 -752
  237. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/AABoxCast.h +0 -20
  238. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdgeMode.h +0 -17
  239. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdges.h +0 -114
  240. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BackFaceMode.h +0 -16
  241. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.cpp +0 -16
  242. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.h +0 -109
  243. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.cpp +0 -313
  244. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h +0 -38
  245. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h +0 -148
  246. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h +0 -92
  247. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceTable.h +0 -64
  248. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.cpp +0 -629
  249. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h +0 -108
  250. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h +0 -56
  251. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterMask.h +0 -35
  252. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterTable.h +0 -66
  253. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.cpp +0 -1768
  254. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.h +0 -389
  255. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.cpp +0 -107
  256. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.h +0 -46
  257. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastResult.h +0 -37
  258. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.cpp +0 -223
  259. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.h +0 -49
  260. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollectFacesMode.h +0 -16
  261. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.cpp +0 -155
  262. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.h +0 -56
  263. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollidePointResult.h +0 -25
  264. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShape.h +0 -106
  265. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShapeVsShapePerLeaf.h +0 -94
  266. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h +0 -110
  267. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVerticesVsTriangles.h +0 -102
  268. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.cpp +0 -121
  269. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.h +0 -50
  270. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollector.h +0 -109
  271. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollectorImpl.h +0 -219
  272. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.cpp +0 -107
  273. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.h +0 -97
  274. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.cpp +0 -35
  275. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.h +0 -97
  276. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ContactListener.h +0 -143
  277. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.cpp +0 -213
  278. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.h +0 -48
  279. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.cpp +0 -32
  280. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.h +0 -46
  281. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.cpp +0 -38
  282. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.h +0 -130
  283. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/InternalEdgeRemovingCollector.h +0 -279
  284. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.cpp +0 -271
  285. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.h +0 -44
  286. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.cpp +0 -448
  287. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.h +0 -77
  288. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.cpp +0 -62
  289. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.h +0 -110
  290. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayer.h +0 -111
  291. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterMask.h +0 -52
  292. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterTable.h +0 -78
  293. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.cpp +0 -35
  294. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.h +0 -57
  295. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.cpp +0 -38
  296. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.h +0 -37
  297. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/RayCast.h +0 -87
  298. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.cpp +0 -318
  299. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.h +0 -115
  300. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.cpp +0 -438
  301. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.h +0 -129
  302. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.cpp +0 -433
  303. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.h +0 -354
  304. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShapeVisitors.h +0 -461
  305. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.cpp +0 -1311
  306. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.h +0 -202
  307. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.cpp +0 -566
  308. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.h +0 -150
  309. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.cpp +0 -418
  310. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.h +0 -126
  311. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.cpp +0 -87
  312. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.h +0 -80
  313. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.cpp +0 -64
  314. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.h +0 -75
  315. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/GetTrianglesContext.h +0 -248
  316. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.cpp +0 -2754
  317. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.h +0 -380
  318. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.cpp +0 -1305
  319. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.h +0 -228
  320. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.cpp +0 -596
  321. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.h +0 -176
  322. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.cpp +0 -217
  323. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h +0 -140
  324. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.cpp +0 -541
  325. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.h +0 -147
  326. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h +0 -319
  327. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.cpp +0 -333
  328. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h +0 -161
  329. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaleHelpers.h +0 -83
  330. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.cpp +0 -238
  331. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.h +0 -145
  332. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.cpp +0 -325
  333. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.h +0 -466
  334. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.cpp +0 -347
  335. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.h +0 -125
  336. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.cpp +0 -674
  337. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.h +0 -139
  338. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeID.h +0 -138
  339. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeIDPair.h +0 -65
  340. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.cpp +0 -453
  341. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.gliffy +0 -1
  342. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h +0 -135
  343. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.cpp +0 -691
  344. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.h +0 -132
  345. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.cpp +0 -430
  346. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.h +0 -143
  347. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeCast.h +0 -173
  348. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeFilter.h +0 -73
  349. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilter.h +0 -40
  350. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilterWrapper.h +0 -58
  351. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SortReverseAndStore.h +0 -48
  352. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.cpp +0 -180
  353. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.h +0 -194
  354. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/CalculateSolverSteps.h +0 -70
  355. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.cpp +0 -246
  356. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.h +0 -133
  357. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.cpp +0 -73
  358. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.h +0 -243
  359. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.cpp +0 -289
  360. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.h +0 -100
  361. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h +0 -257
  362. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h +0 -682
  363. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h +0 -276
  364. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h +0 -195
  365. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h +0 -222
  366. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h +0 -246
  367. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h +0 -239
  368. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h +0 -196
  369. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h +0 -283
  370. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h +0 -246
  371. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SpringPart.h +0 -169
  372. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h +0 -597
  373. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.cpp +0 -1804
  374. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.h +0 -524
  375. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.cpp +0 -266
  376. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.h +0 -120
  377. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.cpp +0 -215
  378. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.h +0 -96
  379. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.cpp +0 -188
  380. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.h +0 -116
  381. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.cpp +0 -443
  382. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.h +0 -205
  383. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.cpp +0 -43
  384. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.h +0 -66
  385. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.cpp +0 -458
  386. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.h +0 -191
  387. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.cpp +0 -85
  388. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.h +0 -76
  389. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.cpp +0 -308
  390. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.h +0 -54
  391. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.cpp +0 -157
  392. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.h +0 -94
  393. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.cpp +0 -253
  394. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.h +0 -137
  395. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.cpp +0 -189
  396. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.h +0 -118
  397. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.cpp +0 -900
  398. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.h +0 -289
  399. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.cpp +0 -501
  400. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.h +0 -198
  401. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.cpp +0 -35
  402. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.h +0 -70
  403. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.cpp +0 -524
  404. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.h +0 -197
  405. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.cpp +0 -56
  406. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.h +0 -65
  407. package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.cpp +0 -17
  408. package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.h +0 -159
  409. package/native/third_party/JoltPhysics/Jolt/Physics/EActivation.h +0 -16
  410. package/native/third_party/JoltPhysics/Jolt/Physics/EPhysicsUpdateError.h +0 -37
  411. package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.cpp +0 -492
  412. package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.h +0 -144
  413. package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.cpp +0 -582
  414. package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.h +0 -187
  415. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsLock.h +0 -169
  416. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.cpp +0 -261
  417. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.h +0 -104
  418. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSettings.h +0 -125
  419. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsStepListener.h +0 -37
  420. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.cpp +0 -2915
  421. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.h +0 -391
  422. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.cpp +0 -25
  423. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.h +0 -176
  424. package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.cpp +0 -744
  425. package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.h +0 -245
  426. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyContactListener.h +0 -55
  427. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.cpp +0 -128
  428. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.h +0 -75
  429. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyManifold.h +0 -74
  430. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp +0 -1501
  431. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.h +0 -333
  432. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.cpp +0 -354
  433. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.h +0 -73
  434. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.cpp +0 -1487
  435. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.h +0 -390
  436. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyUpdateContext.h +0 -63
  437. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyVertex.h +0 -36
  438. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorder.h +0 -136
  439. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.cpp +0 -90
  440. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.h +0 -50
  441. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.cpp +0 -306
  442. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.h +0 -119
  443. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.cpp +0 -547
  444. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.h +0 -169
  445. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.cpp +0 -33
  446. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.h +0 -33
  447. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.cpp +0 -376
  448. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.h +0 -146
  449. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.cpp +0 -703
  450. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.h +0 -252
  451. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.cpp +0 -17
  452. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.h +0 -87
  453. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.cpp +0 -81
  454. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.h +0 -39
  455. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.cpp +0 -122
  456. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.h +0 -93
  457. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.cpp +0 -52
  458. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.h +0 -56
  459. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.cpp +0 -159
  460. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.h +0 -87
  461. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.cpp +0 -93
  462. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.h +0 -148
  463. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.cpp +0 -866
  464. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.h +0 -205
  465. package/native/third_party/JoltPhysics/Jolt/RegisterTypes.cpp +0 -204
  466. package/native/third_party/JoltPhysics/Jolt/RegisterTypes.h +0 -29
  467. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.cpp +0 -1107
  468. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.h +0 -383
  469. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.cpp +0 -168
  470. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.h +0 -48
  471. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.cpp +0 -158
  472. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.h +0 -130
  473. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.cpp +0 -80
  474. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.h +0 -88
  475. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.cpp +0 -165
  476. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.h +0 -91
  477. package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.cpp +0 -82
  478. package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.h +0 -72
  479. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.cpp +0 -237
  480. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.h +0 -145
  481. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.cpp +0 -87
  482. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.h +0 -82
  483. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.cpp +0 -73
  484. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.h +0 -84
  485. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.cpp +0 -139
  486. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.h +0 -52
  487. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.cpp +0 -43
  488. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.h +0 -28
  489. package/native/third_party/JoltPhysics/LICENSE +0 -7
  490. package/native/third_party/JoltPhysics/README.md +0 -173
  491. package/native/third_party/bloom_jolt/CMakeLists.txt +0 -87
  492. package/native/third_party/bloom_jolt/include/bloom_jolt.h +0 -519
  493. package/native/third_party/bloom_jolt/src/bloom_jolt.cpp +0 -1780
@@ -1,1152 +0,0 @@
1
- // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2
- // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3
- // SPDX-License-Identifier: MIT
4
-
5
- #include <Jolt/Math/Trigonometry.h>
6
- #include <Jolt/Math/Vec3.h>
7
- #include <Jolt/Math/UVec4.h>
8
-
9
- JPH_NAMESPACE_BEGIN
10
-
11
- // Constructor
12
- Vec4::Vec4(Vec3Arg inRHS) :
13
- mValue(inRHS.mValue)
14
- {
15
- }
16
-
17
- Vec4::Vec4(Vec3Arg inRHS, float inW)
18
- {
19
- #if defined(JPH_USE_SSE4_1)
20
- mValue = _mm_blend_ps(inRHS.mValue, _mm_set1_ps(inW), 8);
21
- #elif defined(JPH_USE_NEON)
22
- mValue = vsetq_lane_f32(inW, inRHS.mValue, 3);
23
- #else
24
- for (int i = 0; i < 3; i++)
25
- mF32[i] = inRHS.mF32[i];
26
- mF32[3] = inW;
27
- #endif
28
- }
29
-
30
- Vec4::Vec4(float inX, float inY, float inZ, float inW)
31
- {
32
- #if defined(JPH_USE_SSE)
33
- mValue = _mm_set_ps(inW, inZ, inY, inX);
34
- #elif defined(JPH_USE_NEON)
35
- uint32x2_t xy = vcreate_u32(static_cast<uint64>(BitCast<uint32>(inX)) | (static_cast<uint64>(BitCast<uint32>(inY)) << 32));
36
- uint32x2_t zw = vcreate_u32(static_cast<uint64>(BitCast<uint32>(inZ)) | (static_cast<uint64>(BitCast<uint32>(inW)) << 32));
37
- mValue = vreinterpretq_f32_u32(vcombine_u32(xy, zw));
38
- #else
39
- mF32[0] = inX;
40
- mF32[1] = inY;
41
- mF32[2] = inZ;
42
- mF32[3] = inW;
43
- #endif
44
- }
45
-
46
- template<uint32 SwizzleX, uint32 SwizzleY, uint32 SwizzleZ, uint32 SwizzleW>
47
- Vec4 Vec4::Swizzle() const
48
- {
49
- static_assert(SwizzleX <= 3, "SwizzleX template parameter out of range");
50
- static_assert(SwizzleY <= 3, "SwizzleY template parameter out of range");
51
- static_assert(SwizzleZ <= 3, "SwizzleZ template parameter out of range");
52
- static_assert(SwizzleW <= 3, "SwizzleW template parameter out of range");
53
-
54
- #if defined(JPH_USE_SSE)
55
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(SwizzleW, SwizzleZ, SwizzleY, SwizzleX));
56
- #elif defined(JPH_USE_NEON)
57
- return JPH_NEON_SHUFFLE_F32x4(mValue, mValue, SwizzleX, SwizzleY, SwizzleZ, SwizzleW);
58
- #else
59
- return Vec4(mF32[SwizzleX], mF32[SwizzleY], mF32[SwizzleZ], mF32[SwizzleW]);
60
- #endif
61
- }
62
-
63
- Vec4 Vec4::sZero()
64
- {
65
- #if defined(JPH_USE_SSE)
66
- return _mm_setzero_ps();
67
- #elif defined(JPH_USE_NEON)
68
- return vdupq_n_f32(0);
69
- #else
70
- return Vec4(0, 0, 0, 0);
71
- #endif
72
- }
73
-
74
- Vec4 Vec4::sReplicate(float inV)
75
- {
76
- #if defined(JPH_USE_SSE)
77
- return _mm_set1_ps(inV);
78
- #elif defined(JPH_USE_NEON)
79
- return vdupq_n_f32(inV);
80
- #else
81
- return Vec4(inV, inV, inV, inV);
82
- #endif
83
- }
84
-
85
- Vec4 Vec4::sOne()
86
- {
87
- return sReplicate(1.0f);
88
- }
89
-
90
- Vec4 Vec4::sNaN()
91
- {
92
- return sReplicate(numeric_limits<float>::quiet_NaN());
93
- }
94
-
95
- Vec4 Vec4::sLoadFloat4(const Float4 *inV)
96
- {
97
- #if defined(JPH_USE_SSE)
98
- return _mm_loadu_ps(&inV->x);
99
- #elif defined(JPH_USE_NEON)
100
- return vld1q_f32(&inV->x);
101
- #else
102
- return Vec4(inV->x, inV->y, inV->z, inV->w);
103
- #endif
104
- }
105
-
106
- Vec4 Vec4::sLoadFloat4Aligned(const Float4 *inV)
107
- {
108
- #if defined(JPH_USE_SSE)
109
- return _mm_load_ps(&inV->x);
110
- #elif defined(JPH_USE_NEON)
111
- return vld1q_f32(&inV->x);
112
- #else
113
- return Vec4(inV->x, inV->y, inV->z, inV->w);
114
- #endif
115
- }
116
-
117
- template <const int Scale>
118
- Vec4 Vec4::sGatherFloat4(const float *inBase, UVec4Arg inOffsets)
119
- {
120
- #if defined(JPH_USE_SSE)
121
- #ifdef JPH_USE_AVX2
122
- return _mm_i32gather_ps(inBase, inOffsets.mValue, Scale);
123
- #else
124
- const uint8 *base = reinterpret_cast<const uint8 *>(inBase);
125
- Type x = _mm_load_ss(reinterpret_cast<const float *>(base + inOffsets.GetX() * Scale));
126
- Type y = _mm_load_ss(reinterpret_cast<const float *>(base + inOffsets.GetY() * Scale));
127
- Type xy = _mm_unpacklo_ps(x, y);
128
- Type z = _mm_load_ss(reinterpret_cast<const float *>(base + inOffsets.GetZ() * Scale));
129
- Type w = _mm_load_ss(reinterpret_cast<const float *>(base + inOffsets.GetW() * Scale));
130
- Type zw = _mm_unpacklo_ps(z, w);
131
- return _mm_movelh_ps(xy, zw);
132
- #endif
133
- #else
134
- const uint8 *base = reinterpret_cast<const uint8 *>(inBase);
135
- float x = *reinterpret_cast<const float *>(base + inOffsets.GetX() * Scale);
136
- float y = *reinterpret_cast<const float *>(base + inOffsets.GetY() * Scale);
137
- float z = *reinterpret_cast<const float *>(base + inOffsets.GetZ() * Scale);
138
- float w = *reinterpret_cast<const float *>(base + inOffsets.GetW() * Scale);
139
- return Vec4(x, y, z, w);
140
- #endif
141
- }
142
-
143
- Vec4 Vec4::sMin(Vec4Arg inV1, Vec4Arg inV2)
144
- {
145
- #if defined(JPH_USE_SSE)
146
- return _mm_min_ps(inV1.mValue, inV2.mValue);
147
- #elif defined(JPH_USE_NEON)
148
- return vminq_f32(inV1.mValue, inV2.mValue);
149
- #else
150
- return Vec4(min(inV1.mF32[0], inV2.mF32[0]),
151
- min(inV1.mF32[1], inV2.mF32[1]),
152
- min(inV1.mF32[2], inV2.mF32[2]),
153
- min(inV1.mF32[3], inV2.mF32[3]));
154
- #endif
155
- }
156
-
157
- Vec4 Vec4::sMax(Vec4Arg inV1, Vec4Arg inV2)
158
- {
159
- #if defined(JPH_USE_SSE)
160
- return _mm_max_ps(inV1.mValue, inV2.mValue);
161
- #elif defined(JPH_USE_NEON)
162
- return vmaxq_f32(inV1.mValue, inV2.mValue);
163
- #else
164
- return Vec4(max(inV1.mF32[0], inV2.mF32[0]),
165
- max(inV1.mF32[1], inV2.mF32[1]),
166
- max(inV1.mF32[2], inV2.mF32[2]),
167
- max(inV1.mF32[3], inV2.mF32[3]));
168
- #endif
169
- }
170
-
171
- Vec4 Vec4::sClamp(Vec4Arg inV, Vec4Arg inMin, Vec4Arg inMax)
172
- {
173
- return sMax(sMin(inV, inMax), inMin);
174
- }
175
-
176
- UVec4 Vec4::sEquals(Vec4Arg inV1, Vec4Arg inV2)
177
- {
178
- #if defined(JPH_USE_SSE)
179
- return _mm_castps_si128(_mm_cmpeq_ps(inV1.mValue, inV2.mValue));
180
- #elif defined(JPH_USE_NEON)
181
- return vceqq_f32(inV1.mValue, inV2.mValue);
182
- #else
183
- return UVec4(inV1.mF32[0] == inV2.mF32[0]? 0xffffffffu : 0,
184
- inV1.mF32[1] == inV2.mF32[1]? 0xffffffffu : 0,
185
- inV1.mF32[2] == inV2.mF32[2]? 0xffffffffu : 0,
186
- inV1.mF32[3] == inV2.mF32[3]? 0xffffffffu : 0);
187
- #endif
188
- }
189
-
190
- UVec4 Vec4::sLess(Vec4Arg inV1, Vec4Arg inV2)
191
- {
192
- #if defined(JPH_USE_SSE)
193
- return _mm_castps_si128(_mm_cmplt_ps(inV1.mValue, inV2.mValue));
194
- #elif defined(JPH_USE_NEON)
195
- return vcltq_f32(inV1.mValue, inV2.mValue);
196
- #else
197
- return UVec4(inV1.mF32[0] < inV2.mF32[0]? 0xffffffffu : 0,
198
- inV1.mF32[1] < inV2.mF32[1]? 0xffffffffu : 0,
199
- inV1.mF32[2] < inV2.mF32[2]? 0xffffffffu : 0,
200
- inV1.mF32[3] < inV2.mF32[3]? 0xffffffffu : 0);
201
- #endif
202
- }
203
-
204
- UVec4 Vec4::sLessOrEqual(Vec4Arg inV1, Vec4Arg inV2)
205
- {
206
- #if defined(JPH_USE_SSE)
207
- return _mm_castps_si128(_mm_cmple_ps(inV1.mValue, inV2.mValue));
208
- #elif defined(JPH_USE_NEON)
209
- return vcleq_f32(inV1.mValue, inV2.mValue);
210
- #else
211
- return UVec4(inV1.mF32[0] <= inV2.mF32[0]? 0xffffffffu : 0,
212
- inV1.mF32[1] <= inV2.mF32[1]? 0xffffffffu : 0,
213
- inV1.mF32[2] <= inV2.mF32[2]? 0xffffffffu : 0,
214
- inV1.mF32[3] <= inV2.mF32[3]? 0xffffffffu : 0);
215
- #endif
216
- }
217
-
218
- UVec4 Vec4::sGreater(Vec4Arg inV1, Vec4Arg inV2)
219
- {
220
- #if defined(JPH_USE_SSE)
221
- return _mm_castps_si128(_mm_cmpgt_ps(inV1.mValue, inV2.mValue));
222
- #elif defined(JPH_USE_NEON)
223
- return vcgtq_f32(inV1.mValue, inV2.mValue);
224
- #else
225
- return UVec4(inV1.mF32[0] > inV2.mF32[0]? 0xffffffffu : 0,
226
- inV1.mF32[1] > inV2.mF32[1]? 0xffffffffu : 0,
227
- inV1.mF32[2] > inV2.mF32[2]? 0xffffffffu : 0,
228
- inV1.mF32[3] > inV2.mF32[3]? 0xffffffffu : 0);
229
- #endif
230
- }
231
-
232
- UVec4 Vec4::sGreaterOrEqual(Vec4Arg inV1, Vec4Arg inV2)
233
- {
234
- #if defined(JPH_USE_SSE)
235
- return _mm_castps_si128(_mm_cmpge_ps(inV1.mValue, inV2.mValue));
236
- #elif defined(JPH_USE_NEON)
237
- return vcgeq_f32(inV1.mValue, inV2.mValue);
238
- #else
239
- return UVec4(inV1.mF32[0] >= inV2.mF32[0]? 0xffffffffu : 0,
240
- inV1.mF32[1] >= inV2.mF32[1]? 0xffffffffu : 0,
241
- inV1.mF32[2] >= inV2.mF32[2]? 0xffffffffu : 0,
242
- inV1.mF32[3] >= inV2.mF32[3]? 0xffffffffu : 0);
243
- #endif
244
- }
245
-
246
- Vec4 Vec4::sFusedMultiplyAdd(Vec4Arg inMul1, Vec4Arg inMul2, Vec4Arg inAdd)
247
- {
248
- #if defined(JPH_USE_SSE)
249
- #ifdef JPH_USE_FMADD
250
- return _mm_fmadd_ps(inMul1.mValue, inMul2.mValue, inAdd.mValue);
251
- #else
252
- return _mm_add_ps(_mm_mul_ps(inMul1.mValue, inMul2.mValue), inAdd.mValue);
253
- #endif
254
- #elif defined(JPH_USE_NEON)
255
- return vmlaq_f32(inAdd.mValue, inMul1.mValue, inMul2.mValue);
256
- #else
257
- return Vec4(inMul1.mF32[0] * inMul2.mF32[0] + inAdd.mF32[0],
258
- inMul1.mF32[1] * inMul2.mF32[1] + inAdd.mF32[1],
259
- inMul1.mF32[2] * inMul2.mF32[2] + inAdd.mF32[2],
260
- inMul1.mF32[3] * inMul2.mF32[3] + inAdd.mF32[3]);
261
- #endif
262
- }
263
-
264
- Vec4 Vec4::sSelect(Vec4Arg inNotSet, Vec4Arg inSet, UVec4Arg inControl)
265
- {
266
- #if defined(JPH_USE_SSE4_1) && !defined(JPH_PLATFORM_WASM) // _mm_blendv_ps has problems on FireFox
267
- return _mm_blendv_ps(inNotSet.mValue, inSet.mValue, _mm_castsi128_ps(inControl.mValue));
268
- #elif defined(JPH_USE_SSE)
269
- __m128 is_set = _mm_castsi128_ps(_mm_srai_epi32(inControl.mValue, 31));
270
- return _mm_or_ps(_mm_and_ps(is_set, inSet.mValue), _mm_andnot_ps(is_set, inNotSet.mValue));
271
- #elif defined(JPH_USE_NEON)
272
- return vbslq_f32(vreinterpretq_u32_s32(vshrq_n_s32(vreinterpretq_s32_u32(inControl.mValue), 31)), inSet.mValue, inNotSet.mValue);
273
- #else
274
- Vec4 result;
275
- for (int i = 0; i < 4; i++)
276
- result.mF32[i] = (inControl.mU32[i] & 0x80000000u) ? inSet.mF32[i] : inNotSet.mF32[i];
277
- return result;
278
- #endif
279
- }
280
-
281
- Vec4 Vec4::sOr(Vec4Arg inV1, Vec4Arg inV2)
282
- {
283
- #if defined(JPH_USE_SSE)
284
- return _mm_or_ps(inV1.mValue, inV2.mValue);
285
- #elif defined(JPH_USE_NEON)
286
- return vreinterpretq_f32_u32(vorrq_u32(vreinterpretq_u32_f32(inV1.mValue), vreinterpretq_u32_f32(inV2.mValue)));
287
- #else
288
- return UVec4::sOr(inV1.ReinterpretAsInt(), inV2.ReinterpretAsInt()).ReinterpretAsFloat();
289
- #endif
290
- }
291
-
292
- Vec4 Vec4::sXor(Vec4Arg inV1, Vec4Arg inV2)
293
- {
294
- #if defined(JPH_USE_SSE)
295
- return _mm_xor_ps(inV1.mValue, inV2.mValue);
296
- #elif defined(JPH_USE_NEON)
297
- return vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(inV1.mValue), vreinterpretq_u32_f32(inV2.mValue)));
298
- #else
299
- return UVec4::sXor(inV1.ReinterpretAsInt(), inV2.ReinterpretAsInt()).ReinterpretAsFloat();
300
- #endif
301
- }
302
-
303
- Vec4 Vec4::sAnd(Vec4Arg inV1, Vec4Arg inV2)
304
- {
305
- #if defined(JPH_USE_SSE)
306
- return _mm_and_ps(inV1.mValue, inV2.mValue);
307
- #elif defined(JPH_USE_NEON)
308
- return vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(inV1.mValue), vreinterpretq_u32_f32(inV2.mValue)));
309
- #else
310
- return UVec4::sAnd(inV1.ReinterpretAsInt(), inV2.ReinterpretAsInt()).ReinterpretAsFloat();
311
- #endif
312
- }
313
-
314
- void Vec4::sSort4(Vec4 &ioValue, UVec4 &ioIndex)
315
- {
316
- // Pass 1, test 1st vs 3rd, 2nd vs 4th
317
- Vec4 v1 = ioValue.Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_X, SWIZZLE_Y>();
318
- UVec4 i1 = ioIndex.Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_X, SWIZZLE_Y>();
319
- UVec4 c1 = sLess(ioValue, v1).Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_Z, SWIZZLE_W>();
320
- ioValue = sSelect(ioValue, v1, c1);
321
- ioIndex = UVec4::sSelect(ioIndex, i1, c1);
322
-
323
- // Pass 2, test 1st vs 2nd, 3rd vs 4th
324
- Vec4 v2 = ioValue.Swizzle<SWIZZLE_Y, SWIZZLE_X, SWIZZLE_W, SWIZZLE_Z>();
325
- UVec4 i2 = ioIndex.Swizzle<SWIZZLE_Y, SWIZZLE_X, SWIZZLE_W, SWIZZLE_Z>();
326
- UVec4 c2 = sLess(ioValue, v2).Swizzle<SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_W, SWIZZLE_W>();
327
- ioValue = sSelect(ioValue, v2, c2);
328
- ioIndex = UVec4::sSelect(ioIndex, i2, c2);
329
-
330
- // Pass 3, test 2nd vs 3rd component
331
- Vec4 v3 = ioValue.Swizzle<SWIZZLE_X, SWIZZLE_Z, SWIZZLE_Y, SWIZZLE_W>();
332
- UVec4 i3 = ioIndex.Swizzle<SWIZZLE_X, SWIZZLE_Z, SWIZZLE_Y, SWIZZLE_W>();
333
- UVec4 c3 = sLess(ioValue, v3).Swizzle<SWIZZLE_X, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_W>();
334
- ioValue = sSelect(ioValue, v3, c3);
335
- ioIndex = UVec4::sSelect(ioIndex, i3, c3);
336
- }
337
-
338
- void Vec4::sSort4Reverse(Vec4 &ioValue, UVec4 &ioIndex)
339
- {
340
- // Pass 1, test 1st vs 3rd, 2nd vs 4th
341
- Vec4 v1 = ioValue.Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_X, SWIZZLE_Y>();
342
- UVec4 i1 = ioIndex.Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_X, SWIZZLE_Y>();
343
- UVec4 c1 = sGreater(ioValue, v1).Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_Z, SWIZZLE_W>();
344
- ioValue = sSelect(ioValue, v1, c1);
345
- ioIndex = UVec4::sSelect(ioIndex, i1, c1);
346
-
347
- // Pass 2, test 1st vs 2nd, 3rd vs 4th
348
- Vec4 v2 = ioValue.Swizzle<SWIZZLE_Y, SWIZZLE_X, SWIZZLE_W, SWIZZLE_Z>();
349
- UVec4 i2 = ioIndex.Swizzle<SWIZZLE_Y, SWIZZLE_X, SWIZZLE_W, SWIZZLE_Z>();
350
- UVec4 c2 = sGreater(ioValue, v2).Swizzle<SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_W, SWIZZLE_W>();
351
- ioValue = sSelect(ioValue, v2, c2);
352
- ioIndex = UVec4::sSelect(ioIndex, i2, c2);
353
-
354
- // Pass 3, test 2nd vs 3rd component
355
- Vec4 v3 = ioValue.Swizzle<SWIZZLE_X, SWIZZLE_Z, SWIZZLE_Y, SWIZZLE_W>();
356
- UVec4 i3 = ioIndex.Swizzle<SWIZZLE_X, SWIZZLE_Z, SWIZZLE_Y, SWIZZLE_W>();
357
- UVec4 c3 = sGreater(ioValue, v3).Swizzle<SWIZZLE_X, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_W>();
358
- ioValue = sSelect(ioValue, v3, c3);
359
- ioIndex = UVec4::sSelect(ioIndex, i3, c3);
360
- }
361
-
362
- bool Vec4::operator == (Vec4Arg inV2) const
363
- {
364
- return sEquals(*this, inV2).TestAllTrue();
365
- }
366
-
367
- bool Vec4::IsClose(Vec4Arg inV2, float inMaxDistSq) const
368
- {
369
- return (inV2 - *this).LengthSq() <= inMaxDistSq;
370
- }
371
-
372
- bool Vec4::IsNearZero(float inMaxDistSq) const
373
- {
374
- return LengthSq() <= inMaxDistSq;
375
- }
376
-
377
- bool Vec4::IsNormalized(float inTolerance) const
378
- {
379
- return abs(LengthSq() - 1.0f) <= inTolerance;
380
- }
381
-
382
- bool Vec4::IsNaN() const
383
- {
384
- #if defined(JPH_USE_AVX512)
385
- return _mm_fpclass_ps_mask(mValue, 0b10000001) != 0;
386
- #elif defined(JPH_USE_SSE)
387
- return _mm_movemask_ps(_mm_cmpunord_ps(mValue, mValue)) != 0;
388
- #elif defined(JPH_USE_NEON)
389
- uint32x4_t is_equal = vceqq_f32(mValue, mValue); // If a number is not equal to itself it's a NaN
390
- return vaddvq_u32(vshrq_n_u32(is_equal, 31)) != 4;
391
- #else
392
- return isnan(mF32[0]) || isnan(mF32[1]) || isnan(mF32[2]) || isnan(mF32[3]);
393
- #endif
394
- }
395
-
396
- Vec4 Vec4::operator * (Vec4Arg inV2) const
397
- {
398
- #if defined(JPH_USE_SSE)
399
- return _mm_mul_ps(mValue, inV2.mValue);
400
- #elif defined(JPH_USE_NEON)
401
- return vmulq_f32(mValue, inV2.mValue);
402
- #else
403
- return Vec4(mF32[0] * inV2.mF32[0],
404
- mF32[1] * inV2.mF32[1],
405
- mF32[2] * inV2.mF32[2],
406
- mF32[3] * inV2.mF32[3]);
407
- #endif
408
- }
409
-
410
- Vec4 Vec4::operator * (float inV2) const
411
- {
412
- #if defined(JPH_USE_SSE)
413
- return _mm_mul_ps(mValue, _mm_set1_ps(inV2));
414
- #elif defined(JPH_USE_NEON)
415
- return vmulq_n_f32(mValue, inV2);
416
- #else
417
- return Vec4(mF32[0] * inV2, mF32[1] * inV2, mF32[2] * inV2, mF32[3] * inV2);
418
- #endif
419
- }
420
-
421
- /// Multiply vector with float
422
- Vec4 operator * (float inV1, Vec4Arg inV2)
423
- {
424
- #if defined(JPH_USE_SSE)
425
- return _mm_mul_ps(_mm_set1_ps(inV1), inV2.mValue);
426
- #elif defined(JPH_USE_NEON)
427
- return vmulq_n_f32(inV2.mValue, inV1);
428
- #else
429
- return Vec4(inV1 * inV2.mF32[0],
430
- inV1 * inV2.mF32[1],
431
- inV1 * inV2.mF32[2],
432
- inV1 * inV2.mF32[3]);
433
- #endif
434
- }
435
-
436
- Vec4 Vec4::operator / (float inV2) const
437
- {
438
- #if defined(JPH_USE_SSE)
439
- return _mm_div_ps(mValue, _mm_set1_ps(inV2));
440
- #elif defined(JPH_USE_NEON)
441
- return vdivq_f32(mValue, vdupq_n_f32(inV2));
442
- #else
443
- return Vec4(mF32[0] / inV2, mF32[1] / inV2, mF32[2] / inV2, mF32[3] / inV2);
444
- #endif
445
- }
446
-
447
- Vec4 &Vec4::operator *= (float inV2)
448
- {
449
- #if defined(JPH_USE_SSE)
450
- mValue = _mm_mul_ps(mValue, _mm_set1_ps(inV2));
451
- #elif defined(JPH_USE_NEON)
452
- mValue = vmulq_n_f32(mValue, inV2);
453
- #else
454
- for (int i = 0; i < 4; ++i)
455
- mF32[i] *= inV2;
456
- #endif
457
- return *this;
458
- }
459
-
460
- Vec4 &Vec4::operator *= (Vec4Arg inV2)
461
- {
462
- #if defined(JPH_USE_SSE)
463
- mValue = _mm_mul_ps(mValue, inV2.mValue);
464
- #elif defined(JPH_USE_NEON)
465
- mValue = vmulq_f32(mValue, inV2.mValue);
466
- #else
467
- for (int i = 0; i < 4; ++i)
468
- mF32[i] *= inV2.mF32[i];
469
- #endif
470
- return *this;
471
- }
472
-
473
- Vec4 &Vec4::operator /= (float inV2)
474
- {
475
- #if defined(JPH_USE_SSE)
476
- mValue = _mm_div_ps(mValue, _mm_set1_ps(inV2));
477
- #elif defined(JPH_USE_NEON)
478
- mValue = vdivq_f32(mValue, vdupq_n_f32(inV2));
479
- #else
480
- for (int i = 0; i < 4; ++i)
481
- mF32[i] /= inV2;
482
- #endif
483
- return *this;
484
- }
485
-
486
- Vec4 Vec4::operator + (Vec4Arg inV2) const
487
- {
488
- #if defined(JPH_USE_SSE)
489
- return _mm_add_ps(mValue, inV2.mValue);
490
- #elif defined(JPH_USE_NEON)
491
- return vaddq_f32(mValue, inV2.mValue);
492
- #else
493
- return Vec4(mF32[0] + inV2.mF32[0],
494
- mF32[1] + inV2.mF32[1],
495
- mF32[2] + inV2.mF32[2],
496
- mF32[3] + inV2.mF32[3]);
497
- #endif
498
- }
499
-
500
- Vec4 &Vec4::operator += (Vec4Arg inV2)
501
- {
502
- #if defined(JPH_USE_SSE)
503
- mValue = _mm_add_ps(mValue, inV2.mValue);
504
- #elif defined(JPH_USE_NEON)
505
- mValue = vaddq_f32(mValue, inV2.mValue);
506
- #else
507
- for (int i = 0; i < 4; ++i)
508
- mF32[i] += inV2.mF32[i];
509
- #endif
510
- return *this;
511
- }
512
-
513
- Vec4 Vec4::operator - () const
514
- {
515
- #if defined(JPH_USE_SSE)
516
- return _mm_sub_ps(_mm_setzero_ps(), mValue);
517
- #elif defined(JPH_USE_NEON)
518
- #ifdef JPH_CROSS_PLATFORM_DETERMINISTIC
519
- return vsubq_f32(vdupq_n_f32(0), mValue);
520
- #else
521
- return vnegq_f32(mValue);
522
- #endif
523
- #else
524
- #ifdef JPH_CROSS_PLATFORM_DETERMINISTIC
525
- return Vec4(0.0f - mF32[0], 0.0f - mF32[1], 0.0f - mF32[2], 0.0f - mF32[3]);
526
- #else
527
- return Vec4(-mF32[0], -mF32[1], -mF32[2], -mF32[3]);
528
- #endif
529
- #endif
530
- }
531
-
532
- Vec4 Vec4::operator - (Vec4Arg inV2) const
533
- {
534
- #if defined(JPH_USE_SSE)
535
- return _mm_sub_ps(mValue, inV2.mValue);
536
- #elif defined(JPH_USE_NEON)
537
- return vsubq_f32(mValue, inV2.mValue);
538
- #else
539
- return Vec4(mF32[0] - inV2.mF32[0],
540
- mF32[1] - inV2.mF32[1],
541
- mF32[2] - inV2.mF32[2],
542
- mF32[3] - inV2.mF32[3]);
543
- #endif
544
- }
545
-
546
- Vec4 &Vec4::operator -= (Vec4Arg inV2)
547
- {
548
- #if defined(JPH_USE_SSE)
549
- mValue = _mm_sub_ps(mValue, inV2.mValue);
550
- #elif defined(JPH_USE_NEON)
551
- mValue = vsubq_f32(mValue, inV2.mValue);
552
- #else
553
- for (int i = 0; i < 4; ++i)
554
- mF32[i] -= inV2.mF32[i];
555
- #endif
556
- return *this;
557
- }
558
-
559
- Vec4 Vec4::operator / (Vec4Arg inV2) const
560
- {
561
- #if defined(JPH_USE_SSE)
562
- return _mm_div_ps(mValue, inV2.mValue);
563
- #elif defined(JPH_USE_NEON)
564
- return vdivq_f32(mValue, inV2.mValue);
565
- #else
566
- return Vec4(mF32[0] / inV2.mF32[0],
567
- mF32[1] / inV2.mF32[1],
568
- mF32[2] / inV2.mF32[2],
569
- mF32[3] / inV2.mF32[3]);
570
- #endif
571
- }
572
-
573
- Vec4 Vec4::SplatX() const
574
- {
575
- #if defined(JPH_USE_SSE)
576
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(0, 0, 0, 0));
577
- #elif defined(JPH_USE_NEON)
578
- return vdupq_laneq_f32(mValue, 0);
579
- #else
580
- return Vec4(mF32[0], mF32[0], mF32[0], mF32[0]);
581
- #endif
582
- }
583
-
584
- Vec4 Vec4::SplatY() const
585
- {
586
- #if defined(JPH_USE_SSE)
587
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(1, 1, 1, 1));
588
- #elif defined(JPH_USE_NEON)
589
- return vdupq_laneq_f32(mValue, 1);
590
- #else
591
- return Vec4(mF32[1], mF32[1], mF32[1], mF32[1]);
592
- #endif
593
- }
594
-
595
- Vec4 Vec4::SplatZ() const
596
- {
597
- #if defined(JPH_USE_SSE)
598
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(2, 2, 2, 2));
599
- #elif defined(JPH_USE_NEON)
600
- return vdupq_laneq_f32(mValue, 2);
601
- #else
602
- return Vec4(mF32[2], mF32[2], mF32[2], mF32[2]);
603
- #endif
604
- }
605
-
606
- Vec4 Vec4::SplatW() const
607
- {
608
- #if defined(JPH_USE_SSE)
609
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(3, 3, 3, 3));
610
- #elif defined(JPH_USE_NEON)
611
- return vdupq_laneq_f32(mValue, 3);
612
- #else
613
- return Vec4(mF32[3], mF32[3], mF32[3], mF32[3]);
614
- #endif
615
- }
616
-
617
- Vec3 Vec4::SplatX3() const
618
- {
619
- #if defined(JPH_USE_SSE)
620
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(0, 0, 0, 0));
621
- #elif defined(JPH_USE_NEON)
622
- return vdupq_laneq_f32(mValue, 0);
623
- #else
624
- return Vec3(mF32[0], mF32[0], mF32[0]);
625
- #endif
626
- }
627
-
628
- Vec3 Vec4::SplatY3() const
629
- {
630
- #if defined(JPH_USE_SSE)
631
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(1, 1, 1, 1));
632
- #elif defined(JPH_USE_NEON)
633
- return vdupq_laneq_f32(mValue, 1);
634
- #else
635
- return Vec3(mF32[1], mF32[1], mF32[1]);
636
- #endif
637
- }
638
-
639
- Vec3 Vec4::SplatZ3() const
640
- {
641
- #if defined(JPH_USE_SSE)
642
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(2, 2, 2, 2));
643
- #elif defined(JPH_USE_NEON)
644
- return vdupq_laneq_f32(mValue, 2);
645
- #else
646
- return Vec3(mF32[2], mF32[2], mF32[2]);
647
- #endif
648
- }
649
-
650
- Vec3 Vec4::SplatW3() const
651
- {
652
- #if defined(JPH_USE_SSE)
653
- return _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(3, 3, 3, 3));
654
- #elif defined(JPH_USE_NEON)
655
- return vdupq_laneq_f32(mValue, 3);
656
- #else
657
- return Vec3(mF32[3], mF32[3], mF32[3]);
658
- #endif
659
- }
660
-
661
- int Vec4::GetLowestComponentIndex() const
662
- {
663
- // Get the minimum value in all 4 components
664
- Vec4 value = Vec4::sMin(*this, Swizzle<SWIZZLE_Y, SWIZZLE_X, SWIZZLE_W, SWIZZLE_Z>());
665
- value = Vec4::sMin(value, value.Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_X, SWIZZLE_Y>());
666
-
667
- // Compare with the original vector to find which component is equal to the minimum value
668
- return CountTrailingZeros(Vec4::sEquals(*this, value).GetTrues());
669
- }
670
-
671
- int Vec4::GetHighestComponentIndex() const
672
- {
673
- // Get the maximum value in all 4 components
674
- Vec4 value = Vec4::sMax(*this, Swizzle<SWIZZLE_Y, SWIZZLE_X, SWIZZLE_W, SWIZZLE_Z>());
675
- value = Vec4::sMax(value, value.Swizzle<SWIZZLE_Z, SWIZZLE_W, SWIZZLE_X, SWIZZLE_Y>());
676
-
677
- // Compare with the original vector to find which component is equal to the maximum value
678
- return CountTrailingZeros(Vec4::sEquals(*this, value).GetTrues());
679
- }
680
-
681
- Vec4 Vec4::Abs() const
682
- {
683
- #if defined(JPH_USE_AVX512)
684
- return _mm_range_ps(mValue, mValue, 0b1000);
685
- #elif defined(JPH_USE_SSE)
686
- return _mm_max_ps(_mm_sub_ps(_mm_setzero_ps(), mValue), mValue);
687
- #elif defined(JPH_USE_NEON)
688
- return vabsq_f32(mValue);
689
- #else
690
- return Vec4(abs(mF32[0]), abs(mF32[1]), abs(mF32[2]), abs(mF32[3]));
691
- #endif
692
- }
693
-
694
- Vec4 Vec4::Reciprocal() const
695
- {
696
- return sOne() / mValue;
697
- }
698
-
699
- Vec4 Vec4::DotV(Vec4Arg inV2) const
700
- {
701
- #if defined(JPH_USE_SSE4_1)
702
- return _mm_dp_ps(mValue, inV2.mValue, 0xff);
703
- #elif defined(JPH_USE_NEON)
704
- float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
705
- return vdupq_n_f32(vaddvq_f32(mul));
706
- #else
707
- // Brackets placed so that the order is consistent with the vectorized version
708
- return Vec4::sReplicate((mF32[0] * inV2.mF32[0] + mF32[1] * inV2.mF32[1]) + (mF32[2] * inV2.mF32[2] + mF32[3] * inV2.mF32[3]));
709
- #endif
710
- }
711
-
712
- float Vec4::Dot(Vec4Arg inV2) const
713
- {
714
- #if defined(JPH_USE_SSE4_1)
715
- return _mm_cvtss_f32(_mm_dp_ps(mValue, inV2.mValue, 0xff));
716
- #elif defined(JPH_USE_NEON)
717
- float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
718
- return vaddvq_f32(mul);
719
- #else
720
- // Brackets placed so that the order is consistent with the vectorized version
721
- return (mF32[0] * inV2.mF32[0] + mF32[1] * inV2.mF32[1]) + (mF32[2] * inV2.mF32[2] + mF32[3] * inV2.mF32[3]);
722
- #endif
723
- }
724
-
725
- float Vec4::LengthSq() const
726
- {
727
- #if defined(JPH_USE_SSE4_1)
728
- return _mm_cvtss_f32(_mm_dp_ps(mValue, mValue, 0xff));
729
- #elif defined(JPH_USE_NEON)
730
- float32x4_t mul = vmulq_f32(mValue, mValue);
731
- return vaddvq_f32(mul);
732
- #else
733
- // Brackets placed so that the order is consistent with the vectorized version
734
- return (mF32[0] * mF32[0] + mF32[1] * mF32[1]) + (mF32[2] * mF32[2] + mF32[3] * mF32[3]);
735
- #endif
736
- }
737
-
738
- float Vec4::Length() const
739
- {
740
- #if defined(JPH_USE_SSE4_1)
741
- return _mm_cvtss_f32(_mm_sqrt_ss(_mm_dp_ps(mValue, mValue, 0xff)));
742
- #elif defined(JPH_USE_NEON)
743
- float32x4_t mul = vmulq_f32(mValue, mValue);
744
- float32x2_t sum = vdup_n_f32(vaddvq_f32(mul));
745
- return vget_lane_f32(vsqrt_f32(sum), 0);
746
- #else
747
- // Brackets placed so that the order is consistent with the vectorized version
748
- return sqrt((mF32[0] * mF32[0] + mF32[1] * mF32[1]) + (mF32[2] * mF32[2] + mF32[3] * mF32[3]));
749
- #endif
750
- }
751
-
752
- Vec4 Vec4::Sqrt() const
753
- {
754
- #if defined(JPH_USE_SSE)
755
- return _mm_sqrt_ps(mValue);
756
- #elif defined(JPH_USE_NEON)
757
- return vsqrtq_f32(mValue);
758
- #else
759
- return Vec4(sqrt(mF32[0]), sqrt(mF32[1]), sqrt(mF32[2]), sqrt(mF32[3]));
760
- #endif
761
- }
762
-
763
-
764
- Vec4 Vec4::GetSign() const
765
- {
766
- #if defined(JPH_USE_AVX512)
767
- return _mm_fixupimm_ps(mValue, mValue, _mm_set1_epi32(0xA9A90A00), 0);
768
- #elif defined(JPH_USE_SSE)
769
- Type minus_one = _mm_set1_ps(-1.0f);
770
- Type one = _mm_set1_ps(1.0f);
771
- return _mm_or_ps(_mm_and_ps(mValue, minus_one), one);
772
- #elif defined(JPH_USE_NEON)
773
- Type minus_one = vdupq_n_f32(-1.0f);
774
- Type one = vdupq_n_f32(1.0f);
775
- return vreinterpretq_f32_u32(vorrq_u32(vandq_u32(vreinterpretq_u32_f32(mValue), vreinterpretq_u32_f32(minus_one)), vreinterpretq_u32_f32(one)));
776
- #else
777
- return Vec4(std::signbit(mF32[0])? -1.0f : 1.0f,
778
- std::signbit(mF32[1])? -1.0f : 1.0f,
779
- std::signbit(mF32[2])? -1.0f : 1.0f,
780
- std::signbit(mF32[3])? -1.0f : 1.0f);
781
- #endif
782
- }
783
-
784
- template <int X, int Y, int Z, int W>
785
- JPH_INLINE Vec4 Vec4::FlipSign() const
786
- {
787
- static_assert(X == 1 || X == -1, "X must be 1 or -1");
788
- static_assert(Y == 1 || Y == -1, "Y must be 1 or -1");
789
- static_assert(Z == 1 || Z == -1, "Z must be 1 or -1");
790
- static_assert(W == 1 || W == -1, "W must be 1 or -1");
791
- return Vec4::sXor(*this, Vec4(X > 0? 0.0f : -0.0f, Y > 0? 0.0f : -0.0f, Z > 0? 0.0f : -0.0f, W > 0? 0.0f : -0.0f));
792
- }
793
-
794
- Vec4 Vec4::Normalized() const
795
- {
796
- #if defined(JPH_USE_SSE4_1)
797
- return _mm_div_ps(mValue, _mm_sqrt_ps(_mm_dp_ps(mValue, mValue, 0xff)));
798
- #elif defined(JPH_USE_NEON)
799
- float32x4_t mul = vmulq_f32(mValue, mValue);
800
- float32x4_t sum = vdupq_n_f32(vaddvq_f32(mul));
801
- return vdivq_f32(mValue, vsqrtq_f32(sum));
802
- #else
803
- return *this / Length();
804
- #endif
805
- }
806
-
807
- void Vec4::StoreFloat4(Float4 *outV) const
808
- {
809
- #if defined(JPH_USE_SSE)
810
- _mm_storeu_ps(&outV->x, mValue);
811
- #elif defined(JPH_USE_NEON)
812
- vst1q_f32(&outV->x, mValue);
813
- #else
814
- for (int i = 0; i < 4; ++i)
815
- (&outV->x)[i] = mF32[i];
816
- #endif
817
- }
818
-
819
- UVec4 Vec4::ToInt() const
820
- {
821
- #if defined(JPH_USE_SSE)
822
- return _mm_cvttps_epi32(mValue);
823
- #elif defined(JPH_USE_NEON)
824
- return vcvtq_u32_f32(mValue);
825
- #else
826
- return UVec4(uint32(mF32[0]), uint32(mF32[1]), uint32(mF32[2]), uint32(mF32[3]));
827
- #endif
828
- }
829
-
830
- UVec4 Vec4::ReinterpretAsInt() const
831
- {
832
- #if defined(JPH_USE_SSE)
833
- return UVec4(_mm_castps_si128(mValue));
834
- #elif defined(JPH_USE_NEON)
835
- return vreinterpretq_u32_f32(mValue);
836
- #else
837
- return *reinterpret_cast<const UVec4 *>(this);
838
- #endif
839
- }
840
-
841
- int Vec4::GetSignBits() const
842
- {
843
- #if defined(JPH_USE_SSE)
844
- return _mm_movemask_ps(mValue);
845
- #elif defined(JPH_USE_NEON)
846
- int32x4_t shift = JPH_NEON_INT32x4(0, 1, 2, 3);
847
- return vaddvq_u32(vshlq_u32(vshrq_n_u32(vreinterpretq_u32_f32(mValue), 31), shift));
848
- #else
849
- return (std::signbit(mF32[0])? 1 : 0) | (std::signbit(mF32[1])? 2 : 0) | (std::signbit(mF32[2])? 4 : 0) | (std::signbit(mF32[3])? 8 : 0);
850
- #endif
851
- }
852
-
853
- float Vec4::ReduceMin() const
854
- {
855
- Vec4 v = sMin(mValue, Swizzle<SWIZZLE_Y, SWIZZLE_UNUSED, SWIZZLE_W, SWIZZLE_UNUSED>());
856
- v = sMin(v, v.Swizzle<SWIZZLE_Z, SWIZZLE_UNUSED, SWIZZLE_UNUSED, SWIZZLE_UNUSED>());
857
- return v.GetX();
858
- }
859
-
860
- float Vec4::ReduceMax() const
861
- {
862
- Vec4 v = sMax(mValue, Swizzle<SWIZZLE_Y, SWIZZLE_UNUSED, SWIZZLE_W, SWIZZLE_UNUSED>());
863
- v = sMax(v, v.Swizzle<SWIZZLE_Z, SWIZZLE_UNUSED, SWIZZLE_UNUSED, SWIZZLE_UNUSED>());
864
- return v.GetX();
865
- }
866
-
867
- void Vec4::SinCos(Vec4 &outSin, Vec4 &outCos) const
868
- {
869
- // Implementation based on sinf.c from the cephes library, combines sinf and cosf in a single function, changes octants to quadrants and vectorizes it
870
- // Original implementation by Stephen L. Moshier (See: http://www.moshier.net/)
871
-
872
- // Make argument positive and remember sign for sin only since cos is symmetric around x (highest bit of a float is the sign bit)
873
- UVec4 sin_sign = UVec4::sAnd(ReinterpretAsInt(), UVec4::sReplicate(0x80000000U));
874
- Vec4 x = Vec4::sXor(*this, sin_sign.ReinterpretAsFloat());
875
-
876
- // x / (PI / 2) rounded to nearest int gives us the quadrant closest to x
877
- UVec4 quadrant = (0.6366197723675814f * x + Vec4::sReplicate(0.5f)).ToInt();
878
-
879
- // Make x relative to the closest quadrant.
880
- // This does x = x - quadrant * PI / 2 using a two step Cody-Waite argument reduction.
881
- // This improves the accuracy of the result by avoiding loss of significant bits in the subtraction.
882
- // We start with x = x - quadrant * PI / 2, PI / 2 in hexadecimal notation is 0x3fc90fdb, we remove the lowest 16 bits to
883
- // get 0x3fc90000 (= 1.5703125) this means we can now multiply with a number of up to 2^16 without losing any bits.
884
- // This leaves us with: x = (x - quadrant * 1.5703125) - quadrant * (PI / 2 - 1.5703125).
885
- // PI / 2 - 1.5703125 in hexadecimal is 0x39fdaa22, stripping the lowest 12 bits we get 0x39fda000 (= 0.0004837512969970703125)
886
- // This leaves uw with: x = ((x - quadrant * 1.5703125) - quadrant * 0.0004837512969970703125) - quadrant * (PI / 2 - 1.5703125 - 0.0004837512969970703125)
887
- // See: https://stackoverflow.com/questions/42455143/sine-cosine-modular-extended-precision-arithmetic
888
- // After this we have x in the range [-PI / 4, PI / 4].
889
- Vec4 float_quadrant = quadrant.ToFloat();
890
- x = ((x - float_quadrant * 1.5703125f) - float_quadrant * 0.0004837512969970703125f) - float_quadrant * 7.549789948768648e-8f;
891
-
892
- // Calculate x2 = x^2
893
- Vec4 x2 = x * x;
894
-
895
- // Taylor expansion:
896
- // Cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + x^8/8! + ... = (((x2/8!- 1/6!) * x2 + 1/4!) * x2 - 1/2!) * x2 + 1
897
- Vec4 taylor_cos = ((2.443315711809948e-5f * x2 - Vec4::sReplicate(1.388731625493765e-3f)) * x2 + Vec4::sReplicate(4.166664568298827e-2f)) * x2 * x2 - 0.5f * x2 + Vec4::sOne();
898
- // Sin(x) = x - x^3/3! + x^5/5! - x^7/7! + ... = ((-x2/7! + 1/5!) * x2 - 1/3!) * x2 * x + x
899
- Vec4 taylor_sin = ((-1.9515295891e-4f * x2 + Vec4::sReplicate(8.3321608736e-3f)) * x2 - Vec4::sReplicate(1.6666654611e-1f)) * x2 * x + x;
900
-
901
- // The lowest 2 bits of quadrant indicate the quadrant that we are in.
902
- // Let x be the original input value and x' our value that has been mapped to the range [-PI / 4, PI / 4].
903
- // since cos(x) = sin(x - PI / 2) and since we want to use the Taylor expansion as close as possible to 0,
904
- // we can alternate between using the Taylor expansion for sin and cos according to the following table:
905
- //
906
- // quadrant sin(x) cos(x)
907
- // XXX00b sin(x') cos(x')
908
- // XXX01b cos(x') -sin(x')
909
- // XXX10b -sin(x') -cos(x')
910
- // XXX11b -cos(x') sin(x')
911
- //
912
- // So: sin_sign = bit2, cos_sign = bit1 ^ bit2, bit1 determines if we use sin or cos Taylor expansion
913
- UVec4 bit1 = quadrant.LogicalShiftLeft<31>();
914
- UVec4 bit2 = UVec4::sAnd(quadrant.LogicalShiftLeft<30>(), UVec4::sReplicate(0x80000000U));
915
-
916
- // Select which one of the results is sin and which one is cos
917
- Vec4 s = Vec4::sSelect(taylor_sin, taylor_cos, bit1);
918
- Vec4 c = Vec4::sSelect(taylor_cos, taylor_sin, bit1);
919
-
920
- // Update the signs
921
- sin_sign = UVec4::sXor(sin_sign, bit2);
922
- UVec4 cos_sign = UVec4::sXor(bit1, bit2);
923
-
924
- // Correct the signs
925
- outSin = Vec4::sXor(s, sin_sign.ReinterpretAsFloat());
926
- outCos = Vec4::sXor(c, cos_sign.ReinterpretAsFloat());
927
- }
928
-
929
- Vec4 Vec4::Tan() const
930
- {
931
- // Implementation based on tanf.c from the cephes library, see Vec4::SinCos for further details
932
- // Original implementation by Stephen L. Moshier (See: http://www.moshier.net/)
933
-
934
- // Make argument positive
935
- UVec4 tan_sign = UVec4::sAnd(ReinterpretAsInt(), UVec4::sReplicate(0x80000000U));
936
- Vec4 x = Vec4::sXor(*this, tan_sign.ReinterpretAsFloat());
937
-
938
- // x / (PI / 2) rounded to nearest int gives us the quadrant closest to x
939
- UVec4 quadrant = (0.6366197723675814f * x + Vec4::sReplicate(0.5f)).ToInt();
940
-
941
- // Remap x to range [-PI / 4, PI / 4], see Vec4::SinCos
942
- Vec4 float_quadrant = quadrant.ToFloat();
943
- x = ((x - float_quadrant * 1.5703125f) - float_quadrant * 0.0004837512969970703125f) - float_quadrant * 7.549789948768648e-8f;
944
-
945
- // Calculate x2 = x^2
946
- Vec4 x2 = x * x;
947
-
948
- // Roughly equivalent to the Taylor expansion:
949
- // Tan(x) = x + x^3/3 + 2*x^5/15 + 17*x^7/315 + 62*x^9/2835 + ...
950
- Vec4 tan =
951
- (((((9.38540185543e-3f * x2 + Vec4::sReplicate(3.11992232697e-3f)) * x2 + Vec4::sReplicate(2.44301354525e-2f)) * x2
952
- + Vec4::sReplicate(5.34112807005e-2f)) * x2 + Vec4::sReplicate(1.33387994085e-1f)) * x2 + Vec4::sReplicate(3.33331568548e-1f)) * x2 * x + x;
953
-
954
- // For the 2nd and 4th quadrant we need to invert the value
955
- UVec4 bit1 = quadrant.LogicalShiftLeft<31>();
956
- tan = Vec4::sSelect(tan, Vec4::sReplicate(-1.0f) / (tan JPH_IF_FLOATING_POINT_EXCEPTIONS_ENABLED(+ Vec4::sReplicate(FLT_MIN))), bit1); // Add small epsilon to prevent div by zero, works because tan is always positive
957
-
958
- // Put the sign back
959
- return Vec4::sXor(tan, tan_sign.ReinterpretAsFloat());
960
- }
961
-
962
- Vec4 Vec4::ASin() const
963
- {
964
- // Implementation based on asinf.c from the cephes library
965
- // Original implementation by Stephen L. Moshier (See: http://www.moshier.net/)
966
-
967
- // Make argument positive
968
- UVec4 asin_sign = UVec4::sAnd(ReinterpretAsInt(), UVec4::sReplicate(0x80000000U));
969
- Vec4 a = Vec4::sXor(*this, asin_sign.ReinterpretAsFloat());
970
-
971
- // ASin is not defined outside the range [-1, 1] but it often happens that a value is slightly above 1 so we just clamp here
972
- a = Vec4::sMin(a, Vec4::sOne());
973
-
974
- // When |x| <= 0.5 we use the asin approximation as is
975
- Vec4 z1 = a * a;
976
- Vec4 x1 = a;
977
-
978
- // When |x| > 0.5 we use the identity asin(x) = PI / 2 - 2 * asin(sqrt((1 - x) / 2))
979
- Vec4 z2 = 0.5f * (Vec4::sOne() - a);
980
- Vec4 x2 = z2.Sqrt();
981
-
982
- // Select which of the two situations we have
983
- UVec4 greater = Vec4::sGreater(a, Vec4::sReplicate(0.5f));
984
- Vec4 z = Vec4::sSelect(z1, z2, greater);
985
- Vec4 x = Vec4::sSelect(x1, x2, greater);
986
-
987
- // Polynomial approximation of asin
988
- z = ((((4.2163199048e-2f * z + Vec4::sReplicate(2.4181311049e-2f)) * z + Vec4::sReplicate(4.5470025998e-2f)) * z + Vec4::sReplicate(7.4953002686e-2f)) * z + Vec4::sReplicate(1.6666752422e-1f)) * z * x + x;
989
-
990
- // If |x| > 0.5 we need to apply the remainder of the identity above
991
- z = Vec4::sSelect(z, Vec4::sReplicate(0.5f * JPH_PI) - (z + z), greater);
992
-
993
- // Put the sign back
994
- return Vec4::sXor(z, asin_sign.ReinterpretAsFloat());
995
- }
996
-
997
- Vec4 Vec4::ACos() const
998
- {
999
- // Not the most accurate, but simple
1000
- return Vec4::sReplicate(0.5f * JPH_PI) - ASin();
1001
- }
1002
-
1003
- Vec4 Vec4::ATan() const
1004
- {
1005
- // Implementation based on atanf.c from the cephes library
1006
- // Original implementation by Stephen L. Moshier (See: http://www.moshier.net/)
1007
-
1008
- // Make argument positive
1009
- UVec4 atan_sign = UVec4::sAnd(ReinterpretAsInt(), UVec4::sReplicate(0x80000000U));
1010
- Vec4 x = Vec4::sXor(*this, atan_sign.ReinterpretAsFloat());
1011
- Vec4 y = Vec4::sZero();
1012
-
1013
- // If x > Tan(PI / 8)
1014
- UVec4 greater1 = Vec4::sGreater(x, Vec4::sReplicate(0.4142135623730950f));
1015
- Vec4 x1 = (x - Vec4::sOne()) / (x + Vec4::sOne());
1016
-
1017
- // If x > Tan(3 * PI / 8)
1018
- UVec4 greater2 = Vec4::sGreater(x, Vec4::sReplicate(2.414213562373095f));
1019
- Vec4 x2 = Vec4::sReplicate(-1.0f) / (x JPH_IF_FLOATING_POINT_EXCEPTIONS_ENABLED(+ Vec4::sReplicate(FLT_MIN))); // Add small epsilon to prevent div by zero, works because x is always positive
1020
-
1021
- // Apply first if
1022
- x = Vec4::sSelect(x, x1, greater1);
1023
- y = Vec4::sSelect(y, Vec4::sReplicate(0.25f * JPH_PI), greater1);
1024
-
1025
- // Apply second if
1026
- x = Vec4::sSelect(x, x2, greater2);
1027
- y = Vec4::sSelect(y, Vec4::sReplicate(0.5f * JPH_PI), greater2);
1028
-
1029
- // Polynomial approximation
1030
- Vec4 z = x * x;
1031
- y += (((8.05374449538e-2f * z - Vec4::sReplicate(1.38776856032e-1f)) * z + Vec4::sReplicate(1.99777106478e-1f)) * z - Vec4::sReplicate(3.33329491539e-1f)) * z * x + x;
1032
-
1033
- // Put the sign back
1034
- return Vec4::sXor(y, atan_sign.ReinterpretAsFloat());
1035
- }
1036
-
1037
- Vec4 Vec4::sATan2(Vec4Arg inY, Vec4Arg inX)
1038
- {
1039
- UVec4 sign_mask = UVec4::sReplicate(0x80000000U);
1040
-
1041
- // Determine absolute value and sign of y
1042
- UVec4 y_sign = UVec4::sAnd(inY.ReinterpretAsInt(), sign_mask);
1043
- Vec4 y_abs = Vec4::sXor(inY, y_sign.ReinterpretAsFloat());
1044
-
1045
- // Determine absolute value and sign of x
1046
- UVec4 x_sign = UVec4::sAnd(inX.ReinterpretAsInt(), sign_mask);
1047
- Vec4 x_abs = Vec4::sXor(inX, x_sign.ReinterpretAsFloat());
1048
-
1049
- // Always divide smallest / largest to avoid dividing by zero
1050
- UVec4 x_is_numerator = Vec4::sLess(x_abs, y_abs);
1051
- Vec4 numerator = Vec4::sSelect(y_abs, x_abs, x_is_numerator);
1052
- Vec4 denominator = Vec4::sSelect(x_abs, y_abs, x_is_numerator);
1053
- Vec4 atan = (numerator / denominator).ATan();
1054
-
1055
- // If we calculated x / y instead of y / x the result is PI / 2 - result (note that this is true because we know the result is positive because the input was positive)
1056
- atan = Vec4::sSelect(atan, Vec4::sReplicate(0.5f * JPH_PI) - atan, x_is_numerator);
1057
-
1058
- // Now we need to map to the correct quadrant
1059
- // x_sign y_sign result
1060
- // +1 +1 atan
1061
- // -1 +1 -atan + PI
1062
- // -1 -1 atan - PI
1063
- // +1 -1 -atan
1064
- // This can be written as: x_sign * y_sign * (atan - (x_sign < 0? PI : 0))
1065
- atan -= Vec4::sAnd(x_sign.ArithmeticShiftRight<31>().ReinterpretAsFloat(), Vec4::sReplicate(JPH_PI));
1066
- atan = Vec4::sXor(atan, UVec4::sXor(x_sign, y_sign).ReinterpretAsFloat());
1067
- return atan;
1068
- }
1069
-
1070
- uint32 Vec4::CompressUnitVector() const
1071
- {
1072
- constexpr float cOneOverSqrt2 = 0.70710678f;
1073
- constexpr uint cNumBits = 9;
1074
- constexpr uint cMask = (1 << cNumBits) - 1;
1075
- constexpr uint cMaxValue = cMask - 1; // Need odd number of buckets to quantize to or else we can't encode 0
1076
- constexpr float cScale = float(cMaxValue) / (2.0f * cOneOverSqrt2);
1077
-
1078
- // Store sign bit
1079
- Vec4 v = *this;
1080
- uint32 max_element = v.Abs().GetHighestComponentIndex();
1081
- uint32 value = 0;
1082
- if (v[max_element] < 0.0f)
1083
- {
1084
- value = 0x80000000u;
1085
- v = -v;
1086
- }
1087
-
1088
- // Store highest component
1089
- value |= max_element << 29;
1090
-
1091
- // Store the other three components in a compressed format
1092
- UVec4 compressed = Vec4::sClamp((v + Vec4::sReplicate(cOneOverSqrt2)) * cScale + Vec4::sReplicate(0.5f), Vec4::sZero(), Vec4::sReplicate(cMaxValue)).ToInt();
1093
- switch (max_element)
1094
- {
1095
- case 0:
1096
- compressed = compressed.Swizzle<SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_UNUSED>();
1097
- break;
1098
-
1099
- case 1:
1100
- compressed = compressed.Swizzle<SWIZZLE_X, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_UNUSED>();
1101
- break;
1102
-
1103
- case 2:
1104
- compressed = compressed.Swizzle<SWIZZLE_X, SWIZZLE_Y, SWIZZLE_W, SWIZZLE_UNUSED>();
1105
- break;
1106
- }
1107
-
1108
- value |= compressed.GetX();
1109
- value |= compressed.GetY() << cNumBits;
1110
- value |= compressed.GetZ() << 2 * cNumBits;
1111
- return value;
1112
- }
1113
-
1114
- Vec4 Vec4::sDecompressUnitVector(uint32 inValue)
1115
- {
1116
- constexpr float cOneOverSqrt2 = 0.70710678f;
1117
- constexpr uint cNumBits = 9;
1118
- constexpr uint cMask = (1u << cNumBits) - 1;
1119
- constexpr uint cMaxValue = cMask - 1; // Need odd number of buckets to quantize to or else we can't encode 0
1120
- constexpr float cScale = 2.0f * cOneOverSqrt2 / float(cMaxValue);
1121
-
1122
- // Restore three components
1123
- Vec4 v = Vec4(UVec4(inValue & cMask, (inValue >> cNumBits) & cMask, (inValue >> (2 * cNumBits)) & cMask, 0).ToFloat()) * cScale - Vec4(cOneOverSqrt2, cOneOverSqrt2, cOneOverSqrt2, 0.0f);
1124
- JPH_ASSERT(v.GetW() == 0.0f);
1125
-
1126
- // Restore the highest component
1127
- v.SetW(sqrt(max(1.0f - v.LengthSq(), 0.0f)));
1128
-
1129
- // Extract sign
1130
- if ((inValue & 0x80000000u) != 0)
1131
- v = -v;
1132
-
1133
- // Swizzle the components in place
1134
- switch ((inValue >> 29) & 3)
1135
- {
1136
- case 0:
1137
- v = v.Swizzle<SWIZZLE_W, SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z>();
1138
- break;
1139
-
1140
- case 1:
1141
- v = v.Swizzle<SWIZZLE_X, SWIZZLE_W, SWIZZLE_Y, SWIZZLE_Z>();
1142
- break;
1143
-
1144
- case 2:
1145
- v = v.Swizzle<SWIZZLE_X, SWIZZLE_Y, SWIZZLE_W, SWIZZLE_Z>();
1146
- break;
1147
- }
1148
-
1149
- return v;
1150
- }
1151
-
1152
- JPH_NAMESPACE_END