@bloomengine/engine 0.3.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.
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/native/android/Cargo.lock +1848 -0
- package/native/android/Cargo.toml +20 -0
- package/native/android/src/lib.rs +1747 -0
- package/native/ios/Cargo.lock +1688 -0
- package/native/ios/Cargo.toml +19 -0
- package/native/ios/src/lib.rs +2258 -0
- package/native/linux/Cargo.lock +1719 -0
- package/native/linux/Cargo.toml +22 -0
- package/native/linux/src/lib.rs +2236 -0
- package/native/macos/Cargo.lock +3310 -0
- package/native/macos/Cargo.toml +29 -0
- package/native/macos/src/lib.rs +3444 -0
- package/native/shared/Cargo.lock +1898 -0
- package/native/shared/Cargo.toml +42 -0
- package/native/shared/assets/default_font.ttf +0 -0
- package/native/shared/build.rs +77 -0
- package/native/shared/shaders/common/fog.wgsl +16 -0
- package/native/shared/shaders/common/imposter.wgsl +112 -0
- package/native/shared/shaders/common/pbr.wgsl +186 -0
- package/native/shared/shaders/common/shadows.wgsl +77 -0
- package/native/shared/shaders/common/sky.wgsl +8 -0
- package/native/shared/shaders/common/tonemap.wgsl +25 -0
- package/native/shared/shaders/impulse_field.wgsl +53 -0
- package/native/shared/shaders/material_abi.wgsl +360 -0
- package/native/shared/shaders/materials/test_minimal.wgsl +42 -0
- package/native/shared/src/audio.rs +363 -0
- package/native/shared/src/custom_shaders.rs +104 -0
- package/native/shared/src/drs.rs +211 -0
- package/native/shared/src/engine.rs +186 -0
- package/native/shared/src/frame_callbacks.rs +88 -0
- package/native/shared/src/geometry.rs +236 -0
- package/native/shared/src/handles.rs +76 -0
- package/native/shared/src/input.rs +273 -0
- package/native/shared/src/jolt_sys.rs +822 -0
- package/native/shared/src/lib.rs +43 -0
- package/native/shared/src/models.rs +1941 -0
- package/native/shared/src/physics_jolt.rs +1528 -0
- package/native/shared/src/picking.rs +298 -0
- package/native/shared/src/postfx.rs +339 -0
- package/native/shared/src/profiler.rs +416 -0
- package/native/shared/src/renderer/atmosphere_lut.rs +573 -0
- package/native/shared/src/renderer/brdf_lut.rs +154 -0
- package/native/shared/src/renderer/formats.rs +778 -0
- package/native/shared/src/renderer/graph.rs +465 -0
- package/native/shared/src/renderer/hot_reload.rs +390 -0
- package/native/shared/src/renderer/impulse_field.rs +455 -0
- package/native/shared/src/renderer/material_pipeline.rs +604 -0
- package/native/shared/src/renderer/material_system.rs +2106 -0
- package/native/shared/src/renderer/mod.rs +13923 -0
- package/native/shared/src/renderer/planar_reflection.rs +458 -0
- package/native/shared/src/renderer/post_pass.rs +249 -0
- package/native/shared/src/renderer/shader_include.rs +205 -0
- package/native/shared/src/renderer/shader_library.rs +134 -0
- package/native/shared/src/renderer/shaders.rs +5855 -0
- package/native/shared/src/renderer/transient.rs +576 -0
- package/native/shared/src/renderer/types.rs +259 -0
- package/native/shared/src/renderer/util.rs +151 -0
- package/native/shared/src/scene.rs +1066 -0
- package/native/shared/src/sdf_cache.rs +274 -0
- package/native/shared/src/shadows.rs +551 -0
- package/native/shared/src/staging.rs +90 -0
- package/native/shared/src/string_header.rs +35 -0
- package/native/shared/src/text_renderer.rs +456 -0
- package/native/shared/src/textures.rs +154 -0
- package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.cpp +242 -0
- package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.h +121 -0
- package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeToBuffer.h +296 -0
- package/native/third_party/JoltPhysics/Jolt/AABBTree/NodeCodec/NodeCodecQuadTreeHalfFloat.h +323 -0
- package/native/third_party/JoltPhysics/Jolt/AABBTree/TriangleCodec/TriangleCodecIndexed8BitPackSOA4Flags.h +555 -0
- package/native/third_party/JoltPhysics/Jolt/ConfigurationString.h +112 -0
- package/native/third_party/JoltPhysics/Jolt/Core/ARMNeon.h +94 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Array.h +713 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Atomics.h +44 -0
- package/native/third_party/JoltPhysics/Jolt/Core/BinaryHeap.h +96 -0
- package/native/third_party/JoltPhysics/Jolt/Core/ByteBuffer.h +74 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Color.cpp +38 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Color.h +98 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Core.h +652 -0
- package/native/third_party/JoltPhysics/Jolt/Core/FPControlWord.h +143 -0
- package/native/third_party/JoltPhysics/Jolt/Core/FPException.h +96 -0
- package/native/third_party/JoltPhysics/Jolt/Core/FPFlushDenormals.h +43 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Factory.cpp +92 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Factory.h +54 -0
- package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.h +122 -0
- package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl +215 -0
- package/native/third_party/JoltPhysics/Jolt/Core/HashCombine.h +234 -0
- package/native/third_party/JoltPhysics/Jolt/Core/HashTable.h +876 -0
- package/native/third_party/JoltPhysics/Jolt/Core/InsertionSort.h +58 -0
- package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.cpp +27 -0
- package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.h +38 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.h +311 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.inl +56 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.cpp +65 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.h +62 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp +364 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.h +101 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.cpp +230 -0
- package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.h +85 -0
- package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.cpp +51 -0
- package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.h +67 -0
- package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.h +182 -0
- package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.inl +351 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Memory.cpp +85 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Memory.h +85 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Mutex.h +223 -0
- package/native/third_party/JoltPhysics/Jolt/Core/MutexArray.h +98 -0
- package/native/third_party/JoltPhysics/Jolt/Core/NonCopyable.h +18 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Profiler.cpp +677 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Profiler.h +301 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Profiler.inl +90 -0
- package/native/third_party/JoltPhysics/Jolt/Core/QuickSort.h +137 -0
- package/native/third_party/JoltPhysics/Jolt/Core/RTTI.cpp +149 -0
- package/native/third_party/JoltPhysics/Jolt/Core/RTTI.h +436 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Reference.h +244 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Result.h +174 -0
- package/native/third_party/JoltPhysics/Jolt/Core/STLAlignedAllocator.h +72 -0
- package/native/third_party/JoltPhysics/Jolt/Core/STLAllocator.h +127 -0
- package/native/third_party/JoltPhysics/Jolt/Core/STLLocalAllocator.h +170 -0
- package/native/third_party/JoltPhysics/Jolt/Core/STLTempAllocator.h +80 -0
- package/native/third_party/JoltPhysics/Jolt/Core/ScopeExit.h +49 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.cpp +135 -0
- package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.h +68 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StaticArray.h +329 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StreamIn.h +120 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StreamOut.h +97 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StreamUtils.h +168 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StreamWrapper.h +53 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StridedPtr.h +63 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StringTools.cpp +101 -0
- package/native/third_party/JoltPhysics/Jolt/Core/StringTools.h +38 -0
- package/native/third_party/JoltPhysics/Jolt/Core/TempAllocator.h +209 -0
- package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.cpp +37 -0
- package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.h +58 -0
- package/native/third_party/JoltPhysics/Jolt/Core/UnorderedMap.h +80 -0
- package/native/third_party/JoltPhysics/Jolt/Core/UnorderedSet.h +32 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/AABox.h +313 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/AABox4.h +224 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/ClipPoly.h +200 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/ClosestPoint.h +498 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.cpp +1467 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.h +276 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.cpp +335 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.h +105 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexSupport.h +188 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/EPAConvexHullBuilder.h +845 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/EPAPenetrationDepth.h +557 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/Ellipse.h +77 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/GJKClosestPoint.h +945 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/IndexedTriangle.h +130 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.cpp +222 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.h +19 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/MortonCode.h +40 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.cpp +178 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.h +39 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/Plane.h +104 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/RayAABox.h +241 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/RayCapsule.h +37 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/RayCylinder.h +101 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/RaySphere.h +96 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/RayTriangle.h +158 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/Sphere.h +72 -0
- package/native/third_party/JoltPhysics/Jolt/Geometry/Triangle.h +34 -0
- package/native/third_party/JoltPhysics/Jolt/Jolt.cmake +703 -0
- package/native/third_party/JoltPhysics/Jolt/Jolt.h +16 -0
- package/native/third_party/JoltPhysics/Jolt/Jolt.natvis +116 -0
- package/native/third_party/JoltPhysics/Jolt/Math/BVec16.h +99 -0
- package/native/third_party/JoltPhysics/Jolt/Math/BVec16.inl +177 -0
- package/native/third_party/JoltPhysics/Jolt/Math/DMat44.h +158 -0
- package/native/third_party/JoltPhysics/Jolt/Math/DMat44.inl +310 -0
- package/native/third_party/JoltPhysics/Jolt/Math/DVec3.h +291 -0
- package/native/third_party/JoltPhysics/Jolt/Math/DVec3.inl +941 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Double3.h +48 -0
- package/native/third_party/JoltPhysics/Jolt/Math/DynMatrix.h +31 -0
- package/native/third_party/JoltPhysics/Jolt/Math/EigenValueSymmetric.h +177 -0
- package/native/third_party/JoltPhysics/Jolt/Math/FindRoot.h +42 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Float2.h +36 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Float3.h +50 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Float4.h +44 -0
- package/native/third_party/JoltPhysics/Jolt/Math/GaussianElimination.h +102 -0
- package/native/third_party/JoltPhysics/Jolt/Math/HalfFloat.h +208 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Mat44.h +243 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Mat44.inl +952 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Math.h +208 -0
- package/native/third_party/JoltPhysics/Jolt/Math/MathTypes.h +32 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Matrix.h +259 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Quat.h +268 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Quat.inl +406 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Real.h +44 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Swizzle.h +19 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Trigonometry.h +79 -0
- package/native/third_party/JoltPhysics/Jolt/Math/UVec4.h +232 -0
- package/native/third_party/JoltPhysics/Jolt/Math/UVec4.inl +636 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Vec3.cpp +71 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Vec3.h +308 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Vec3.inl +942 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Vec4.h +320 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Vec4.inl +1152 -0
- package/native/third_party/JoltPhysics/Jolt/Math/Vector.h +211 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/GetPrimitiveTypeOfType.h +54 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.cpp +38 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.h +337 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.cpp +252 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.h +57 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.cpp +165 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.h +57 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.cpp +635 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.h +148 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.cpp +166 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.h +101 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.cpp +418 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.h +55 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.cpp +255 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.h +62 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTypes.h +26 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttribute.h +111 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeEnum.h +67 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeTyped.h +60 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.cpp +15 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.h +170 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.cpp +70 -0
- package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.h +45 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/AllowedDOFs.h +68 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.cpp +426 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.h +452 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.inl +197 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyAccess.h +68 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyActivationListener.h +28 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.cpp +234 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.h +124 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyFilter.h +130 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyID.h +101 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.cpp +1099 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.h +324 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLock.h +111 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockInterface.h +134 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockMulti.h +120 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.cpp +1220 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.h +403 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyPair.h +36 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyType.h +19 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.cpp +185 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.h +58 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.cpp +92 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.h +308 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.inl +178 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionQuality.h +31 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionType.h +17 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.cpp +354 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.h +159 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.cpp +59 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.h +157 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterID.h +98 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.cpp +1933 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.h +752 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/AABoxCast.h +20 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdgeMode.h +17 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdges.h +114 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BackFaceMode.h +16 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.cpp +16 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.h +109 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.cpp +313 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h +38 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h +148 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h +92 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceTable.h +64 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.cpp +629 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h +108 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h +56 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterMask.h +35 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterTable.h +66 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.cpp +1768 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.h +389 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.cpp +107 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.h +46 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastResult.h +37 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.cpp +223 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.h +49 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollectFacesMode.h +16 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.cpp +155 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.h +56 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollidePointResult.h +25 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShape.h +106 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShapeVsShapePerLeaf.h +94 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h +110 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVerticesVsTriangles.h +102 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.cpp +121 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.h +50 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollector.h +109 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollectorImpl.h +219 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.cpp +107 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.h +97 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.cpp +35 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.h +97 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ContactListener.h +143 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.cpp +213 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.h +48 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.cpp +32 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.h +46 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.cpp +38 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.h +130 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/InternalEdgeRemovingCollector.h +279 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.cpp +271 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.h +44 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.cpp +448 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.h +77 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.cpp +62 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.h +110 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayer.h +111 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterMask.h +52 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterTable.h +78 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.cpp +35 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.h +57 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.cpp +38 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.h +37 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/RayCast.h +87 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.cpp +318 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.h +115 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.cpp +438 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.h +129 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.cpp +433 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.h +354 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShapeVisitors.h +461 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.cpp +1311 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.h +202 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.cpp +566 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.h +150 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.cpp +418 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.h +126 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.cpp +87 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.h +80 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.cpp +64 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.h +75 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/GetTrianglesContext.h +248 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.cpp +2754 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.h +380 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.cpp +1305 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.h +228 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.cpp +596 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.h +176 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.cpp +217 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h +140 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.cpp +541 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.h +147 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h +319 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.cpp +333 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h +161 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaleHelpers.h +83 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.cpp +238 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.h +145 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.cpp +325 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.h +466 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.cpp +347 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.h +125 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.cpp +674 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.h +139 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeID.h +138 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeIDPair.h +65 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.cpp +453 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.gliffy +1 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h +135 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.cpp +691 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.h +132 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.cpp +430 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.h +143 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeCast.h +173 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeFilter.h +73 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilter.h +40 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilterWrapper.h +58 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SortReverseAndStore.h +48 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.cpp +180 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.h +194 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/CalculateSolverSteps.h +70 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.cpp +246 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.h +133 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.cpp +73 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.h +243 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.cpp +289 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.h +100 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h +257 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h +682 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h +276 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h +195 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h +222 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h +246 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h +239 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h +196 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h +283 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h +246 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SpringPart.h +169 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h +597 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.cpp +1804 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.h +524 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.cpp +266 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.h +120 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.cpp +215 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.h +96 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.cpp +188 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.h +116 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.cpp +443 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.h +205 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.cpp +43 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.h +66 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.cpp +458 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.h +191 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.cpp +85 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.h +76 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.cpp +308 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.h +54 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.cpp +157 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.h +94 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.cpp +253 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.h +137 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.cpp +189 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.h +118 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.cpp +900 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.h +289 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.cpp +501 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.h +198 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.cpp +35 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.h +70 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.cpp +524 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.h +197 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.cpp +56 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.h +65 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.cpp +17 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.h +159 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/EActivation.h +16 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/EPhysicsUpdateError.h +37 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.cpp +492 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.h +144 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.cpp +582 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.h +187 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsLock.h +169 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.cpp +261 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.h +104 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSettings.h +125 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsStepListener.h +37 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.cpp +2915 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.h +391 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.cpp +25 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.h +176 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.cpp +744 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.h +245 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyContactListener.h +55 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.cpp +128 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.h +75 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyManifold.h +74 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp +1501 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.h +333 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.cpp +354 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.h +73 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.cpp +1487 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.h +390 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyUpdateContext.h +63 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyVertex.h +36 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorder.h +136 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.cpp +90 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.h +50 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.cpp +306 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.h +119 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.cpp +547 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.h +169 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.cpp +33 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.h +33 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.cpp +376 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.h +146 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.cpp +703 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.h +252 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.cpp +17 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.h +87 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.cpp +81 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.h +39 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.cpp +122 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.h +93 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.cpp +52 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.h +56 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.cpp +159 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.h +87 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.cpp +93 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.h +148 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.cpp +866 -0
- package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.h +205 -0
- package/native/third_party/JoltPhysics/Jolt/RegisterTypes.cpp +204 -0
- package/native/third_party/JoltPhysics/Jolt/RegisterTypes.h +29 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.cpp +1107 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.h +383 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.cpp +168 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.h +48 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.cpp +158 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.h +130 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.cpp +80 -0
- package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.h +88 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.cpp +165 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.h +91 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.cpp +82 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.h +72 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.cpp +237 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.h +145 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.cpp +87 -0
- package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.h +82 -0
- package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.cpp +73 -0
- package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.h +84 -0
- package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.cpp +139 -0
- package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.h +52 -0
- package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.cpp +43 -0
- package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.h +28 -0
- package/native/third_party/JoltPhysics/LICENSE +7 -0
- package/native/third_party/JoltPhysics/README.md +173 -0
- package/native/third_party/bloom_jolt/CMakeLists.txt +78 -0
- package/native/third_party/bloom_jolt/include/bloom_jolt.h +519 -0
- package/native/third_party/bloom_jolt/src/bloom_jolt.cpp +1780 -0
- package/native/tvos/Cargo.lock +1692 -0
- package/native/tvos/Cargo.toml +22 -0
- package/native/tvos/src/lib.rs +3179 -0
- package/native/watchos/Cargo.lock +16 -0
- package/native/watchos/Cargo.toml +19 -0
- package/native/watchos/shaders/bloom_postfx.metal +99 -0
- package/native/watchos/src/BloomWatchApp.swift +1236 -0
- package/native/watchos/src/BloomWatchAudio.swift +179 -0
- package/native/watchos/src/audio.rs +55 -0
- package/native/watchos/src/draw_list.rs +223 -0
- package/native/watchos/src/ffi_stubs.rs +454 -0
- package/native/watchos/src/lib.rs +1013 -0
- package/native/watchos/src/models.rs +746 -0
- package/native/watchos/src/postfx.rs +91 -0
- package/native/watchos/src/scene.rs +534 -0
- package/native/watchos/src/textures.rs +184 -0
- package/native/web/Cargo.lock +1656 -0
- package/native/web/Cargo.toml +38 -0
- package/native/web/bloom_glue.js +218 -0
- package/native/web/build.sh +101 -0
- package/native/web/index.html +390 -0
- package/native/web/jolt_bridge.js +1311 -0
- package/native/web/src/lib.rs +2739 -0
- package/native/windows/Cargo.lock +1813 -0
- package/native/windows/Cargo.toml +31 -0
- package/native/windows/src/lib.rs +1933 -0
- package/package.json +558 -0
- package/src/audio/index.ts +151 -0
- package/src/core/colors.ts +56 -0
- package/src/core/index.ts +903 -0
- package/src/core/keys.ts +63 -0
- package/src/core/types.ts +102 -0
- package/src/index.ts +158 -0
- package/src/math/index.ts +502 -0
- package/src/mobile/index.ts +294 -0
- package/src/models/index.ts +859 -0
- package/src/physics/index.ts +1072 -0
- package/src/scene/index.ts +570 -0
- package/src/shapes/index.ts +120 -0
- package/src/text/index.ts +48 -0
- package/src/textures/index.ts +173 -0
- package/src/world/index.ts +22 -0
- package/src/world/loader.ts +385 -0
- package/src/world/prefab.ts +205 -0
- package/src/world/saver.ts +61 -0
- package/src/world/terrain.ts +254 -0
- package/src/world/types.ts +136 -0
- package/src/world/validate.ts +202 -0
- package/src/world/version.ts +47 -0
|
@@ -0,0 +1,245 @@
|
|
|
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/Core/Reference.h>
|
|
8
|
+
#include <Jolt/Core/Result.h>
|
|
9
|
+
#include <Jolt/Physics/Body/BodyCreationSettings.h>
|
|
10
|
+
#include <Jolt/Physics/Constraints/TwoBodyConstraint.h>
|
|
11
|
+
#include <Jolt/Skeleton/Skeleton.h>
|
|
12
|
+
#include <Jolt/Skeleton/SkeletonPose.h>
|
|
13
|
+
#include <Jolt/Physics/EActivation.h>
|
|
14
|
+
|
|
15
|
+
JPH_NAMESPACE_BEGIN
|
|
16
|
+
|
|
17
|
+
class Ragdoll;
|
|
18
|
+
class PhysicsSystem;
|
|
19
|
+
|
|
20
|
+
/// Contains the structure of a ragdoll
|
|
21
|
+
class JPH_EXPORT RagdollSettings : public RefTarget<RagdollSettings>
|
|
22
|
+
{
|
|
23
|
+
JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(JPH_EXPORT, RagdollSettings)
|
|
24
|
+
|
|
25
|
+
public:
|
|
26
|
+
/// Stabilize the constraints of the ragdoll
|
|
27
|
+
/// @return True on success, false on failure.
|
|
28
|
+
bool Stabilize();
|
|
29
|
+
|
|
30
|
+
/// Initializes the constraint priorities so that constraints near the leaves of the ragdoll have a lower priority
|
|
31
|
+
/// than constraints near the root of the ragdoll.
|
|
32
|
+
/// @param inBasePriority The lowest priority that will be used in the ragdoll.
|
|
33
|
+
void CalculateConstraintPriorities(uint32 inBasePriority = 0);
|
|
34
|
+
|
|
35
|
+
/// After the ragdoll has been fully configured, call this function to automatically create and add a GroupFilterTable collision filter to all bodies
|
|
36
|
+
/// and configure them so that parent and children don't collide.
|
|
37
|
+
///
|
|
38
|
+
/// This will:
|
|
39
|
+
/// - Create a GroupFilterTable and assign it to all of the bodies in a ragdoll.
|
|
40
|
+
/// - Each body in your ragdoll will get a SubGroupID that is equal to the joint index in the Skeleton that it is attached to.
|
|
41
|
+
/// - Loop over all joints in the Skeleton and call GroupFilterTable::DisableCollision(joint index, parent joint index).
|
|
42
|
+
/// - When a pose is provided through inJointMatrices the function will detect collisions between joints
|
|
43
|
+
/// (they must be separated by more than inMinSeparationDistance to be treated as not colliding) and automatically disable collisions.
|
|
44
|
+
///
|
|
45
|
+
/// When you create an instance using Ragdoll::CreateRagdoll pass in a unique GroupID for each ragdoll (e.g. a simple counter), note that this number
|
|
46
|
+
/// should be unique throughout the PhysicsSystem, so if you have different types of ragdolls they should not share the same GroupID.
|
|
47
|
+
void DisableParentChildCollisions(const Mat44 *inJointMatrices = nullptr, float inMinSeparationDistance = 0.0f);
|
|
48
|
+
|
|
49
|
+
/// Saves the state of this object in binary form to inStream.
|
|
50
|
+
/// @param inStream The stream to save the state to
|
|
51
|
+
/// @param inSaveShapes If the shapes should be saved as well (these could be shared between ragdolls, in which case the calling application may want to write custom code to restore them)
|
|
52
|
+
/// @param inSaveGroupFilter If the group filter should be saved as well (these could be shared)
|
|
53
|
+
void SaveBinaryState(StreamOut &inStream, bool inSaveShapes, bool inSaveGroupFilter) const;
|
|
54
|
+
|
|
55
|
+
using RagdollResult = Result<Ref<RagdollSettings>>;
|
|
56
|
+
|
|
57
|
+
/// Restore a saved ragdoll from inStream
|
|
58
|
+
static RagdollResult sRestoreFromBinaryState(StreamIn &inStream);
|
|
59
|
+
|
|
60
|
+
/// Create ragdoll instance from these settings
|
|
61
|
+
/// @return Newly created ragdoll or null when out of bodies
|
|
62
|
+
Ragdoll * CreateRagdoll(CollisionGroup::GroupID inCollisionGroup, uint64 inUserData, PhysicsSystem *inSystem) const;
|
|
63
|
+
|
|
64
|
+
/// Access to the skeleton of this ragdoll
|
|
65
|
+
const Skeleton * GetSkeleton() const { return mSkeleton; }
|
|
66
|
+
Skeleton * GetSkeleton() { return mSkeleton; }
|
|
67
|
+
|
|
68
|
+
/// Calculate the map needed for GetBodyIndexToConstraintIndex()
|
|
69
|
+
void CalculateBodyIndexToConstraintIndex();
|
|
70
|
+
|
|
71
|
+
/// Get table that maps a body index to the constraint index with which it is connected to its parent. -1 if there is no constraint associated with the body.
|
|
72
|
+
/// Note that this will only tell you which constraint connects the body to its parent, it will not look in the additional constraint list.
|
|
73
|
+
const Array<int> & GetBodyIndexToConstraintIndex() const { return mBodyIndexToConstraintIndex; }
|
|
74
|
+
|
|
75
|
+
/// Map a single body index to a constraint index
|
|
76
|
+
int GetConstraintIndexForBodyIndex(int inBodyIndex) const { return mBodyIndexToConstraintIndex[inBodyIndex]; }
|
|
77
|
+
|
|
78
|
+
/// Calculate the map needed for GetConstraintIndexToBodyIdxPair()
|
|
79
|
+
void CalculateConstraintIndexToBodyIdxPair();
|
|
80
|
+
|
|
81
|
+
using BodyIdxPair = std::pair<int, int>;
|
|
82
|
+
|
|
83
|
+
/// Table that maps a constraint index (index in mConstraints) to the indices of the bodies that the constraint is connected to (index in mBodyIDs)
|
|
84
|
+
const Array<BodyIdxPair> & GetConstraintIndexToBodyIdxPair() const { return mConstraintIndexToBodyIdxPair; }
|
|
85
|
+
|
|
86
|
+
/// Map a single constraint index (index in mConstraints) to the indices of the bodies that the constraint is connected to (index in mBodyIDs)
|
|
87
|
+
BodyIdxPair GetBodyIndicesForConstraintIndex(int inConstraintIndex) const { return mConstraintIndexToBodyIdxPair[inConstraintIndex]; }
|
|
88
|
+
|
|
89
|
+
/// A single rigid body sub part of the ragdoll
|
|
90
|
+
class Part : public BodyCreationSettings
|
|
91
|
+
{
|
|
92
|
+
JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(JPH_EXPORT, Part)
|
|
93
|
+
|
|
94
|
+
public:
|
|
95
|
+
Ref<TwoBodyConstraintSettings> mToParent;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/// List of ragdoll parts
|
|
99
|
+
using PartVector = Array<Part>; ///< The constraint that connects this part to its parent part (should be null for the root)
|
|
100
|
+
|
|
101
|
+
/// A constraint that connects two bodies in a ragdoll (for non parent child related constraints)
|
|
102
|
+
class AdditionalConstraint
|
|
103
|
+
{
|
|
104
|
+
JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(JPH_EXPORT, AdditionalConstraint)
|
|
105
|
+
|
|
106
|
+
public:
|
|
107
|
+
/// Constructors
|
|
108
|
+
AdditionalConstraint() = default;
|
|
109
|
+
AdditionalConstraint(int inBodyIdx1, int inBodyIdx2, TwoBodyConstraintSettings *inConstraint) : mBodyIdx { inBodyIdx1, inBodyIdx2 }, mConstraint(inConstraint) { }
|
|
110
|
+
|
|
111
|
+
int mBodyIdx[2]; ///< Indices of the bodies that this constraint connects
|
|
112
|
+
Ref<TwoBodyConstraintSettings> mConstraint; ///< The constraint that connects these bodies
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/// List of additional constraints
|
|
116
|
+
using AdditionalConstraintVector = Array<AdditionalConstraint>;
|
|
117
|
+
|
|
118
|
+
/// The skeleton for this ragdoll
|
|
119
|
+
Ref<Skeleton> mSkeleton;
|
|
120
|
+
|
|
121
|
+
/// For each of the joints, the body and constraint attaching it to its parent body (1-on-1 with mSkeleton.GetJoints())
|
|
122
|
+
PartVector mParts;
|
|
123
|
+
|
|
124
|
+
/// A list of constraints that connects two bodies in a ragdoll (for non parent child related constraints)
|
|
125
|
+
AdditionalConstraintVector mAdditionalConstraints;
|
|
126
|
+
|
|
127
|
+
private:
|
|
128
|
+
/// Table that maps a body index (index in mBodyIDs) to the constraint index with which it is connected to its parent. -1 if there is no constraint associated with the body.
|
|
129
|
+
Array<int> mBodyIndexToConstraintIndex;
|
|
130
|
+
|
|
131
|
+
/// Table that maps a constraint index (index in mConstraints) to the indices of the bodies that the constraint is connected to (index in mBodyIDs)
|
|
132
|
+
Array<BodyIdxPair> mConstraintIndexToBodyIdxPair;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/// Runtime ragdoll information
|
|
136
|
+
class JPH_EXPORT Ragdoll : public RefTarget<Ragdoll>, public NonCopyable
|
|
137
|
+
{
|
|
138
|
+
public:
|
|
139
|
+
JPH_OVERRIDE_NEW_DELETE
|
|
140
|
+
|
|
141
|
+
/// Constructor
|
|
142
|
+
explicit Ragdoll(PhysicsSystem *inSystem) : mSystem(inSystem) { }
|
|
143
|
+
|
|
144
|
+
/// Destructor
|
|
145
|
+
~Ragdoll();
|
|
146
|
+
|
|
147
|
+
/// Add bodies and constraints to the system and optionally activate the bodies
|
|
148
|
+
void AddToPhysicsSystem(EActivation inActivationMode, bool inLockBodies = true);
|
|
149
|
+
|
|
150
|
+
/// Remove bodies and constraints from the system
|
|
151
|
+
void RemoveFromPhysicsSystem(bool inLockBodies = true);
|
|
152
|
+
|
|
153
|
+
/// Wake up all bodies in the ragdoll
|
|
154
|
+
void Activate(bool inLockBodies = true);
|
|
155
|
+
|
|
156
|
+
/// Check if one or more of the bodies in the ragdoll are active.
|
|
157
|
+
/// Note that this involves locking the bodies (if inLockBodies is true) and looping over them. An alternative and possibly faster
|
|
158
|
+
/// way could be to install a BodyActivationListener and count the number of active bodies of a ragdoll as they're activated / deactivated
|
|
159
|
+
/// (basically check if the body that activates / deactivates is in GetBodyIDs() and increment / decrement a counter).
|
|
160
|
+
bool IsActive(bool inLockBodies = true) const;
|
|
161
|
+
|
|
162
|
+
/// Set the group ID on all bodies in the ragdoll
|
|
163
|
+
void SetGroupID(CollisionGroup::GroupID inGroupID, bool inLockBodies = true);
|
|
164
|
+
|
|
165
|
+
/// Set the ragdoll to a pose (calls BodyInterface::SetPositionAndRotation to instantly move the ragdoll)
|
|
166
|
+
void SetPose(const SkeletonPose &inPose, bool inLockBodies = true);
|
|
167
|
+
|
|
168
|
+
/// Lower level version of SetPose that directly takes the world space joint matrices
|
|
169
|
+
void SetPose(RVec3Arg inRootOffset, const Mat44 *inJointMatrices, bool inLockBodies = true);
|
|
170
|
+
|
|
171
|
+
/// Get the ragdoll pose (uses the world transform of the bodies to calculate the pose)
|
|
172
|
+
void GetPose(SkeletonPose &outPose, bool inLockBodies = true);
|
|
173
|
+
|
|
174
|
+
/// Lower level version of GetPose that directly returns the world space joint matrices
|
|
175
|
+
void GetPose(RVec3 &outRootOffset, Mat44 *outJointMatrices, bool inLockBodies = true);
|
|
176
|
+
|
|
177
|
+
/// This function calls ResetWarmStart on all constraints. It can be used after calling SetPose to reset previous frames impulses. See: Constraint::ResetWarmStart.
|
|
178
|
+
void ResetWarmStart();
|
|
179
|
+
|
|
180
|
+
/// Drive the ragdoll to a specific pose by setting velocities on each of the bodies so that it will reach inPose in inDeltaTime
|
|
181
|
+
void DriveToPoseUsingKinematics(const SkeletonPose &inPose, float inDeltaTime, bool inLockBodies = true);
|
|
182
|
+
|
|
183
|
+
/// Lower level version of DriveToPoseUsingKinematics that directly takes the world space joint matrices
|
|
184
|
+
void DriveToPoseUsingKinematics(RVec3Arg inRootOffset, const Mat44 *inJointMatrices, float inDeltaTime, bool inLockBodies = true);
|
|
185
|
+
|
|
186
|
+
/// Drive the ragdoll to a specific pose by activating the motors on each constraint
|
|
187
|
+
void DriveToPoseUsingMotors(const SkeletonPose &inPose);
|
|
188
|
+
|
|
189
|
+
/// Control the linear and velocity of all bodies in the ragdoll
|
|
190
|
+
void SetLinearAndAngularVelocity(Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity, bool inLockBodies = true);
|
|
191
|
+
|
|
192
|
+
/// Set the world space linear velocity of all bodies in the ragdoll.
|
|
193
|
+
void SetLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true);
|
|
194
|
+
|
|
195
|
+
/// Add a world space velocity (in m/s) to all bodies in the ragdoll.
|
|
196
|
+
void AddLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true);
|
|
197
|
+
|
|
198
|
+
/// Add impulse to all bodies of the ragdoll (center of mass of each of them)
|
|
199
|
+
void AddImpulse(Vec3Arg inImpulse, bool inLockBodies = true);
|
|
200
|
+
|
|
201
|
+
/// Get the position and orientation of the root of the ragdoll
|
|
202
|
+
void GetRootTransform(RVec3 &outPosition, Quat &outRotation, bool inLockBodies = true) const;
|
|
203
|
+
|
|
204
|
+
/// Get number of bodies in the ragdoll
|
|
205
|
+
size_t GetBodyCount() const { return mBodyIDs.size(); }
|
|
206
|
+
|
|
207
|
+
/// Access a body ID
|
|
208
|
+
BodyID GetBodyID(int inBodyIndex) const { return mBodyIDs[inBodyIndex]; }
|
|
209
|
+
|
|
210
|
+
/// Access to the array of body IDs
|
|
211
|
+
const Array<BodyID> & GetBodyIDs() const { return mBodyIDs; }
|
|
212
|
+
|
|
213
|
+
/// Get number of constraints in the ragdoll
|
|
214
|
+
size_t GetConstraintCount() const { return mConstraints.size(); }
|
|
215
|
+
|
|
216
|
+
/// Access a constraint by index
|
|
217
|
+
TwoBodyConstraint * GetConstraint(int inConstraintIndex) { return mConstraints[inConstraintIndex]; }
|
|
218
|
+
|
|
219
|
+
/// Access a constraint by index
|
|
220
|
+
const TwoBodyConstraint * GetConstraint(int inConstraintIndex) const { return mConstraints[inConstraintIndex]; }
|
|
221
|
+
|
|
222
|
+
/// Get world space bounding box for all bodies of the ragdoll
|
|
223
|
+
AABox GetWorldSpaceBounds(bool inLockBodies = true) const;
|
|
224
|
+
|
|
225
|
+
/// Get the settings object that created this ragdoll
|
|
226
|
+
const RagdollSettings * GetRagdollSettings() const { return mRagdollSettings; }
|
|
227
|
+
|
|
228
|
+
private:
|
|
229
|
+
/// For RagdollSettings::CreateRagdoll function
|
|
230
|
+
friend class RagdollSettings;
|
|
231
|
+
|
|
232
|
+
/// The settings that created this ragdoll
|
|
233
|
+
RefConst<RagdollSettings> mRagdollSettings;
|
|
234
|
+
|
|
235
|
+
/// The bodies and constraints that this ragdoll consists of (1-on-1 with mRagdollSettings->mParts)
|
|
236
|
+
Array<BodyID> mBodyIDs;
|
|
237
|
+
|
|
238
|
+
/// Array of constraints that connect the bodies together
|
|
239
|
+
Array<Ref<TwoBodyConstraint>> mConstraints;
|
|
240
|
+
|
|
241
|
+
/// Cached physics system
|
|
242
|
+
PhysicsSystem * mSystem;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
|
2
|
+
// SPDX-FileCopyrightText: 2024 Jorrit Rouwe
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
JPH_NAMESPACE_BEGIN
|
|
8
|
+
|
|
9
|
+
class Body;
|
|
10
|
+
class SoftBodyManifold;
|
|
11
|
+
|
|
12
|
+
/// Return value for the OnSoftBodyContactValidate callback. Determines if the contact will be processed or not.
|
|
13
|
+
enum class SoftBodyValidateResult
|
|
14
|
+
{
|
|
15
|
+
AcceptContact, ///< Accept this contact
|
|
16
|
+
RejectContact, ///< Reject this contact
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/// Contact settings for a soft body contact.
|
|
20
|
+
/// The values are filled in with their defaults by the system so the callback doesn't need to modify anything, but it can if it wants to.
|
|
21
|
+
class SoftBodyContactSettings
|
|
22
|
+
{
|
|
23
|
+
public:
|
|
24
|
+
float mInvMassScale1 = 1.0f; ///< Scale factor for the inverse mass of the soft body (0 = infinite mass, 1 = use original mass, 2 = body has half the mass). For the same contact pair, you should strive to keep the value the same over time.
|
|
25
|
+
float mInvMassScale2 = 1.0f; ///< Scale factor for the inverse mass of the other body (0 = infinite mass, 1 = use original mass, 2 = body has half the mass). For the same contact pair, you should strive to keep the value the same over time.
|
|
26
|
+
float mInvInertiaScale2 = 1.0f; ///< Scale factor for the inverse inertia of the other body (usually same as mInvMassScale2)
|
|
27
|
+
bool mIsSensor; ///< If the contact should be treated as a sensor vs body contact (no collision response)
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/// A listener class that receives collision contact events for soft bodies against rigid bodies.
|
|
31
|
+
/// It can be registered with the PhysicsSystem.
|
|
32
|
+
class SoftBodyContactListener
|
|
33
|
+
{
|
|
34
|
+
public:
|
|
35
|
+
/// Ensure virtual destructor
|
|
36
|
+
virtual ~SoftBodyContactListener() = default;
|
|
37
|
+
|
|
38
|
+
/// Called whenever the soft body's aabox overlaps with another body's aabox (so receiving this callback doesn't tell if any of the vertices will collide).
|
|
39
|
+
/// This callback can be used to change the behavior of the collision response for all vertices in the soft body or to completely reject the contact.
|
|
40
|
+
/// Note that this callback is called when all bodies are locked, so don't use any locking functions!
|
|
41
|
+
/// @param inSoftBody The soft body that collided. It is safe to access this as the soft body is only updated on the current thread.
|
|
42
|
+
/// @param inOtherBody The other body that collided. Note that accessing the position/orientation/velocity of inOtherBody may result in a race condition as other threads may be modifying the body at the same time.
|
|
43
|
+
/// @param ioSettings The settings for all contact points that are generated by this collision.
|
|
44
|
+
/// @return Whether the contact should be processed or not.
|
|
45
|
+
virtual SoftBodyValidateResult OnSoftBodyContactValidate([[maybe_unused]] const Body &inSoftBody, [[maybe_unused]] const Body &inOtherBody, [[maybe_unused]] SoftBodyContactSettings &ioSettings) { return SoftBodyValidateResult::AcceptContact; }
|
|
46
|
+
|
|
47
|
+
/// Called after all contact points for a soft body have been handled.
|
|
48
|
+
/// Note that this callback is called when all bodies are locked, so don't use any locking functions!
|
|
49
|
+
/// You will receive a single callback for a soft body per simulation step for performance reasons, this callback will apply to all vertices in the soft body.
|
|
50
|
+
/// @param inSoftBody The soft body that collided. It is safe to access this as the soft body is only updated on the current thread.
|
|
51
|
+
/// @param inManifold The manifold that describes which vertices collide and with what body they collide. Other bodies may be modified by other threads during this callback.
|
|
52
|
+
virtual void OnSoftBodyContactAdded([[maybe_unused]] const Body &inSoftBody, const SoftBodyManifold &inManifold) { /* Do nothing */ }
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
|
2
|
+
// SPDX-FileCopyrightText: 2023 Jorrit Rouwe
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
#include <Jolt/Jolt.h>
|
|
6
|
+
|
|
7
|
+
#include <Jolt/Physics/SoftBody/SoftBodyCreationSettings.h>
|
|
8
|
+
#include <Jolt/ObjectStream/TypeDeclarations.h>
|
|
9
|
+
#include <Jolt/Core/StreamIn.h>
|
|
10
|
+
#include <Jolt/Core/StreamOut.h>
|
|
11
|
+
|
|
12
|
+
JPH_NAMESPACE_BEGIN
|
|
13
|
+
|
|
14
|
+
JPH_IMPLEMENT_SERIALIZABLE_NON_VIRTUAL(SoftBodyCreationSettings)
|
|
15
|
+
{
|
|
16
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mSettings)
|
|
17
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mPosition)
|
|
18
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mRotation)
|
|
19
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mUserData)
|
|
20
|
+
JPH_ADD_ENUM_ATTRIBUTE(SoftBodyCreationSettings, mObjectLayer)
|
|
21
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mCollisionGroup)
|
|
22
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mNumIterations)
|
|
23
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mLinearDamping)
|
|
24
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mMaxLinearVelocity)
|
|
25
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mRestitution)
|
|
26
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mFriction)
|
|
27
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mPressure)
|
|
28
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mGravityFactor)
|
|
29
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mVertexRadius)
|
|
30
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mUpdatePosition)
|
|
31
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mMakeRotationIdentity)
|
|
32
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mAllowSleeping)
|
|
33
|
+
JPH_ADD_ATTRIBUTE(SoftBodyCreationSettings, mFacesDoubleSided)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
void SoftBodyCreationSettings::SaveBinaryState(StreamOut &inStream) const
|
|
37
|
+
{
|
|
38
|
+
inStream.Write(mPosition);
|
|
39
|
+
inStream.Write(mRotation);
|
|
40
|
+
inStream.Write(mUserData);
|
|
41
|
+
inStream.Write(mObjectLayer);
|
|
42
|
+
mCollisionGroup.SaveBinaryState(inStream);
|
|
43
|
+
inStream.Write(mNumIterations);
|
|
44
|
+
inStream.Write(mLinearDamping);
|
|
45
|
+
inStream.Write(mMaxLinearVelocity);
|
|
46
|
+
inStream.Write(mRestitution);
|
|
47
|
+
inStream.Write(mFriction);
|
|
48
|
+
inStream.Write(mPressure);
|
|
49
|
+
inStream.Write(mGravityFactor);
|
|
50
|
+
inStream.Write(mVertexRadius);
|
|
51
|
+
inStream.Write(mUpdatePosition);
|
|
52
|
+
inStream.Write(mMakeRotationIdentity);
|
|
53
|
+
inStream.Write(mAllowSleeping);
|
|
54
|
+
inStream.Write(mFacesDoubleSided);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
void SoftBodyCreationSettings::RestoreBinaryState(StreamIn &inStream)
|
|
58
|
+
{
|
|
59
|
+
inStream.Read(mPosition);
|
|
60
|
+
inStream.Read(mRotation);
|
|
61
|
+
inStream.Read(mUserData);
|
|
62
|
+
inStream.Read(mObjectLayer);
|
|
63
|
+
mCollisionGroup.RestoreBinaryState(inStream);
|
|
64
|
+
inStream.Read(mNumIterations);
|
|
65
|
+
inStream.Read(mLinearDamping);
|
|
66
|
+
inStream.Read(mMaxLinearVelocity);
|
|
67
|
+
inStream.Read(mRestitution);
|
|
68
|
+
inStream.Read(mFriction);
|
|
69
|
+
inStream.Read(mPressure);
|
|
70
|
+
inStream.Read(mGravityFactor);
|
|
71
|
+
inStream.Read(mVertexRadius);
|
|
72
|
+
inStream.Read(mUpdatePosition);
|
|
73
|
+
inStream.Read(mMakeRotationIdentity);
|
|
74
|
+
inStream.Read(mAllowSleeping);
|
|
75
|
+
inStream.Read(mFacesDoubleSided);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
void SoftBodyCreationSettings::SaveWithChildren(StreamOut &inStream, SharedSettingsToIDMap *ioSharedSettingsMap, MaterialToIDMap *ioMaterialMap, GroupFilterToIDMap *ioGroupFilterMap) const
|
|
79
|
+
{
|
|
80
|
+
// Save creation settings
|
|
81
|
+
SaveBinaryState(inStream);
|
|
82
|
+
|
|
83
|
+
// Save shared settings
|
|
84
|
+
if (ioSharedSettingsMap != nullptr && ioMaterialMap != nullptr)
|
|
85
|
+
mSettings->SaveWithMaterials(inStream, *ioSharedSettingsMap, *ioMaterialMap);
|
|
86
|
+
else
|
|
87
|
+
inStream.Write(~uint32(0));
|
|
88
|
+
|
|
89
|
+
// Save group filter
|
|
90
|
+
StreamUtils::SaveObjectReference(inStream, mCollisionGroup.GetGroupFilter(), ioGroupFilterMap);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
SoftBodyCreationSettings::SBCSResult SoftBodyCreationSettings::sRestoreWithChildren(StreamIn &inStream, IDToSharedSettingsMap &ioSharedSettingsMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap)
|
|
94
|
+
{
|
|
95
|
+
SBCSResult result;
|
|
96
|
+
|
|
97
|
+
// Read creation settings
|
|
98
|
+
SoftBodyCreationSettings settings;
|
|
99
|
+
settings.RestoreBinaryState(inStream);
|
|
100
|
+
if (inStream.IsEOF() || inStream.IsFailed())
|
|
101
|
+
{
|
|
102
|
+
result.SetError("Error reading body creation settings");
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Read shared settings
|
|
107
|
+
SoftBodySharedSettings::SettingsResult settings_result = SoftBodySharedSettings::sRestoreWithMaterials(inStream, ioSharedSettingsMap, ioMaterialMap);
|
|
108
|
+
if (settings_result.HasError())
|
|
109
|
+
{
|
|
110
|
+
result.SetError(settings_result.GetError());
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
settings.mSettings = settings_result.Get();
|
|
114
|
+
|
|
115
|
+
// Read group filter
|
|
116
|
+
Result gfresult = StreamUtils::RestoreObjectReference(inStream, ioGroupFilterMap);
|
|
117
|
+
if (gfresult.HasError())
|
|
118
|
+
{
|
|
119
|
+
result.SetError(gfresult.GetError());
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
settings.mCollisionGroup.SetGroupFilter(gfresult.Get());
|
|
123
|
+
|
|
124
|
+
result.Set(settings);
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
|
2
|
+
// SPDX-FileCopyrightText: 2023 Jorrit Rouwe
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include <Jolt/Physics/SoftBody/SoftBodySharedSettings.h>
|
|
8
|
+
#include <Jolt/Physics/Collision/ObjectLayer.h>
|
|
9
|
+
#include <Jolt/Physics/Collision/CollisionGroup.h>
|
|
10
|
+
#include <Jolt/ObjectStream/SerializableObject.h>
|
|
11
|
+
#include <Jolt/Core/StreamUtils.h>
|
|
12
|
+
|
|
13
|
+
JPH_NAMESPACE_BEGIN
|
|
14
|
+
|
|
15
|
+
/// This class contains the information needed to create a soft body object
|
|
16
|
+
/// Note: Soft bodies are still in development and come with several caveats. Read the Architecture and API documentation for more information!
|
|
17
|
+
class JPH_EXPORT SoftBodyCreationSettings
|
|
18
|
+
{
|
|
19
|
+
JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(JPH_EXPORT, SoftBodyCreationSettings)
|
|
20
|
+
|
|
21
|
+
public:
|
|
22
|
+
/// Constructor
|
|
23
|
+
SoftBodyCreationSettings() = default;
|
|
24
|
+
SoftBodyCreationSettings(const SoftBodySharedSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, ObjectLayer inObjectLayer) : mSettings(inSettings), mPosition(inPosition), mRotation(inRotation), mObjectLayer(inObjectLayer) { }
|
|
25
|
+
|
|
26
|
+
/// Saves the state of this object in binary form to inStream. Doesn't store the shared settings nor the group filter.
|
|
27
|
+
void SaveBinaryState(StreamOut &inStream) const;
|
|
28
|
+
|
|
29
|
+
/// Restore the state of this object from inStream. Doesn't restore the shared settings nor the group filter.
|
|
30
|
+
void RestoreBinaryState(StreamIn &inStream);
|
|
31
|
+
|
|
32
|
+
using GroupFilterToIDMap = StreamUtils::ObjectToIDMap<GroupFilter>;
|
|
33
|
+
using IDToGroupFilterMap = StreamUtils::IDToObjectMap<GroupFilter>;
|
|
34
|
+
using SharedSettingsToIDMap = SoftBodySharedSettings::SharedSettingsToIDMap;
|
|
35
|
+
using IDToSharedSettingsMap = SoftBodySharedSettings::IDToSharedSettingsMap;
|
|
36
|
+
using MaterialToIDMap = StreamUtils::ObjectToIDMap<PhysicsMaterial>;
|
|
37
|
+
using IDToMaterialMap = StreamUtils::IDToObjectMap<PhysicsMaterial>;
|
|
38
|
+
|
|
39
|
+
/// Save this body creation settings, its shared settings and group filter. Pass in an empty map in ioSharedSettingsMap / ioMaterialMap / ioGroupFilterMap or reuse the same map while saving multiple shapes to the same stream in order to avoid writing duplicates.
|
|
40
|
+
/// Pass nullptr to ioSharedSettingsMap and ioMaterial map to skip saving shared settings and materials
|
|
41
|
+
/// Pass nullptr to ioGroupFilterMap to skip saving group filters
|
|
42
|
+
void SaveWithChildren(StreamOut &inStream, SharedSettingsToIDMap *ioSharedSettingsMap, MaterialToIDMap *ioMaterialMap, GroupFilterToIDMap *ioGroupFilterMap) const;
|
|
43
|
+
|
|
44
|
+
using SBCSResult = Result<SoftBodyCreationSettings>;
|
|
45
|
+
|
|
46
|
+
/// Restore a shape, all its children and materials. Pass in an empty map in ioSharedSettingsMap / ioMaterialMap / ioGroupFilterMap or reuse the same map while reading multiple shapes from the same stream in order to restore duplicates.
|
|
47
|
+
static SBCSResult sRestoreWithChildren(StreamIn &inStream, IDToSharedSettingsMap &ioSharedSettingsMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap);
|
|
48
|
+
|
|
49
|
+
RefConst<SoftBodySharedSettings> mSettings; ///< Defines the configuration of this soft body
|
|
50
|
+
|
|
51
|
+
RVec3 mPosition { RVec3::sZero() }; ///< Initial position of the soft body
|
|
52
|
+
Quat mRotation { Quat::sIdentity() }; ///< Initial rotation of the soft body
|
|
53
|
+
|
|
54
|
+
/// User data value (can be used by application)
|
|
55
|
+
uint64 mUserData = 0;
|
|
56
|
+
|
|
57
|
+
///@name Collision settings
|
|
58
|
+
ObjectLayer mObjectLayer = 0; ///< The collision layer this body belongs to (determines if two objects can collide)
|
|
59
|
+
CollisionGroup mCollisionGroup; ///< The collision group this body belongs to (determines if two objects can collide)
|
|
60
|
+
|
|
61
|
+
uint32 mNumIterations = 5; ///< Number of solver iterations
|
|
62
|
+
float mLinearDamping = 0.1f; ///< Linear damping: dv/dt = -mLinearDamping * v. Value should be zero or positive and is usually close to 0.
|
|
63
|
+
float mMaxLinearVelocity = 500.0f; ///< Maximum linear velocity that a vertex can reach (m/s)
|
|
64
|
+
float mRestitution = 0.0f; ///< Restitution when colliding
|
|
65
|
+
float mFriction = 0.2f; ///< Friction coefficient when colliding
|
|
66
|
+
float mPressure = 0.0f; ///< n * R * T, amount of substance * ideal gas constant * absolute temperature, see https://en.wikipedia.org/wiki/Pressure
|
|
67
|
+
float mGravityFactor = 1.0f; ///< Value to multiply gravity with for this body
|
|
68
|
+
float mVertexRadius = 0.0f; ///< How big the particles are, can be used to push the vertices a little bit away from the surface of other bodies to prevent z-fighting
|
|
69
|
+
bool mUpdatePosition = true; ///< Update the position of the body while simulating (set to false for something that is attached to the static world)
|
|
70
|
+
bool mMakeRotationIdentity = true; ///< Bake specified mRotation in the vertices and set the body rotation to identity (simulation is slightly more accurate if the rotation of a soft body is kept to identity)
|
|
71
|
+
bool mAllowSleeping = true; ///< If this body can go to sleep or not
|
|
72
|
+
bool mFacesDoubleSided = false; ///< If the faces in this soft body should be treated as double sided for the purpose of collision detection (ray cast / collide shape / cast shape)
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
|
2
|
+
// SPDX-FileCopyrightText: 2024 Jorrit Rouwe
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include <Jolt/Physics/SoftBody/SoftBodyMotionProperties.h>
|
|
8
|
+
|
|
9
|
+
JPH_NAMESPACE_BEGIN
|
|
10
|
+
|
|
11
|
+
/// An interface to query which vertices of a soft body are colliding with other bodies
|
|
12
|
+
class SoftBodyManifold
|
|
13
|
+
{
|
|
14
|
+
public:
|
|
15
|
+
/// Get the vertices of the soft body for iterating
|
|
16
|
+
const Array<SoftBodyVertex> & GetVertices() const { return mVertices; }
|
|
17
|
+
|
|
18
|
+
/// Check if a vertex has collided with something in this update
|
|
19
|
+
JPH_INLINE bool HasContact(const SoftBodyVertex &inVertex) const
|
|
20
|
+
{
|
|
21
|
+
return inVertex.mHasContact;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/// Get the local space contact point (multiply by GetCenterOfMassTransform() of the soft body to get world space)
|
|
25
|
+
JPH_INLINE Vec3 GetLocalContactPoint(const SoftBodyVertex &inVertex) const
|
|
26
|
+
{
|
|
27
|
+
return inVertex.mPosition - inVertex.mCollisionPlane.SignedDistance(inVertex.mPosition) * inVertex.mCollisionPlane.GetNormal();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/// Get the contact normal for the vertex (assumes there is a contact).
|
|
31
|
+
JPH_INLINE Vec3 GetContactNormal(const SoftBodyVertex &inVertex) const
|
|
32
|
+
{
|
|
33
|
+
return -inVertex.mCollisionPlane.GetNormal();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// Get the body with which the vertex has collided in this update
|
|
37
|
+
JPH_INLINE BodyID GetContactBodyID(const SoftBodyVertex &inVertex) const
|
|
38
|
+
{
|
|
39
|
+
return inVertex.mHasContact? mCollidingShapes[inVertex.mCollidingShapeIndex].mBodyID : BodyID();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// Get the number of sensors that are in contact with the soft body
|
|
43
|
+
JPH_INLINE uint GetNumSensorContacts() const
|
|
44
|
+
{
|
|
45
|
+
return (uint)mCollidingSensors.size();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// Get the i-th sensor that is in contact with the soft body
|
|
49
|
+
JPH_INLINE BodyID GetSensorContactBodyID(uint inIndex) const
|
|
50
|
+
{
|
|
51
|
+
return mCollidingSensors[inIndex].mBodyID;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
private:
|
|
55
|
+
/// Allow SoftBodyMotionProperties to construct us
|
|
56
|
+
friend class SoftBodyMotionProperties;
|
|
57
|
+
|
|
58
|
+
/// Constructor
|
|
59
|
+
explicit SoftBodyManifold(const SoftBodyMotionProperties *inMotionProperties) :
|
|
60
|
+
mVertices(inMotionProperties->mVertices),
|
|
61
|
+
mCollidingShapes(inMotionProperties->mCollidingShapes),
|
|
62
|
+
mCollidingSensors(inMotionProperties->mCollidingSensors)
|
|
63
|
+
{
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
using CollidingShape = SoftBodyMotionProperties::CollidingShape;
|
|
67
|
+
using CollidingSensor = SoftBodyMotionProperties::CollidingSensor;
|
|
68
|
+
|
|
69
|
+
const Array<SoftBodyVertex> & mVertices;
|
|
70
|
+
const Array<CollidingShape> & mCollidingShapes;
|
|
71
|
+
const Array<CollidingSensor> & mCollidingSensors;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
JPH_NAMESPACE_END
|