@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,519 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* bloom_jolt.h — C ABI shim between Rust/Perry FFI and JoltPhysics 5.x
|
|
3
|
+
*
|
|
4
|
+
* This header is internal to the engine: Rust binds to it via extern "C", and
|
|
5
|
+
* the implementation in src/bloom_jolt.cpp calls into Jolt C++. It is NOT the
|
|
6
|
+
* Perry/TypeScript FFI surface — that sits one layer above in physics.rs and
|
|
7
|
+
* only sees f64 / i64 because of Perry's calling convention.
|
|
8
|
+
*
|
|
9
|
+
* Design notes (Tier 1):
|
|
10
|
+
* - Shape / body separation: shapes are reusable and refcounted.
|
|
11
|
+
* - POD structs for transforms, descriptors, hit results — packed layouts.
|
|
12
|
+
* - Batch-friendly queries: raycast_all / sync_transforms take buffers.
|
|
13
|
+
* - Contact events are polled (drained) after each step, not pushed.
|
|
14
|
+
* - All handles are uint64_t; 0 == BJ_INVALID.
|
|
15
|
+
*
|
|
16
|
+
* Thread safety: one world per process initially. bj_world_step must run on
|
|
17
|
+
* the thread that owns the world. Jolt internally threads broadphase +
|
|
18
|
+
* integration across num_threads workers.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#ifndef BLOOM_JOLT_H
|
|
22
|
+
#define BLOOM_JOLT_H
|
|
23
|
+
|
|
24
|
+
#include <stdint.h>
|
|
25
|
+
#include <stddef.h>
|
|
26
|
+
|
|
27
|
+
#ifdef __cplusplus
|
|
28
|
+
extern "C" {
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
/* ------------------------------------------------------------------ */
|
|
32
|
+
/* Handles */
|
|
33
|
+
/* ------------------------------------------------------------------ */
|
|
34
|
+
|
|
35
|
+
typedef uint64_t bj_world;
|
|
36
|
+
typedef uint64_t bj_shape;
|
|
37
|
+
typedef uint64_t bj_body;
|
|
38
|
+
typedef uint64_t bj_constraint;
|
|
39
|
+
typedef uint64_t bj_character;
|
|
40
|
+
|
|
41
|
+
#define BJ_INVALID ((uint64_t)0)
|
|
42
|
+
|
|
43
|
+
/* Max distinct object layers the layer matrix supports. */
|
|
44
|
+
#define BJ_MAX_OBJECT_LAYERS 16
|
|
45
|
+
|
|
46
|
+
/* ------------------------------------------------------------------ */
|
|
47
|
+
/* Enums */
|
|
48
|
+
/* ------------------------------------------------------------------ */
|
|
49
|
+
|
|
50
|
+
typedef enum {
|
|
51
|
+
BJ_MOTION_STATIC = 0,
|
|
52
|
+
BJ_MOTION_KINEMATIC = 1,
|
|
53
|
+
BJ_MOTION_DYNAMIC = 2
|
|
54
|
+
} bj_motion_type;
|
|
55
|
+
|
|
56
|
+
/* Default object layers. Applications may use any value in [0, 15];
|
|
57
|
+
* the layer collision matrix is configured via bj_world_set_layer_collides. */
|
|
58
|
+
typedef enum {
|
|
59
|
+
BJ_LAYER_NON_MOVING = 0,
|
|
60
|
+
BJ_LAYER_MOVING = 1,
|
|
61
|
+
BJ_LAYER_SENSOR = 2
|
|
62
|
+
} bj_default_layer;
|
|
63
|
+
|
|
64
|
+
typedef enum {
|
|
65
|
+
BJ_ACTIVATE = 0,
|
|
66
|
+
BJ_DONT_ACTIVATE = 1
|
|
67
|
+
} bj_activation;
|
|
68
|
+
|
|
69
|
+
typedef enum {
|
|
70
|
+
BJ_CONTACT_ADDED = 0,
|
|
71
|
+
BJ_CONTACT_PERSISTED = 1,
|
|
72
|
+
BJ_CONTACT_REMOVED = 2
|
|
73
|
+
} bj_contact_event;
|
|
74
|
+
|
|
75
|
+
typedef enum {
|
|
76
|
+
BJ_OK = 0,
|
|
77
|
+
BJ_ERR_UNINITIALIZED = 1,
|
|
78
|
+
BJ_ERR_INVALID_HANDLE = 2,
|
|
79
|
+
BJ_ERR_OUT_OF_MEMORY = 3,
|
|
80
|
+
BJ_ERR_INVALID_ARG = 4
|
|
81
|
+
} bj_result;
|
|
82
|
+
|
|
83
|
+
/* ------------------------------------------------------------------ */
|
|
84
|
+
/* POD structs */
|
|
85
|
+
/* ------------------------------------------------------------------ */
|
|
86
|
+
|
|
87
|
+
typedef struct { float x, y, z; } bj_vec3;
|
|
88
|
+
typedef struct { float x, y, z, w; } bj_quat; /* xyzw */
|
|
89
|
+
typedef struct { bj_vec3 position; bj_quat rotation; } bj_transform;
|
|
90
|
+
|
|
91
|
+
typedef struct {
|
|
92
|
+
uint32_t max_bodies; /* hard cap on simultaneous bodies */
|
|
93
|
+
uint32_t max_body_pairs; /* broadphase pair buffer */
|
|
94
|
+
uint32_t max_contact_constraints; /* narrowphase contact buffer */
|
|
95
|
+
uint32_t num_threads; /* 0 = auto (CPU count - 1) */
|
|
96
|
+
bj_vec3 gravity;
|
|
97
|
+
uint32_t temp_allocator_bytes; /* per-frame scratch; 0 = default 10MB */
|
|
98
|
+
} bj_world_desc;
|
|
99
|
+
|
|
100
|
+
typedef struct {
|
|
101
|
+
bj_motion_type motion_type;
|
|
102
|
+
bj_vec3 position;
|
|
103
|
+
bj_quat rotation;
|
|
104
|
+
bj_vec3 linear_velocity;
|
|
105
|
+
bj_vec3 angular_velocity;
|
|
106
|
+
float gravity_factor;
|
|
107
|
+
float linear_damping;
|
|
108
|
+
float angular_damping;
|
|
109
|
+
float friction;
|
|
110
|
+
float restitution;
|
|
111
|
+
float mass_override; /* 0 = compute from shape density */
|
|
112
|
+
bj_vec3 inertia_diag_override; /* (0,0,0) = compute from shape */
|
|
113
|
+
uint32_t object_layer;
|
|
114
|
+
uint8_t is_sensor; /* 1 = trigger (events only, no contact response) */
|
|
115
|
+
uint8_t allow_sleeping;
|
|
116
|
+
uint8_t use_ccd; /* continuous collision detection */
|
|
117
|
+
uint8_t start_awake;
|
|
118
|
+
uint64_t user_data; /* opaque; TS side uses for scene-node id */
|
|
119
|
+
} bj_body_desc;
|
|
120
|
+
|
|
121
|
+
typedef struct {
|
|
122
|
+
bj_body body;
|
|
123
|
+
bj_vec3 point; /* world-space */
|
|
124
|
+
bj_vec3 normal; /* world-space, points away from surface */
|
|
125
|
+
float fraction; /* 0..1 along ray */
|
|
126
|
+
uint32_t sub_shape_id;/* for compound / mesh shapes */
|
|
127
|
+
} bj_ray_hit;
|
|
128
|
+
|
|
129
|
+
typedef struct {
|
|
130
|
+
bj_contact_event event;
|
|
131
|
+
bj_body body_a;
|
|
132
|
+
bj_body body_b;
|
|
133
|
+
bj_vec3 point_a; /* world-space contact on A */
|
|
134
|
+
bj_vec3 point_b; /* world-space contact on B */
|
|
135
|
+
bj_vec3 normal; /* world-space, from A to B */
|
|
136
|
+
float penetration_depth;
|
|
137
|
+
float combined_friction;
|
|
138
|
+
float combined_restitution;
|
|
139
|
+
} bj_contact;
|
|
140
|
+
|
|
141
|
+
/* ------------------------------------------------------------------ */
|
|
142
|
+
/* Global init (call once per process before any world) */
|
|
143
|
+
/* ------------------------------------------------------------------ */
|
|
144
|
+
|
|
145
|
+
bj_result bj_global_init(void);
|
|
146
|
+
void bj_global_shutdown(void);
|
|
147
|
+
const char *bj_version_string(void); /* "Jolt 5.5.0 / bloom_jolt 0.1" */
|
|
148
|
+
|
|
149
|
+
/* ------------------------------------------------------------------ */
|
|
150
|
+
/* World */
|
|
151
|
+
/* ------------------------------------------------------------------ */
|
|
152
|
+
|
|
153
|
+
bj_world bj_world_create(const bj_world_desc *desc);
|
|
154
|
+
void bj_world_destroy(bj_world world);
|
|
155
|
+
|
|
156
|
+
void bj_world_set_gravity(bj_world world, bj_vec3 gravity);
|
|
157
|
+
void bj_world_get_gravity(bj_world world, bj_vec3 *out);
|
|
158
|
+
|
|
159
|
+
/* Must be called after initial body creation, before first step,
|
|
160
|
+
* for best broadphase performance. Safe to call any time. */
|
|
161
|
+
void bj_world_optimize_broadphase(bj_world world);
|
|
162
|
+
|
|
163
|
+
/* Step the simulation. collision_steps sub-divides the physics update
|
|
164
|
+
* for stability; use 1 for a 60Hz game, 2+ for high-velocity or low-fps.
|
|
165
|
+
* Returns BJ_OK or error code. */
|
|
166
|
+
bj_result bj_world_step(bj_world world, float delta_time, uint32_t collision_steps);
|
|
167
|
+
|
|
168
|
+
/* Layer collision matrix. Both layers must be in [0, BJ_MAX_OBJECT_LAYERS). */
|
|
169
|
+
void bj_world_set_layer_collides(bj_world world, uint32_t layer_a, uint32_t layer_b, uint8_t collides);
|
|
170
|
+
uint8_t bj_world_get_layer_collides(bj_world world, uint32_t layer_a, uint32_t layer_b);
|
|
171
|
+
|
|
172
|
+
/* Active-body count (useful for diagnostics / sleep tuning). */
|
|
173
|
+
uint32_t bj_world_body_count(bj_world world);
|
|
174
|
+
uint32_t bj_world_active_body_count(bj_world world);
|
|
175
|
+
|
|
176
|
+
/* ------------------------------------------------------------------ */
|
|
177
|
+
/* Shapes (refcounted; created in AWAITING_REGISTRATION state) */
|
|
178
|
+
/* ------------------------------------------------------------------ */
|
|
179
|
+
|
|
180
|
+
/* Primitives — convex_radius smooths sharp edges (Jolt default: 0.05). */
|
|
181
|
+
bj_shape bj_shape_box (bj_vec3 half_extents, float convex_radius);
|
|
182
|
+
bj_shape bj_shape_sphere (float radius);
|
|
183
|
+
bj_shape bj_shape_capsule (float half_height, float radius);
|
|
184
|
+
bj_shape bj_shape_cylinder(float half_height, float radius, float convex_radius);
|
|
185
|
+
|
|
186
|
+
/* Convex hull from point cloud. Points are copied. */
|
|
187
|
+
bj_shape bj_shape_convex_hull(const bj_vec3 *points, uint32_t count, float convex_radius);
|
|
188
|
+
|
|
189
|
+
/* Triangle mesh — static bodies only.
|
|
190
|
+
* vertices: array of bj_vec3
|
|
191
|
+
* indices: triangle_count * 3 uint32 indices
|
|
192
|
+
* Data is copied. */
|
|
193
|
+
bj_shape bj_shape_mesh(const bj_vec3 *vertices, uint32_t vertex_count,
|
|
194
|
+
const uint32_t *indices, uint32_t triangle_count);
|
|
195
|
+
|
|
196
|
+
/* Heightfield — static bodies only.
|
|
197
|
+
* samples: sample_count*sample_count row-major float grid (Y values)
|
|
198
|
+
* offset: world-space offset of the (0,0) sample
|
|
199
|
+
* scale: per-axis world-space scale of a grid cell (y is Y scale)
|
|
200
|
+
* block_size: power-of-two cell block for BVH (recommended 4 or 8) */
|
|
201
|
+
bj_shape bj_shape_heightfield(const float *samples, uint32_t sample_count,
|
|
202
|
+
bj_vec3 offset, bj_vec3 scale, uint32_t block_size);
|
|
203
|
+
|
|
204
|
+
/* Compound (static layout, fast query) of other shapes. Child shapes are
|
|
205
|
+
* add-ref'd internally. */
|
|
206
|
+
bj_shape bj_shape_compound_static(const bj_shape *shapes,
|
|
207
|
+
const bj_transform *local_transforms,
|
|
208
|
+
uint32_t count);
|
|
209
|
+
|
|
210
|
+
/* Wrappers (cheap, no geometry copy) */
|
|
211
|
+
bj_shape bj_shape_scaled (bj_shape base, bj_vec3 scale);
|
|
212
|
+
bj_shape bj_shape_offset_com(bj_shape base, bj_vec3 center_of_mass_offset);
|
|
213
|
+
|
|
214
|
+
void bj_shape_add_ref (bj_shape shape);
|
|
215
|
+
void bj_shape_release (bj_shape shape);
|
|
216
|
+
|
|
217
|
+
/* Query shape properties */
|
|
218
|
+
void bj_shape_get_local_bounds(bj_shape shape, bj_vec3 *out_min, bj_vec3 *out_max);
|
|
219
|
+
float bj_shape_get_volume (bj_shape shape);
|
|
220
|
+
|
|
221
|
+
/* ------------------------------------------------------------------ */
|
|
222
|
+
/* Bodies */
|
|
223
|
+
/* ------------------------------------------------------------------ */
|
|
224
|
+
|
|
225
|
+
bj_body bj_body_create (bj_world world, bj_shape shape, const bj_body_desc *desc);
|
|
226
|
+
void bj_body_destroy(bj_world world, bj_body body);
|
|
227
|
+
|
|
228
|
+
/* Lifecycle */
|
|
229
|
+
void bj_body_activate (bj_world world, bj_body body);
|
|
230
|
+
void bj_body_deactivate (bj_world world, bj_body body);
|
|
231
|
+
uint8_t bj_body_is_active (bj_world world, bj_body body);
|
|
232
|
+
uint8_t bj_body_is_valid (bj_world world, bj_body body);
|
|
233
|
+
|
|
234
|
+
/* Transforms */
|
|
235
|
+
void bj_body_get_transform (bj_world world, bj_body body, bj_transform *out);
|
|
236
|
+
void bj_body_set_transform (bj_world world, bj_body body, const bj_transform *xform, bj_activation act);
|
|
237
|
+
void bj_body_get_position (bj_world world, bj_body body, bj_vec3 *out);
|
|
238
|
+
void bj_body_get_rotation (bj_world world, bj_body body, bj_quat *out);
|
|
239
|
+
void bj_body_set_position (bj_world world, bj_body body, bj_vec3 pos, bj_activation act);
|
|
240
|
+
void bj_body_set_rotation (bj_world world, bj_body body, bj_quat rot, bj_activation act);
|
|
241
|
+
|
|
242
|
+
/* Kinematic interpolation — body moves toward target over delta_time */
|
|
243
|
+
void bj_body_move_kinematic(bj_world world, bj_body body, const bj_transform *target, float delta_time);
|
|
244
|
+
|
|
245
|
+
/* Velocities */
|
|
246
|
+
void bj_body_get_linear_velocity (bj_world world, bj_body body, bj_vec3 *out);
|
|
247
|
+
void bj_body_get_angular_velocity(bj_world world, bj_body body, bj_vec3 *out);
|
|
248
|
+
void bj_body_set_linear_velocity (bj_world world, bj_body body, bj_vec3 v);
|
|
249
|
+
void bj_body_set_angular_velocity(bj_world world, bj_body body, bj_vec3 v);
|
|
250
|
+
/* Velocity at a world-space point (useful for friction / effects) */
|
|
251
|
+
void bj_body_get_point_velocity (bj_world world, bj_body body, bj_vec3 world_point, bj_vec3 *out);
|
|
252
|
+
|
|
253
|
+
/* Forces & impulses (center of mass) */
|
|
254
|
+
void bj_body_add_force (bj_world world, bj_body body, bj_vec3 force);
|
|
255
|
+
void bj_body_add_impulse (bj_world world, bj_body body, bj_vec3 impulse);
|
|
256
|
+
void bj_body_add_torque (bj_world world, bj_body body, bj_vec3 torque);
|
|
257
|
+
void bj_body_add_angular_impulse (bj_world world, bj_body body, bj_vec3 impulse);
|
|
258
|
+
/* Forces & impulses at a world-space point */
|
|
259
|
+
void bj_body_add_force_at (bj_world world, bj_body body, bj_vec3 force, bj_vec3 world_point);
|
|
260
|
+
void bj_body_add_impulse_at (bj_world world, bj_body body, bj_vec3 impulse, bj_vec3 world_point);
|
|
261
|
+
|
|
262
|
+
/* Per-body properties (read/write) */
|
|
263
|
+
void bj_body_set_friction (bj_world world, bj_body body, float friction);
|
|
264
|
+
void bj_body_set_restitution (bj_world world, bj_body body, float restitution);
|
|
265
|
+
void bj_body_set_linear_damping (bj_world world, bj_body body, float damping);
|
|
266
|
+
void bj_body_set_angular_damping (bj_world world, bj_body body, float damping);
|
|
267
|
+
void bj_body_set_gravity_factor (bj_world world, bj_body body, float factor);
|
|
268
|
+
void bj_body_set_ccd (bj_world world, bj_body body, uint8_t enabled);
|
|
269
|
+
void bj_body_set_motion_type (bj_world world, bj_body body, bj_motion_type type, bj_activation act);
|
|
270
|
+
void bj_body_set_object_layer (bj_world world, bj_body body, uint32_t layer);
|
|
271
|
+
void bj_body_set_is_sensor (bj_world world, bj_body body, uint8_t enabled);
|
|
272
|
+
void bj_body_set_allow_sleeping (bj_world world, bj_body body, uint8_t enabled);
|
|
273
|
+
void bj_body_set_shape (bj_world world, bj_body body, bj_shape shape, uint8_t update_mass, bj_activation act);
|
|
274
|
+
void bj_body_lock_rotation_axes (bj_world world, bj_body body, uint8_t lock_x, uint8_t lock_y, uint8_t lock_z);
|
|
275
|
+
void bj_body_lock_translation_axes(bj_world world, bj_body body, uint8_t lock_x, uint8_t lock_y, uint8_t lock_z);
|
|
276
|
+
|
|
277
|
+
float bj_body_get_mass (bj_world world, bj_body body);
|
|
278
|
+
float bj_body_get_friction (bj_world world, bj_body body);
|
|
279
|
+
float bj_body_get_restitution (bj_world world, bj_body body);
|
|
280
|
+
uint32_t bj_body_get_object_layer (bj_world world, bj_body body);
|
|
281
|
+
|
|
282
|
+
/* User data pass-through (TS layer stores a scene-node id here). */
|
|
283
|
+
void bj_body_set_user_data(bj_world world, bj_body body, uint64_t user_data);
|
|
284
|
+
uint64_t bj_body_get_user_data(bj_world world, bj_body body);
|
|
285
|
+
|
|
286
|
+
/* Batched transform sync: fills `out_transforms` for the given body handles.
|
|
287
|
+
* Invalid handles receive an identity transform. Returns count written. */
|
|
288
|
+
uint32_t bj_world_sync_transforms(bj_world world,
|
|
289
|
+
const bj_body *bodies, uint32_t count,
|
|
290
|
+
bj_transform *out_transforms);
|
|
291
|
+
|
|
292
|
+
/* ------------------------------------------------------------------ */
|
|
293
|
+
/* Queries */
|
|
294
|
+
/* ------------------------------------------------------------------ */
|
|
295
|
+
|
|
296
|
+
/* layer_mask: bitmask of object layers to test against (bit N = layer N).
|
|
297
|
+
* Use 0xFFFFFFFFu for "all layers". */
|
|
298
|
+
|
|
299
|
+
uint8_t bj_query_raycast_closest(bj_world world,
|
|
300
|
+
bj_vec3 origin, bj_vec3 direction, float max_distance,
|
|
301
|
+
uint32_t layer_mask, bj_ray_hit *out_hit);
|
|
302
|
+
|
|
303
|
+
uint32_t bj_query_raycast_all(bj_world world,
|
|
304
|
+
bj_vec3 origin, bj_vec3 direction, float max_distance,
|
|
305
|
+
uint32_t layer_mask,
|
|
306
|
+
bj_ray_hit *out_hits, uint32_t max_hits);
|
|
307
|
+
|
|
308
|
+
uint8_t bj_query_shape_cast_closest(bj_world world, bj_shape shape,
|
|
309
|
+
const bj_transform *start, bj_vec3 direction,
|
|
310
|
+
uint32_t layer_mask, bj_ray_hit *out_hit);
|
|
311
|
+
|
|
312
|
+
uint32_t bj_query_overlap_sphere(bj_world world,
|
|
313
|
+
bj_vec3 center, float radius,
|
|
314
|
+
uint32_t layer_mask,
|
|
315
|
+
bj_body *out_bodies, uint32_t max_results);
|
|
316
|
+
|
|
317
|
+
uint32_t bj_query_overlap_box(bj_world world,
|
|
318
|
+
const bj_transform *box_transform, bj_vec3 half_extents,
|
|
319
|
+
uint32_t layer_mask,
|
|
320
|
+
bj_body *out_bodies, uint32_t max_results);
|
|
321
|
+
|
|
322
|
+
uint32_t bj_query_overlap_point(bj_world world, bj_vec3 point,
|
|
323
|
+
uint32_t layer_mask,
|
|
324
|
+
bj_body *out_bodies, uint32_t max_results);
|
|
325
|
+
|
|
326
|
+
/* ------------------------------------------------------------------ */
|
|
327
|
+
/* Constraints */
|
|
328
|
+
/* ------------------------------------------------------------------ */
|
|
329
|
+
|
|
330
|
+
typedef struct {
|
|
331
|
+
bj_body body_a;
|
|
332
|
+
bj_body body_b; /* BJ_INVALID = world-fixed constraint on body_a */
|
|
333
|
+
bj_vec3 anchor_a; /* local to body_a if use_world_space==0, else world */
|
|
334
|
+
bj_vec3 anchor_b; /* local to body_b (or world if body_b invalid) */
|
|
335
|
+
uint8_t use_world_space;
|
|
336
|
+
} bj_constraint_anchors;
|
|
337
|
+
|
|
338
|
+
bj_constraint bj_constraint_fixed (bj_world world, const bj_constraint_anchors *a);
|
|
339
|
+
bj_constraint bj_constraint_point (bj_world world, const bj_constraint_anchors *a);
|
|
340
|
+
/* hinge: limit_min >= limit_max disables the limits */
|
|
341
|
+
bj_constraint bj_constraint_hinge (bj_world world, const bj_constraint_anchors *a,
|
|
342
|
+
bj_vec3 axis, float limit_min, float limit_max);
|
|
343
|
+
bj_constraint bj_constraint_slider (bj_world world, const bj_constraint_anchors *a,
|
|
344
|
+
bj_vec3 axis, float limit_min, float limit_max);
|
|
345
|
+
bj_constraint bj_constraint_distance(bj_world world, const bj_constraint_anchors *a,
|
|
346
|
+
float min_distance, float max_distance);
|
|
347
|
+
/* Six-DOF: per-axis free/limited/locked masks.
|
|
348
|
+
* mask layout: bits 0-2 = translation x/y/z, 3-5 = rotation x/y/z.
|
|
349
|
+
* For each axis, set (min,max) pair; min>=max means locked. Omitted via nullptr uses defaults. */
|
|
350
|
+
bj_constraint bj_constraint_six_dof (bj_world world, const bj_constraint_anchors *a,
|
|
351
|
+
const float *translation_limits_xyz_minmax, /* 6 floats or NULL */
|
|
352
|
+
const float *rotation_limits_xyz_minmax); /* 6 floats or NULL */
|
|
353
|
+
|
|
354
|
+
void bj_constraint_destroy (bj_world world, bj_constraint c);
|
|
355
|
+
void bj_constraint_set_enabled(bj_world world, bj_constraint c, uint8_t enabled);
|
|
356
|
+
|
|
357
|
+
/* ------------------------------------------------------------------ */
|
|
358
|
+
/* Contact events (polled after bj_world_step) */
|
|
359
|
+
/* ------------------------------------------------------------------ */
|
|
360
|
+
|
|
361
|
+
uint32_t bj_world_contact_count(bj_world world);
|
|
362
|
+
|
|
363
|
+
/* Drains up to max_out events into `out`. Returns count written.
|
|
364
|
+
* Call repeatedly until it returns 0 to fully drain. */
|
|
365
|
+
uint32_t bj_world_pop_contacts(bj_world world, bj_contact *out, uint32_t max_out);
|
|
366
|
+
|
|
367
|
+
/* Reset the event queue (e.g. when resetting a level). */
|
|
368
|
+
void bj_world_clear_contacts(bj_world world);
|
|
369
|
+
|
|
370
|
+
/* ------------------------------------------------------------------ */
|
|
371
|
+
/* Character controller (Tier 2) */
|
|
372
|
+
/* ------------------------------------------------------------------ */
|
|
373
|
+
/* Kinematic character (Jolt's CharacterVirtual) with slope / step */
|
|
374
|
+
/* handling — what player controllers actually feel like. */
|
|
375
|
+
|
|
376
|
+
typedef enum {
|
|
377
|
+
BJ_GROUND_ON_GROUND = 0, /* standing on walkable surface */
|
|
378
|
+
BJ_GROUND_ON_STEEP = 1, /* slope exceeds mMaxSlopeAngle */
|
|
379
|
+
BJ_GROUND_NOT_SUPPORTED = 2, /* supported by a body in "NotSupported" state (e.g. sensor) */
|
|
380
|
+
BJ_GROUND_IN_AIR = 3
|
|
381
|
+
} bj_ground_state;
|
|
382
|
+
|
|
383
|
+
typedef struct {
|
|
384
|
+
bj_vec3 up; /* default (0,1,0) */
|
|
385
|
+
float max_slope_angle; /* radians; Jolt default ~0.87 (50°) */
|
|
386
|
+
float character_padding; /* default 0.02 */
|
|
387
|
+
float penetration_recovery_speed; /* default 1.0 */
|
|
388
|
+
float predictive_contact_distance; /* default 0.1 */
|
|
389
|
+
float max_strength; /* max force character can apply to bodies, default 100 */
|
|
390
|
+
float mass; /* default 70 kg */
|
|
391
|
+
uint32_t object_layer; /* default BJ_LAYER_MOVING */
|
|
392
|
+
} bj_character_desc;
|
|
393
|
+
|
|
394
|
+
bj_character bj_character_create(bj_world world, bj_shape shape,
|
|
395
|
+
const bj_character_desc *desc,
|
|
396
|
+
bj_vec3 position, bj_quat rotation);
|
|
397
|
+
void bj_character_destroy(bj_world world, bj_character character);
|
|
398
|
+
|
|
399
|
+
/* Drive one frame — handles collision, slope clamping, stair stepping. */
|
|
400
|
+
void bj_character_update(bj_world world, bj_character character,
|
|
401
|
+
float delta_time, bj_vec3 gravity);
|
|
402
|
+
|
|
403
|
+
void bj_character_get_position(bj_world world, bj_character character, bj_vec3 *out);
|
|
404
|
+
void bj_character_get_rotation(bj_world world, bj_character character, bj_quat *out);
|
|
405
|
+
void bj_character_set_position(bj_world world, bj_character character, bj_vec3 position);
|
|
406
|
+
void bj_character_set_rotation(bj_world world, bj_character character, bj_quat rotation);
|
|
407
|
+
|
|
408
|
+
void bj_character_get_linear_velocity(bj_world world, bj_character character, bj_vec3 *out);
|
|
409
|
+
void bj_character_set_linear_velocity(bj_world world, bj_character character, bj_vec3 velocity);
|
|
410
|
+
|
|
411
|
+
bj_ground_state bj_character_get_ground_state(bj_world world, bj_character character);
|
|
412
|
+
void bj_character_get_ground_normal (bj_world world, bj_character character, bj_vec3 *out);
|
|
413
|
+
void bj_character_get_ground_position(bj_world world, bj_character character, bj_vec3 *out);
|
|
414
|
+
bj_body bj_character_get_ground_body (bj_world world, bj_character character);
|
|
415
|
+
|
|
416
|
+
void bj_character_set_shape(bj_world world, bj_character character, bj_shape shape);
|
|
417
|
+
|
|
418
|
+
/* ------------------------------------------------------------------ */
|
|
419
|
+
/* Soft bodies (Tier 2) */
|
|
420
|
+
/* ------------------------------------------------------------------ */
|
|
421
|
+
/* Soft bodies (cloth, rope, jelly) are Jolt SoftBodies — triangle */
|
|
422
|
+
/* meshes with per-vertex mass + edge/bend constraints. Return value */
|
|
423
|
+
/* is a regular bj_body that works with the normal destroy/get-pos */
|
|
424
|
+
/* FFI; per-vertex queries are below. */
|
|
425
|
+
/* */
|
|
426
|
+
/* vertex_data layout: vertex_count * 4 floats per vertex: */
|
|
427
|
+
/* [x, y, z, inv_mass] */
|
|
428
|
+
/* inv_mass == 0 means the vertex is PINNED (won't move under gravity).*/
|
|
429
|
+
/* indices: triangle_count * 3 uint32 triangle indices. */
|
|
430
|
+
|
|
431
|
+
bj_body bj_soft_body_create(
|
|
432
|
+
bj_world world,
|
|
433
|
+
const float *vertex_data, uint32_t vertex_count,
|
|
434
|
+
const uint32_t *indices, uint32_t triangle_count,
|
|
435
|
+
bj_vec3 position, bj_quat rotation,
|
|
436
|
+
uint32_t object_layer,
|
|
437
|
+
float edge_compliance, /* 0 = rigid edges; >0 = soft. Typical cloth: 0.0001 */
|
|
438
|
+
float gravity_factor,
|
|
439
|
+
float linear_damping,
|
|
440
|
+
float pressure /* 0 = cloth/rope; >0 = inflated volume (balloon/jelly) */
|
|
441
|
+
);
|
|
442
|
+
|
|
443
|
+
uint32_t bj_soft_body_vertex_count(bj_world world, bj_body body);
|
|
444
|
+
/* World-space position of vertex `idx` (applies current body transform). */
|
|
445
|
+
void bj_soft_body_get_vertex(bj_world world, bj_body body, uint32_t idx, bj_vec3 *out);
|
|
446
|
+
/* Override a vertex position — useful for pinning to a moving anchor. */
|
|
447
|
+
void bj_soft_body_set_vertex(bj_world world, bj_body body, uint32_t idx, bj_vec3 position);
|
|
448
|
+
/* Set per-vertex inverse mass; inv_mass == 0 pins the vertex in world space. */
|
|
449
|
+
void bj_soft_body_set_vertex_inv_mass(bj_world world, bj_body body, uint32_t idx, float inv_mass);
|
|
450
|
+
|
|
451
|
+
/* ------------------------------------------------------------------ */
|
|
452
|
+
/* Wheeled vehicles (Tier 2) */
|
|
453
|
+
/* ------------------------------------------------------------------ */
|
|
454
|
+
/* A 4-wheel car with a chassis body + VehicleConstraint. Ray collision*/
|
|
455
|
+
/* tester, rear-wheel drive + differential, front-wheel steering. For */
|
|
456
|
+
/* tracked vehicles / motorcycles / custom configurations, we'll add */
|
|
457
|
+
/* a lower-level surface later; this is the 90% case. */
|
|
458
|
+
|
|
459
|
+
typedef uint64_t bj_vehicle;
|
|
460
|
+
|
|
461
|
+
typedef struct {
|
|
462
|
+
/* Up and forward axes (default up=(0,1,0), forward=(0,0,1)). */
|
|
463
|
+
bj_vec3 up;
|
|
464
|
+
bj_vec3 forward;
|
|
465
|
+
|
|
466
|
+
/* Wheel world-local positions on the chassis (indices 0..3).
|
|
467
|
+
* Convention: 0=front-left, 1=front-right, 2=rear-left, 3=rear-right.
|
|
468
|
+
* Front wheels (0, 1) steer; rear wheels (2, 3) drive. */
|
|
469
|
+
bj_vec3 wheel_positions[4];
|
|
470
|
+
|
|
471
|
+
/* Shared wheel parameters. */
|
|
472
|
+
float wheel_radius;
|
|
473
|
+
float wheel_width;
|
|
474
|
+
float suspension_min_length;
|
|
475
|
+
float suspension_max_length;
|
|
476
|
+
float max_steer_angle; /* radians; applied to front wheels */
|
|
477
|
+
float max_brake_torque; /* Nm; applied on brake input */
|
|
478
|
+
float max_handbrake_torque; /* Nm; applied on handbrake input */
|
|
479
|
+
|
|
480
|
+
/* Engine / chassis — one-dimensional scalar controls. */
|
|
481
|
+
float engine_max_torque; /* Nm */
|
|
482
|
+
float max_pitch_roll_angle; /* radians; Jolt default ~60° */
|
|
483
|
+
|
|
484
|
+
/* Chassis object layer (typically BJ_LAYER_MOVING). */
|
|
485
|
+
uint32_t object_layer;
|
|
486
|
+
} bj_vehicle_desc;
|
|
487
|
+
|
|
488
|
+
/* Creates the chassis body AND the vehicle constraint together — returns
|
|
489
|
+
* the vehicle handle. Call bj_vehicle_get_chassis to get the underlying
|
|
490
|
+
* bj_body if you need to apply forces, set transforms, etc. */
|
|
491
|
+
bj_vehicle bj_vehicle_create(bj_world world, bj_shape chassis_shape,
|
|
492
|
+
const bj_vehicle_desc *desc,
|
|
493
|
+
bj_vec3 position, bj_quat rotation);
|
|
494
|
+
void bj_vehicle_destroy(bj_world world, bj_vehicle vehicle);
|
|
495
|
+
|
|
496
|
+
/* Get the chassis body (f64 handle registered on the Rust side). The
|
|
497
|
+
* C shim returns the raw BodyID-encoded bj_body; Rust maps it. */
|
|
498
|
+
bj_body bj_vehicle_get_chassis(bj_world world, bj_vehicle vehicle);
|
|
499
|
+
|
|
500
|
+
/* Driver input. Forward/right are normalised [-1..1]; brake/handbrake [0..1].
|
|
501
|
+
* Must be called EVERY FRAME before bj_world_step for responsive control. */
|
|
502
|
+
void bj_vehicle_set_input(bj_world world, bj_vehicle vehicle,
|
|
503
|
+
float forward, float right,
|
|
504
|
+
float brake, float handbrake);
|
|
505
|
+
|
|
506
|
+
/* World-space wheel transform (for rendering spinning wheels). axis is
|
|
507
|
+
* 0..2=position.xyz, 3..6=rotation.xyzw. */
|
|
508
|
+
float bj_vehicle_get_wheel_transform(bj_world world, bj_vehicle vehicle,
|
|
509
|
+
uint32_t wheel_index, uint32_t axis);
|
|
510
|
+
|
|
511
|
+
/* Current engine RPM + wheel slip ratios (useful for audio / VFX). */
|
|
512
|
+
float bj_vehicle_get_engine_rpm(bj_world world, bj_vehicle vehicle);
|
|
513
|
+
float bj_vehicle_get_wheel_angular_velocity(bj_world world, bj_vehicle vehicle, uint32_t wheel_index);
|
|
514
|
+
|
|
515
|
+
#ifdef __cplusplus
|
|
516
|
+
}
|
|
517
|
+
#endif
|
|
518
|
+
|
|
519
|
+
#endif /* BLOOM_JOLT_H */
|