@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,143 @@
|
|
|
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/NonCopyable.h>
|
|
8
|
+
|
|
9
|
+
JPH_NAMESPACE_BEGIN
|
|
10
|
+
|
|
11
|
+
#if defined(JPH_CPU_WASM)
|
|
12
|
+
|
|
13
|
+
// Not supported
|
|
14
|
+
|
|
15
|
+
#elif defined(JPH_USE_SSE)
|
|
16
|
+
|
|
17
|
+
/// Helper class that needs to be put on the stack to update the state of the floating point control word.
|
|
18
|
+
/// This state is kept per thread.
|
|
19
|
+
template <uint Value, uint Mask>
|
|
20
|
+
class FPControlWord : public NonCopyable
|
|
21
|
+
{
|
|
22
|
+
public:
|
|
23
|
+
FPControlWord()
|
|
24
|
+
{
|
|
25
|
+
mPrevState = _mm_getcsr();
|
|
26
|
+
_mm_setcsr((mPrevState & ~Mask) | Value);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
~FPControlWord()
|
|
30
|
+
{
|
|
31
|
+
_mm_setcsr((_mm_getcsr() & ~Mask) | (mPrevState & Mask));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private:
|
|
35
|
+
uint mPrevState;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
#elif defined(JPH_CPU_ARM) && defined(JPH_COMPILER_MSVC)
|
|
39
|
+
|
|
40
|
+
/// Helper class that needs to be put on the stack to update the state of the floating point control word.
|
|
41
|
+
/// This state is kept per thread.
|
|
42
|
+
template <unsigned int Value, unsigned int Mask>
|
|
43
|
+
class FPControlWord : public NonCopyable
|
|
44
|
+
{
|
|
45
|
+
public:
|
|
46
|
+
FPControlWord()
|
|
47
|
+
{
|
|
48
|
+
// Read state before change
|
|
49
|
+
_controlfp_s(&mPrevState, 0, 0);
|
|
50
|
+
|
|
51
|
+
// Update the state
|
|
52
|
+
unsigned int dummy;
|
|
53
|
+
_controlfp_s(&dummy, Value, Mask);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
~FPControlWord()
|
|
57
|
+
{
|
|
58
|
+
// Restore state
|
|
59
|
+
unsigned int dummy;
|
|
60
|
+
_controlfp_s(&dummy, mPrevState, Mask);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private:
|
|
64
|
+
unsigned int mPrevState;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
#elif defined(JPH_CPU_ARM) && defined(JPH_USE_NEON)
|
|
68
|
+
|
|
69
|
+
/// Helper class that needs to be put on the stack to update the state of the floating point control word.
|
|
70
|
+
/// This state is kept per thread.
|
|
71
|
+
template <uint64 Value, uint64 Mask>
|
|
72
|
+
class FPControlWord : public NonCopyable
|
|
73
|
+
{
|
|
74
|
+
public:
|
|
75
|
+
FPControlWord()
|
|
76
|
+
{
|
|
77
|
+
uint64 val;
|
|
78
|
+
asm volatile("mrs %0, fpcr" : "=r" (val));
|
|
79
|
+
mPrevState = val;
|
|
80
|
+
val &= ~Mask;
|
|
81
|
+
val |= Value;
|
|
82
|
+
asm volatile("msr fpcr, %0" : /* no output */ : "r" (val));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
~FPControlWord()
|
|
86
|
+
{
|
|
87
|
+
uint64 val;
|
|
88
|
+
asm volatile("mrs %0, fpcr" : "=r" (val));
|
|
89
|
+
val &= ~Mask;
|
|
90
|
+
val |= mPrevState & Mask;
|
|
91
|
+
asm volatile("msr fpcr, %0" : /* no output */ : "r" (val));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private:
|
|
95
|
+
uint64 mPrevState;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
#elif defined(JPH_CPU_ARM)
|
|
99
|
+
|
|
100
|
+
/// Helper class that needs to be put on the stack to update the state of the floating point control word.
|
|
101
|
+
/// This state is kept per thread.
|
|
102
|
+
template <uint32 Value, uint32 Mask>
|
|
103
|
+
class FPControlWord : public NonCopyable
|
|
104
|
+
{
|
|
105
|
+
public:
|
|
106
|
+
FPControlWord()
|
|
107
|
+
{
|
|
108
|
+
uint32 val;
|
|
109
|
+
asm volatile("vmrs %0, fpscr" : "=r" (val));
|
|
110
|
+
mPrevState = val;
|
|
111
|
+
val &= ~Mask;
|
|
112
|
+
val |= Value;
|
|
113
|
+
asm volatile("vmsr fpscr, %0" : /* no output */ : "r" (val));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
~FPControlWord()
|
|
117
|
+
{
|
|
118
|
+
uint32 val;
|
|
119
|
+
asm volatile("vmrs %0, fpscr" : "=r" (val));
|
|
120
|
+
val &= ~Mask;
|
|
121
|
+
val |= mPrevState & Mask;
|
|
122
|
+
asm volatile("vmsr fpscr, %0" : /* no output */ : "r" (val));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
private:
|
|
126
|
+
uint32 mPrevState;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
#elif defined(JPH_CPU_RISCV)
|
|
130
|
+
|
|
131
|
+
// RISC-V only implements manually checking if exceptions occurred by reading the fcsr register. It doesn't generate exceptions.
|
|
132
|
+
|
|
133
|
+
#elif defined(JPH_CPU_PPC) || defined(JPH_CPU_LOONGARCH)
|
|
134
|
+
|
|
135
|
+
// Not implemented right now
|
|
136
|
+
|
|
137
|
+
#else
|
|
138
|
+
|
|
139
|
+
#error Unsupported CPU architecture
|
|
140
|
+
|
|
141
|
+
#endif
|
|
142
|
+
|
|
143
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,96 @@
|
|
|
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/FPControlWord.h>
|
|
8
|
+
|
|
9
|
+
JPH_NAMESPACE_BEGIN
|
|
10
|
+
|
|
11
|
+
#ifdef JPH_FLOATING_POINT_EXCEPTIONS_ENABLED
|
|
12
|
+
|
|
13
|
+
#if defined(JPH_CPU_WASM)
|
|
14
|
+
|
|
15
|
+
// Not supported
|
|
16
|
+
class FPExceptionsEnable { };
|
|
17
|
+
class FPExceptionDisableInvalid { };
|
|
18
|
+
class FPExceptionDisableDivByZero { };
|
|
19
|
+
class FPExceptionDisableOverflow { };
|
|
20
|
+
|
|
21
|
+
#elif defined(JPH_USE_SSE)
|
|
22
|
+
|
|
23
|
+
/// Enable floating point divide by zero exception, overflow exceptions and exceptions on invalid numbers
|
|
24
|
+
class FPExceptionsEnable : public FPControlWord<0, _MM_MASK_DIV_ZERO | _MM_MASK_INVALID | _MM_MASK_OVERFLOW> { };
|
|
25
|
+
|
|
26
|
+
/// Disable invalid floating point value exceptions
|
|
27
|
+
class FPExceptionDisableInvalid : public FPControlWord<_MM_MASK_INVALID, _MM_MASK_INVALID> { };
|
|
28
|
+
|
|
29
|
+
/// Disable division by zero floating point exceptions
|
|
30
|
+
class FPExceptionDisableDivByZero : public FPControlWord<_MM_MASK_DIV_ZERO, _MM_MASK_DIV_ZERO> { };
|
|
31
|
+
|
|
32
|
+
/// Disable floating point overflow exceptions
|
|
33
|
+
class FPExceptionDisableOverflow : public FPControlWord<_MM_MASK_OVERFLOW, _MM_MASK_OVERFLOW> { };
|
|
34
|
+
|
|
35
|
+
#elif defined(JPH_CPU_ARM) && defined(JPH_COMPILER_MSVC)
|
|
36
|
+
|
|
37
|
+
/// Enable floating point divide by zero exception, overflow exceptions and exceptions on invalid numbers
|
|
38
|
+
class FPExceptionsEnable : public FPControlWord<0, _EM_INVALID | _EM_ZERODIVIDE | _EM_OVERFLOW> { };
|
|
39
|
+
|
|
40
|
+
/// Disable invalid floating point value exceptions
|
|
41
|
+
class FPExceptionDisableInvalid : public FPControlWord<_EM_INVALID, _EM_INVALID> { };
|
|
42
|
+
|
|
43
|
+
/// Disable division by zero floating point exceptions
|
|
44
|
+
class FPExceptionDisableDivByZero : public FPControlWord<_EM_ZERODIVIDE, _EM_ZERODIVIDE> { };
|
|
45
|
+
|
|
46
|
+
/// Disable floating point overflow exceptions
|
|
47
|
+
class FPExceptionDisableOverflow : public FPControlWord<_EM_OVERFLOW, _EM_OVERFLOW> { };
|
|
48
|
+
|
|
49
|
+
#elif defined(JPH_CPU_ARM)
|
|
50
|
+
|
|
51
|
+
/// Invalid operation exception bit
|
|
52
|
+
static constexpr uint64 FP_IOE = 1 << 8;
|
|
53
|
+
|
|
54
|
+
/// Enable divide by zero exception bit
|
|
55
|
+
static constexpr uint64 FP_DZE = 1 << 9;
|
|
56
|
+
|
|
57
|
+
/// Enable floating point overflow bit
|
|
58
|
+
static constexpr uint64 FP_OFE = 1 << 10;
|
|
59
|
+
|
|
60
|
+
/// Enable floating point divide by zero exception, overflow exceptions and exceptions on invalid numbers
|
|
61
|
+
class FPExceptionsEnable : public FPControlWord<FP_IOE | FP_DZE | FP_OFE, FP_IOE | FP_DZE | FP_OFE> { };
|
|
62
|
+
|
|
63
|
+
/// Disable invalid floating point value exceptions
|
|
64
|
+
class FPExceptionDisableInvalid : public FPControlWord<0, FP_IOE> { };
|
|
65
|
+
|
|
66
|
+
/// Disable division by zero floating point exceptions
|
|
67
|
+
class FPExceptionDisableDivByZero : public FPControlWord<0, FP_DZE> { };
|
|
68
|
+
|
|
69
|
+
/// Disable floating point overflow exceptions
|
|
70
|
+
class FPExceptionDisableOverflow : public FPControlWord<0, FP_OFE> { };
|
|
71
|
+
|
|
72
|
+
#elif defined(JPH_CPU_RISCV)
|
|
73
|
+
|
|
74
|
+
#error "RISC-V only implements manually checking if exceptions occurred by reading the fcsr register. It doesn't generate exceptions. JPH_FLOATING_POINT_EXCEPTIONS_ENABLED must be disabled."
|
|
75
|
+
|
|
76
|
+
#elif defined(JPH_CPU_PPC)
|
|
77
|
+
|
|
78
|
+
#error PowerPC floating point exception handling to be implemented. JPH_FLOATING_POINT_EXCEPTIONS_ENABLED must be disabled.
|
|
79
|
+
|
|
80
|
+
#else
|
|
81
|
+
|
|
82
|
+
#error Unsupported CPU architecture
|
|
83
|
+
|
|
84
|
+
#endif
|
|
85
|
+
|
|
86
|
+
#else
|
|
87
|
+
|
|
88
|
+
/// Dummy implementations
|
|
89
|
+
class FPExceptionsEnable { };
|
|
90
|
+
class FPExceptionDisableInvalid { };
|
|
91
|
+
class FPExceptionDisableDivByZero { };
|
|
92
|
+
class FPExceptionDisableOverflow { };
|
|
93
|
+
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,43 @@
|
|
|
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/FPControlWord.h>
|
|
8
|
+
|
|
9
|
+
JPH_NAMESPACE_BEGIN
|
|
10
|
+
|
|
11
|
+
#if defined(JPH_CPU_WASM) || defined(JPH_CPU_RISCV) || defined(JPH_CPU_PPC) || defined(JPH_CPU_LOONGARCH)
|
|
12
|
+
|
|
13
|
+
// Not supported
|
|
14
|
+
class FPFlushDenormals { };
|
|
15
|
+
|
|
16
|
+
#elif defined(JPH_USE_SSE)
|
|
17
|
+
|
|
18
|
+
/// Helper class that needs to be put on the stack to enable flushing denormals to zero
|
|
19
|
+
/// This can make floating point operations much faster when working with very small numbers
|
|
20
|
+
class FPFlushDenormals : public FPControlWord<_MM_FLUSH_ZERO_ON, _MM_FLUSH_ZERO_MASK> { };
|
|
21
|
+
|
|
22
|
+
#elif defined(JPH_CPU_ARM) && defined(JPH_COMPILER_MSVC)
|
|
23
|
+
|
|
24
|
+
/// Helper class that needs to be put on the stack to enable flushing denormals to zero
|
|
25
|
+
/// This can make floating point operations much faster when working with very small numbers
|
|
26
|
+
class FPFlushDenormals : public FPControlWord<_DN_FLUSH, _MCW_DN> { };
|
|
27
|
+
|
|
28
|
+
#elif defined(JPH_CPU_ARM)
|
|
29
|
+
|
|
30
|
+
/// Flush denormals to zero bit
|
|
31
|
+
static constexpr uint64 FP_FZ = 1 << 24;
|
|
32
|
+
|
|
33
|
+
/// Helper class that needs to be put on the stack to enable flushing denormals to zero
|
|
34
|
+
/// This can make floating point operations much faster when working with very small numbers
|
|
35
|
+
class FPFlushDenormals : public FPControlWord<FP_FZ, FP_FZ> { };
|
|
36
|
+
|
|
37
|
+
#else
|
|
38
|
+
|
|
39
|
+
#error Unsupported CPU architecture
|
|
40
|
+
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
|
2
|
+
// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
#include <Jolt/Jolt.h>
|
|
6
|
+
|
|
7
|
+
#include <Jolt/Core/Factory.h>
|
|
8
|
+
|
|
9
|
+
JPH_NAMESPACE_BEGIN
|
|
10
|
+
|
|
11
|
+
Factory *Factory::sInstance = nullptr;
|
|
12
|
+
|
|
13
|
+
void *Factory::CreateObject(const char *inName)
|
|
14
|
+
{
|
|
15
|
+
const RTTI *ci = Find(inName);
|
|
16
|
+
return ci != nullptr? ci->CreateObject() : nullptr;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const RTTI *Factory::Find(const char *inName)
|
|
20
|
+
{
|
|
21
|
+
ClassNameMap::iterator c = mClassNameMap.find(inName);
|
|
22
|
+
return c != mClassNameMap.end()? c->second : nullptr;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const RTTI *Factory::Find(uint32 inHash)
|
|
26
|
+
{
|
|
27
|
+
ClassHashMap::iterator c = mClassHashMap.find(inHash);
|
|
28
|
+
return c != mClassHashMap.end()? c->second : nullptr;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
bool Factory::Register(const RTTI *inRTTI)
|
|
32
|
+
{
|
|
33
|
+
// Check if we already know the type
|
|
34
|
+
if (Find(inRTTI->GetName()) != nullptr)
|
|
35
|
+
return true;
|
|
36
|
+
|
|
37
|
+
// Insert this class by name
|
|
38
|
+
mClassNameMap.try_emplace(inRTTI->GetName(), inRTTI);
|
|
39
|
+
|
|
40
|
+
// Insert this class by hash
|
|
41
|
+
if (!mClassHashMap.try_emplace(inRTTI->GetHash(), inRTTI).second)
|
|
42
|
+
{
|
|
43
|
+
JPH_ASSERT(false, "Hash collision registering type!");
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Register base classes
|
|
48
|
+
for (int i = 0; i < inRTTI->GetBaseClassCount(); ++i)
|
|
49
|
+
if (!Register(inRTTI->GetBaseClass(i)))
|
|
50
|
+
return false;
|
|
51
|
+
|
|
52
|
+
#ifdef JPH_OBJECT_STREAM
|
|
53
|
+
// Register attribute classes
|
|
54
|
+
for (int i = 0; i < inRTTI->GetAttributeCount(); ++i)
|
|
55
|
+
{
|
|
56
|
+
const RTTI *rtti = inRTTI->GetAttribute(i).GetMemberPrimitiveType();
|
|
57
|
+
if (rtti != nullptr && !Register(rtti))
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
#endif // JPH_OBJECT_STREAM
|
|
61
|
+
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
bool Factory::Register(const RTTI **inRTTIs, uint inNumber)
|
|
66
|
+
{
|
|
67
|
+
mClassHashMap.reserve(mClassHashMap.size() + inNumber);
|
|
68
|
+
mClassNameMap.reserve(mClassNameMap.size() + inNumber);
|
|
69
|
+
|
|
70
|
+
for (const RTTI **rtti = inRTTIs; rtti < inRTTIs + inNumber; ++rtti)
|
|
71
|
+
if (!Register(*rtti))
|
|
72
|
+
return false;
|
|
73
|
+
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
void Factory::Clear()
|
|
78
|
+
{
|
|
79
|
+
mClassNameMap.clear();
|
|
80
|
+
mClassHashMap.clear();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
Array<const RTTI *> Factory::GetAllClasses() const
|
|
84
|
+
{
|
|
85
|
+
Array<const RTTI *> all_classes;
|
|
86
|
+
all_classes.reserve(mClassNameMap.size());
|
|
87
|
+
for (const ClassNameMap::value_type &c : mClassNameMap)
|
|
88
|
+
all_classes.push_back(c.second);
|
|
89
|
+
return all_classes;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,54 @@
|
|
|
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/RTTI.h>
|
|
8
|
+
#include <Jolt/Core/UnorderedMap.h>
|
|
9
|
+
|
|
10
|
+
JPH_NAMESPACE_BEGIN
|
|
11
|
+
|
|
12
|
+
/// This class is responsible for creating instances of classes based on their name or hash and is mainly used for deserialization of saved data.
|
|
13
|
+
class JPH_EXPORT Factory
|
|
14
|
+
{
|
|
15
|
+
public:
|
|
16
|
+
JPH_OVERRIDE_NEW_DELETE
|
|
17
|
+
|
|
18
|
+
/// Create an object
|
|
19
|
+
void * CreateObject(const char *inName);
|
|
20
|
+
|
|
21
|
+
/// Find type info for a specific class by name
|
|
22
|
+
const RTTI * Find(const char *inName);
|
|
23
|
+
|
|
24
|
+
/// Find type info for a specific class by hash
|
|
25
|
+
const RTTI * Find(uint32 inHash);
|
|
26
|
+
|
|
27
|
+
/// Register an object with the factory. Returns false on failure.
|
|
28
|
+
bool Register(const RTTI *inRTTI);
|
|
29
|
+
|
|
30
|
+
/// Register a list of objects with the factory. Returns false on failure.
|
|
31
|
+
bool Register(const RTTI **inRTTIs, uint inNumber);
|
|
32
|
+
|
|
33
|
+
/// Unregisters all types
|
|
34
|
+
void Clear();
|
|
35
|
+
|
|
36
|
+
/// Get all registered classes
|
|
37
|
+
Array<const RTTI *> GetAllClasses() const;
|
|
38
|
+
|
|
39
|
+
/// Singleton factory instance
|
|
40
|
+
static Factory * sInstance;
|
|
41
|
+
|
|
42
|
+
private:
|
|
43
|
+
using ClassNameMap = UnorderedMap<string_view, const RTTI *>;
|
|
44
|
+
|
|
45
|
+
using ClassHashMap = UnorderedMap<uint32, const RTTI *>;
|
|
46
|
+
|
|
47
|
+
/// Map of class names to type info
|
|
48
|
+
ClassNameMap mClassNameMap;
|
|
49
|
+
|
|
50
|
+
// Map of class hash to type info
|
|
51
|
+
ClassHashMap mClassHashMap;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,122 @@
|
|
|
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/NonCopyable.h>
|
|
8
|
+
#include <Jolt/Core/Mutex.h>
|
|
9
|
+
#include <Jolt/Core/Atomics.h>
|
|
10
|
+
|
|
11
|
+
JPH_NAMESPACE_BEGIN
|
|
12
|
+
|
|
13
|
+
/// Class that allows lock free creation / destruction of objects (unless a new page of objects needs to be allocated)
|
|
14
|
+
/// It contains a fixed pool of objects and also allows batching up a lot of objects to be destroyed
|
|
15
|
+
/// and doing the actual free in a single atomic operation
|
|
16
|
+
template <typename Object>
|
|
17
|
+
class FixedSizeFreeList : public NonCopyable
|
|
18
|
+
{
|
|
19
|
+
private:
|
|
20
|
+
/// Storage type for an Object
|
|
21
|
+
struct ObjectStorage
|
|
22
|
+
{
|
|
23
|
+
/// The object we're storing
|
|
24
|
+
Object mObject;
|
|
25
|
+
|
|
26
|
+
/// When the object is freed (or in the process of being freed as a batch) this will contain the next free object
|
|
27
|
+
/// When an object is in use it will contain the object's index in the free list
|
|
28
|
+
atomic<uint32> mNextFreeObject;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
static_assert(alignof(ObjectStorage) == alignof(Object), "Object not properly aligned");
|
|
32
|
+
|
|
33
|
+
/// Access the object storage given the object index
|
|
34
|
+
const ObjectStorage & GetStorage(uint32 inObjectIndex) const { return mPages[inObjectIndex >> mPageShift][inObjectIndex & mObjectMask]; }
|
|
35
|
+
ObjectStorage & GetStorage(uint32 inObjectIndex) { return mPages[inObjectIndex >> mPageShift][inObjectIndex & mObjectMask]; }
|
|
36
|
+
|
|
37
|
+
/// Size (in objects) of a single page
|
|
38
|
+
uint32 mPageSize;
|
|
39
|
+
|
|
40
|
+
/// Number of bits to shift an object index to the right to get the page number
|
|
41
|
+
uint32 mPageShift;
|
|
42
|
+
|
|
43
|
+
/// Mask to and an object index with to get the page number
|
|
44
|
+
uint32 mObjectMask;
|
|
45
|
+
|
|
46
|
+
/// Total number of pages that are usable
|
|
47
|
+
uint32 mNumPages;
|
|
48
|
+
|
|
49
|
+
/// Total number of objects that have been allocated
|
|
50
|
+
uint32 mNumObjectsAllocated;
|
|
51
|
+
|
|
52
|
+
/// Array of pages of objects
|
|
53
|
+
ObjectStorage ** mPages = nullptr;
|
|
54
|
+
|
|
55
|
+
/// Mutex that is used to allocate a new page if the storage runs out
|
|
56
|
+
/// This variable is aligned to the cache line to prevent false sharing with
|
|
57
|
+
/// the constants used to index into the list via `Get()`.
|
|
58
|
+
alignas(JPH_CACHE_LINE_SIZE) Mutex mPageMutex;
|
|
59
|
+
|
|
60
|
+
/// Number of objects that we currently have in the free list / new pages
|
|
61
|
+
#ifdef JPH_ENABLE_ASSERTS
|
|
62
|
+
atomic<uint32> mNumFreeObjects;
|
|
63
|
+
#endif // JPH_ENABLE_ASSERTS
|
|
64
|
+
|
|
65
|
+
/// Simple counter that makes the first free object pointer update with every CAS so that we don't suffer from the ABA problem
|
|
66
|
+
atomic<uint32> mAllocationTag;
|
|
67
|
+
|
|
68
|
+
/// Index of first free object, the first 32 bits of an object are used to point to the next free object
|
|
69
|
+
atomic<uint64> mFirstFreeObjectAndTag;
|
|
70
|
+
|
|
71
|
+
/// The first free object to use when the free list is empty (may need to allocate a new page)
|
|
72
|
+
atomic<uint32> mFirstFreeObjectInNewPage;
|
|
73
|
+
|
|
74
|
+
public:
|
|
75
|
+
/// Invalid index
|
|
76
|
+
static const uint32 cInvalidObjectIndex = 0xffffffff;
|
|
77
|
+
|
|
78
|
+
/// Size of an object + bookkeeping for the freelist
|
|
79
|
+
static const int ObjectStorageSize = sizeof(ObjectStorage);
|
|
80
|
+
|
|
81
|
+
/// Destructor
|
|
82
|
+
inline ~FixedSizeFreeList();
|
|
83
|
+
|
|
84
|
+
/// Initialize the free list, up to inMaxObjects can be allocated
|
|
85
|
+
inline void Init(uint inMaxObjects, uint inPageSize);
|
|
86
|
+
|
|
87
|
+
/// Lockless construct a new object, inParameters are passed on to the constructor
|
|
88
|
+
template <typename... Parameters>
|
|
89
|
+
inline uint32 ConstructObject(Parameters &&... inParameters);
|
|
90
|
+
|
|
91
|
+
/// Lockless destruct an object and return it to the free pool
|
|
92
|
+
inline void DestructObject(uint32 inObjectIndex);
|
|
93
|
+
|
|
94
|
+
/// Lockless destruct an object and return it to the free pool
|
|
95
|
+
inline void DestructObject(Object *inObject);
|
|
96
|
+
|
|
97
|
+
/// A batch of objects that can be destructed
|
|
98
|
+
struct Batch
|
|
99
|
+
{
|
|
100
|
+
uint32 mFirstObjectIndex = cInvalidObjectIndex;
|
|
101
|
+
uint32 mLastObjectIndex = cInvalidObjectIndex;
|
|
102
|
+
uint32 mNumObjects = 0;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/// Add a object to an existing batch to be destructed.
|
|
106
|
+
/// Adding objects to a batch does not destroy or modify the objects, this will merely link them
|
|
107
|
+
/// so that the entire batch can be returned to the free list in a single atomic operation
|
|
108
|
+
inline void AddObjectToBatch(Batch &ioBatch, uint32 inObjectIndex);
|
|
109
|
+
|
|
110
|
+
/// Lockless destruct batch of objects
|
|
111
|
+
inline void DestructObjectBatch(Batch &ioBatch);
|
|
112
|
+
|
|
113
|
+
/// Access an object by index.
|
|
114
|
+
inline Object & Get(uint32 inObjectIndex) { return GetStorage(inObjectIndex).mObject; }
|
|
115
|
+
|
|
116
|
+
/// Access an object by index.
|
|
117
|
+
inline const Object & Get(uint32 inObjectIndex) const { return GetStorage(inObjectIndex).mObject; }
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
JPH_NAMESPACE_END
|
|
121
|
+
|
|
122
|
+
#include "FixedSizeFreeList.inl"
|