@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,211 @@
|
|
|
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
|
+
JPH_NAMESPACE_BEGIN
|
|
8
|
+
|
|
9
|
+
/// Templatized vector class
|
|
10
|
+
template <uint Rows>
|
|
11
|
+
class [[nodiscard]] Vector
|
|
12
|
+
{
|
|
13
|
+
public:
|
|
14
|
+
/// Constructor
|
|
15
|
+
inline Vector() = default;
|
|
16
|
+
inline Vector(const Vector &) = default;
|
|
17
|
+
|
|
18
|
+
/// Dimensions
|
|
19
|
+
inline uint GetRows() const { return Rows; }
|
|
20
|
+
|
|
21
|
+
/// Vector with all zeros
|
|
22
|
+
inline void SetZero()
|
|
23
|
+
{
|
|
24
|
+
for (uint r = 0; r < Rows; ++r)
|
|
25
|
+
mF32[r] = 0.0f;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
inline static Vector sZero() { Vector v; v.SetZero(); return v; }
|
|
29
|
+
|
|
30
|
+
/// Copy a (part) of another vector into this vector
|
|
31
|
+
template <class OtherVector>
|
|
32
|
+
void CopyPart(const OtherVector &inV, uint inSourceRow, uint inNumRows, uint inDestRow)
|
|
33
|
+
{
|
|
34
|
+
for (uint r = 0; r < inNumRows; ++r)
|
|
35
|
+
mF32[inDestRow + r] = inV[inSourceRow + r];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/// Get float component by index
|
|
39
|
+
inline float operator [] (uint inCoordinate) const
|
|
40
|
+
{
|
|
41
|
+
JPH_ASSERT(inCoordinate < Rows);
|
|
42
|
+
return mF32[inCoordinate];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
inline float & operator [] (uint inCoordinate)
|
|
46
|
+
{
|
|
47
|
+
JPH_ASSERT(inCoordinate < Rows);
|
|
48
|
+
return mF32[inCoordinate];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/// Comparison
|
|
52
|
+
inline bool operator == (const Vector &inV2) const
|
|
53
|
+
{
|
|
54
|
+
for (uint r = 0; r < Rows; ++r)
|
|
55
|
+
if (mF32[r] != inV2.mF32[r])
|
|
56
|
+
return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
inline bool operator != (const Vector &inV2) const
|
|
61
|
+
{
|
|
62
|
+
for (uint r = 0; r < Rows; ++r)
|
|
63
|
+
if (mF32[r] != inV2.mF32[r])
|
|
64
|
+
return true;
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// Test if vector consists of all zeros
|
|
69
|
+
inline bool IsZero() const
|
|
70
|
+
{
|
|
71
|
+
for (uint r = 0; r < Rows; ++r)
|
|
72
|
+
if (mF32[r] != 0.0f)
|
|
73
|
+
return false;
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/// Test if two vectors are close to each other
|
|
78
|
+
inline bool IsClose(const Vector &inV2, float inMaxDistSq = 1.0e-12f) const
|
|
79
|
+
{
|
|
80
|
+
return (inV2 - *this).LengthSq() <= inMaxDistSq;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/// Assignment
|
|
84
|
+
inline Vector & operator = (const Vector &) = default;
|
|
85
|
+
|
|
86
|
+
/// Multiply vector with float
|
|
87
|
+
inline Vector operator * (const float inV2) const
|
|
88
|
+
{
|
|
89
|
+
Vector v;
|
|
90
|
+
for (uint r = 0; r < Rows; ++r)
|
|
91
|
+
v.mF32[r] = mF32[r] * inV2;
|
|
92
|
+
return v;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
inline Vector & operator *= (const float inV2)
|
|
96
|
+
{
|
|
97
|
+
for (uint r = 0; r < Rows; ++r)
|
|
98
|
+
mF32[r] *= inV2;
|
|
99
|
+
return *this;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/// Multiply vector with float
|
|
103
|
+
inline friend Vector operator * (const float inV1, const Vector &inV2)
|
|
104
|
+
{
|
|
105
|
+
return inV2 * inV1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/// Divide vector by float
|
|
109
|
+
inline Vector operator / (float inV2) const
|
|
110
|
+
{
|
|
111
|
+
Vector v;
|
|
112
|
+
for (uint r = 0; r < Rows; ++r)
|
|
113
|
+
v.mF32[r] = mF32[r] / inV2;
|
|
114
|
+
return v;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
inline Vector & operator /= (float inV2)
|
|
118
|
+
{
|
|
119
|
+
for (uint r = 0; r < Rows; ++r)
|
|
120
|
+
mF32[r] /= inV2;
|
|
121
|
+
return *this;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// Add two float vectors (component wise)
|
|
125
|
+
inline Vector operator + (const Vector &inV2) const
|
|
126
|
+
{
|
|
127
|
+
Vector v;
|
|
128
|
+
for (uint r = 0; r < Rows; ++r)
|
|
129
|
+
v.mF32[r] = mF32[r] + inV2.mF32[r];
|
|
130
|
+
return v;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
inline Vector & operator += (const Vector &inV2)
|
|
134
|
+
{
|
|
135
|
+
for (uint r = 0; r < Rows; ++r)
|
|
136
|
+
mF32[r] += inV2.mF32[r];
|
|
137
|
+
return *this;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/// Negate
|
|
141
|
+
inline Vector operator - () const
|
|
142
|
+
{
|
|
143
|
+
Vector v;
|
|
144
|
+
for (uint r = 0; r < Rows; ++r)
|
|
145
|
+
v.mF32[r] = -mF32[r];
|
|
146
|
+
return v;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/// Subtract two float vectors (component wise)
|
|
150
|
+
inline Vector operator - (const Vector &inV2) const
|
|
151
|
+
{
|
|
152
|
+
Vector v;
|
|
153
|
+
for (uint r = 0; r < Rows; ++r)
|
|
154
|
+
v.mF32[r] = mF32[r] - inV2.mF32[r];
|
|
155
|
+
return v;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
inline Vector & operator -= (const Vector &inV2)
|
|
159
|
+
{
|
|
160
|
+
for (uint r = 0; r < Rows; ++r)
|
|
161
|
+
mF32[r] -= inV2.mF32[r];
|
|
162
|
+
return *this;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/// Dot product
|
|
166
|
+
inline float Dot(const Vector &inV2) const
|
|
167
|
+
{
|
|
168
|
+
float dot = 0.0f;
|
|
169
|
+
for (uint r = 0; r < Rows; ++r)
|
|
170
|
+
dot += mF32[r] * inV2.mF32[r];
|
|
171
|
+
return dot;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/// Squared length of vector
|
|
175
|
+
inline float LengthSq() const
|
|
176
|
+
{
|
|
177
|
+
return Dot(*this);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/// Length of vector
|
|
181
|
+
inline float Length() const
|
|
182
|
+
{
|
|
183
|
+
return sqrt(LengthSq());
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/// Check if vector is normalized
|
|
187
|
+
inline bool IsNormalized(float inToleranceSq = 1.0e-6f)
|
|
188
|
+
{
|
|
189
|
+
return abs(LengthSq() - 1.0f) <= inToleranceSq;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/// Normalize vector
|
|
193
|
+
inline Vector Normalized() const
|
|
194
|
+
{
|
|
195
|
+
return *this / Length();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/// To String
|
|
199
|
+
friend ostream & operator << (ostream &inStream, const Vector &inV)
|
|
200
|
+
{
|
|
201
|
+
inStream << "[";
|
|
202
|
+
for (uint i = 0; i < Rows - 1; ++i)
|
|
203
|
+
inStream << inV.mF32[i] << ", ";
|
|
204
|
+
inStream << inV.mF32[Rows - 1] << "]";
|
|
205
|
+
return inStream;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
float mF32[Rows];
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
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
|
+
|
|
9
|
+
JPH_NAMESPACE_BEGIN
|
|
10
|
+
|
|
11
|
+
/// Helper functions to get the underlying RTTI type of a type (so e.g. Array<sometype> will return sometype)
|
|
12
|
+
template <class T>
|
|
13
|
+
const RTTI *GetPrimitiveTypeOfType(T *)
|
|
14
|
+
{
|
|
15
|
+
return GetRTTIOfType((T *)nullptr);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
template <class T>
|
|
19
|
+
const RTTI *GetPrimitiveTypeOfType(T **)
|
|
20
|
+
{
|
|
21
|
+
return GetRTTIOfType((T *)nullptr);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
template <class T>
|
|
25
|
+
const RTTI *GetPrimitiveTypeOfType(Ref<T> *)
|
|
26
|
+
{
|
|
27
|
+
return GetRTTIOfType((T *)nullptr);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
template <class T>
|
|
31
|
+
const RTTI *GetPrimitiveTypeOfType(RefConst<T> *)
|
|
32
|
+
{
|
|
33
|
+
return GetRTTIOfType((T *)nullptr);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
template <class T, class A>
|
|
37
|
+
const RTTI *GetPrimitiveTypeOfType(Array<T, A> *)
|
|
38
|
+
{
|
|
39
|
+
return GetPrimitiveTypeOfType((T *)nullptr);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
template <class T, uint N>
|
|
43
|
+
const RTTI *GetPrimitiveTypeOfType(StaticArray<T, N> *)
|
|
44
|
+
{
|
|
45
|
+
return GetPrimitiveTypeOfType((T *)nullptr);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
template <class T, uint N>
|
|
49
|
+
const RTTI *GetPrimitiveTypeOfType(T (*)[N])
|
|
50
|
+
{
|
|
51
|
+
return GetPrimitiveTypeOfType((T *)nullptr);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
JPH_NAMESPACE_END
|
|
@@ -0,0 +1,38 @@
|
|
|
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/ObjectStream/ObjectStream.h>
|
|
8
|
+
|
|
9
|
+
#ifdef JPH_OBJECT_STREAM
|
|
10
|
+
|
|
11
|
+
JPH_NAMESPACE_BEGIN
|
|
12
|
+
|
|
13
|
+
// Define macro to declare functions for a specific primitive type
|
|
14
|
+
#define JPH_DECLARE_PRIMITIVE(name) \
|
|
15
|
+
bool OSIsType(name *, int inArrayDepth, EOSDataType inDataType, const char *inClassName) \
|
|
16
|
+
{ \
|
|
17
|
+
return inArrayDepth == 0 && inDataType == EOSDataType::T_##name; \
|
|
18
|
+
} \
|
|
19
|
+
bool OSReadData(IObjectStreamIn &ioStream, name &outPrimitive) \
|
|
20
|
+
{ \
|
|
21
|
+
return ioStream.ReadPrimitiveData(outPrimitive); \
|
|
22
|
+
} \
|
|
23
|
+
void OSWriteDataType(IObjectStreamOut &ioStream, name *) \
|
|
24
|
+
{ \
|
|
25
|
+
ioStream.WriteDataType(EOSDataType::T_##name); \
|
|
26
|
+
} \
|
|
27
|
+
void OSWriteData(IObjectStreamOut &ioStream, const name &inPrimitive) \
|
|
28
|
+
{ \
|
|
29
|
+
ioStream.HintNextItem(); \
|
|
30
|
+
ioStream.WritePrimitiveData(inPrimitive); \
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// This file uses the JPH_DECLARE_PRIMITIVE macro to define all types
|
|
34
|
+
#include <Jolt/ObjectStream/ObjectStreamTypes.h>
|
|
35
|
+
|
|
36
|
+
JPH_NAMESPACE_END
|
|
37
|
+
|
|
38
|
+
#endif // JPH_OBJECT_STREAM
|
|
@@ -0,0 +1,337 @@
|
|
|
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/StaticArray.h>
|
|
8
|
+
#include <Jolt/Core/Reference.h>
|
|
9
|
+
#include <Jolt/Core/RTTI.h>
|
|
10
|
+
#include <Jolt/Core/NonCopyable.h>
|
|
11
|
+
#include <Jolt/ObjectStream/SerializableAttribute.h>
|
|
12
|
+
|
|
13
|
+
#ifdef JPH_OBJECT_STREAM
|
|
14
|
+
|
|
15
|
+
JPH_NAMESPACE_BEGIN
|
|
16
|
+
|
|
17
|
+
/// Base class for object stream input and output streams.
|
|
18
|
+
class JPH_EXPORT ObjectStream : public NonCopyable
|
|
19
|
+
{
|
|
20
|
+
public:
|
|
21
|
+
/// Stream type
|
|
22
|
+
enum class EStreamType
|
|
23
|
+
{
|
|
24
|
+
Text,
|
|
25
|
+
Binary,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
protected:
|
|
29
|
+
/// Destructor
|
|
30
|
+
virtual ~ObjectStream() = default;
|
|
31
|
+
|
|
32
|
+
/// Identifier for objects
|
|
33
|
+
using Identifier = uint32;
|
|
34
|
+
|
|
35
|
+
static constexpr int sVersion = 1;
|
|
36
|
+
static constexpr int sRevision = 0;
|
|
37
|
+
static constexpr Identifier sNullIdentifier = 0;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/// Interface class for reading from an object stream
|
|
41
|
+
class JPH_EXPORT IObjectStreamIn : public ObjectStream
|
|
42
|
+
{
|
|
43
|
+
public:
|
|
44
|
+
///@name Input type specific operations
|
|
45
|
+
virtual bool ReadDataType(EOSDataType &outType) = 0;
|
|
46
|
+
virtual bool ReadName(String &outName) = 0;
|
|
47
|
+
virtual bool ReadIdentifier(Identifier &outIdentifier) = 0;
|
|
48
|
+
virtual bool ReadCount(uint32 &outCount) = 0;
|
|
49
|
+
|
|
50
|
+
///@name Read primitives
|
|
51
|
+
virtual bool ReadPrimitiveData(uint8 &outPrimitive) = 0;
|
|
52
|
+
virtual bool ReadPrimitiveData(uint16 &outPrimitive) = 0;
|
|
53
|
+
virtual bool ReadPrimitiveData(int &outPrimitive) = 0;
|
|
54
|
+
virtual bool ReadPrimitiveData(uint32 &outPrimitive) = 0;
|
|
55
|
+
virtual bool ReadPrimitiveData(uint64 &outPrimitive) = 0;
|
|
56
|
+
virtual bool ReadPrimitiveData(float &outPrimitive) = 0;
|
|
57
|
+
virtual bool ReadPrimitiveData(double &outPrimitive) = 0;
|
|
58
|
+
virtual bool ReadPrimitiveData(bool &outPrimitive) = 0;
|
|
59
|
+
virtual bool ReadPrimitiveData(String &outPrimitive) = 0;
|
|
60
|
+
virtual bool ReadPrimitiveData(Float3 &outPrimitive) = 0;
|
|
61
|
+
virtual bool ReadPrimitiveData(Float4 &outPrimitive) = 0;
|
|
62
|
+
virtual bool ReadPrimitiveData(Double3 &outPrimitive) = 0;
|
|
63
|
+
virtual bool ReadPrimitiveData(Vec3 &outPrimitive) = 0;
|
|
64
|
+
virtual bool ReadPrimitiveData(DVec3 &outPrimitive) = 0;
|
|
65
|
+
virtual bool ReadPrimitiveData(Vec4 &outPrimitive) = 0;
|
|
66
|
+
virtual bool ReadPrimitiveData(UVec4 &outPrimitive) = 0;
|
|
67
|
+
virtual bool ReadPrimitiveData(Quat &outPrimitive) = 0;
|
|
68
|
+
virtual bool ReadPrimitiveData(Mat44 &outPrimitive) = 0;
|
|
69
|
+
virtual bool ReadPrimitiveData(DMat44 &outPrimitive) = 0;
|
|
70
|
+
|
|
71
|
+
///@name Read compounds
|
|
72
|
+
virtual bool ReadClassData(const char *inClassName, void *inInstance) = 0;
|
|
73
|
+
virtual bool ReadPointerData(const RTTI *inRTTI, void **inPointer, int inRefCountOffset = -1) = 0;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/// Interface class for writing to an object stream
|
|
77
|
+
class JPH_EXPORT IObjectStreamOut : public ObjectStream
|
|
78
|
+
{
|
|
79
|
+
public:
|
|
80
|
+
///@name Output type specific operations
|
|
81
|
+
virtual void WriteDataType(EOSDataType inType) = 0;
|
|
82
|
+
virtual void WriteName(const char *inName) = 0;
|
|
83
|
+
virtual void WriteIdentifier(Identifier inIdentifier) = 0;
|
|
84
|
+
virtual void WriteCount(uint32 inCount) = 0;
|
|
85
|
+
|
|
86
|
+
///@name Write primitives
|
|
87
|
+
virtual void WritePrimitiveData(const uint8 &inPrimitive) = 0;
|
|
88
|
+
virtual void WritePrimitiveData(const uint16 &inPrimitive) = 0;
|
|
89
|
+
virtual void WritePrimitiveData(const int &inPrimitive) = 0;
|
|
90
|
+
virtual void WritePrimitiveData(const uint32 &inPrimitive) = 0;
|
|
91
|
+
virtual void WritePrimitiveData(const uint64 &inPrimitive) = 0;
|
|
92
|
+
virtual void WritePrimitiveData(const float &inPrimitive) = 0;
|
|
93
|
+
virtual void WritePrimitiveData(const double &inPrimitive) = 0;
|
|
94
|
+
virtual void WritePrimitiveData(const bool &inPrimitive) = 0;
|
|
95
|
+
virtual void WritePrimitiveData(const String &inPrimitive) = 0;
|
|
96
|
+
virtual void WritePrimitiveData(const Float3 &inPrimitive) = 0;
|
|
97
|
+
virtual void WritePrimitiveData(const Float4 &inPrimitive) = 0;
|
|
98
|
+
virtual void WritePrimitiveData(const Double3 &inPrimitive) = 0;
|
|
99
|
+
virtual void WritePrimitiveData(const Vec3 &inPrimitive) = 0;
|
|
100
|
+
virtual void WritePrimitiveData(const DVec3 &inPrimitive) = 0;
|
|
101
|
+
virtual void WritePrimitiveData(const Vec4 &inPrimitive) = 0;
|
|
102
|
+
virtual void WritePrimitiveData(const UVec4 &inPrimitive) = 0;
|
|
103
|
+
virtual void WritePrimitiveData(const Quat &inPrimitive) = 0;
|
|
104
|
+
virtual void WritePrimitiveData(const Mat44 &inPrimitive) = 0;
|
|
105
|
+
virtual void WritePrimitiveData(const DMat44 &inPrimitive) = 0;
|
|
106
|
+
|
|
107
|
+
///@name Write compounds
|
|
108
|
+
virtual void WritePointerData(const RTTI *inRTTI, const void *inPointer) = 0;
|
|
109
|
+
virtual void WriteClassData(const RTTI *inRTTI, const void *inInstance) = 0;
|
|
110
|
+
|
|
111
|
+
///@name Layout hints (for text output)
|
|
112
|
+
virtual void HintNextItem() { /* Default is do nothing */ }
|
|
113
|
+
virtual void HintIndentUp() { /* Default is do nothing */ }
|
|
114
|
+
virtual void HintIndentDown() { /* Default is do nothing */ }
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Define macro to declare functions for a specific primitive type
|
|
118
|
+
#define JPH_DECLARE_PRIMITIVE(name) \
|
|
119
|
+
JPH_EXPORT bool OSIsType(name *, int inArrayDepth, EOSDataType inDataType, const char *inClassName); \
|
|
120
|
+
JPH_EXPORT bool OSReadData(IObjectStreamIn &ioStream, name &outPrimitive); \
|
|
121
|
+
JPH_EXPORT void OSWriteDataType(IObjectStreamOut &ioStream, name *); \
|
|
122
|
+
JPH_EXPORT void OSWriteData(IObjectStreamOut &ioStream, const name &inPrimitive);
|
|
123
|
+
|
|
124
|
+
// This file uses the JPH_DECLARE_PRIMITIVE macro to define all types
|
|
125
|
+
#include <Jolt/ObjectStream/ObjectStreamTypes.h>
|
|
126
|
+
|
|
127
|
+
// Define serialization templates
|
|
128
|
+
template <class T, class A>
|
|
129
|
+
bool OSIsType(Array<T, A> *, int inArrayDepth, EOSDataType inDataType, const char *inClassName)
|
|
130
|
+
{
|
|
131
|
+
return (inArrayDepth > 0 && OSIsType(static_cast<T *>(nullptr), inArrayDepth - 1, inDataType, inClassName));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
template <class T, uint N>
|
|
135
|
+
bool OSIsType(StaticArray<T, N> *, int inArrayDepth, EOSDataType inDataType, const char *inClassName)
|
|
136
|
+
{
|
|
137
|
+
return (inArrayDepth > 0 && OSIsType(static_cast<T *>(nullptr), inArrayDepth - 1, inDataType, inClassName));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
template <class T, uint N>
|
|
141
|
+
bool OSIsType(T (*)[N], int inArrayDepth, EOSDataType inDataType, const char *inClassName)
|
|
142
|
+
{
|
|
143
|
+
return (inArrayDepth > 0 && OSIsType(static_cast<T *>(nullptr), inArrayDepth - 1, inDataType, inClassName));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
template <class T>
|
|
147
|
+
bool OSIsType(Ref<T> *, int inArrayDepth, EOSDataType inDataType, const char *inClassName)
|
|
148
|
+
{
|
|
149
|
+
return OSIsType(static_cast<T *>(nullptr), inArrayDepth, inDataType, inClassName);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
template <class T>
|
|
153
|
+
bool OSIsType(RefConst<T> *, int inArrayDepth, EOSDataType inDataType, const char *inClassName)
|
|
154
|
+
{
|
|
155
|
+
return OSIsType(static_cast<T *>(nullptr), inArrayDepth, inDataType, inClassName);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/// Define serialization templates for dynamic arrays
|
|
159
|
+
template <class T, class A>
|
|
160
|
+
bool OSReadData(IObjectStreamIn &ioStream, Array<T, A> &inArray)
|
|
161
|
+
{
|
|
162
|
+
bool continue_reading = true;
|
|
163
|
+
|
|
164
|
+
// Read array length
|
|
165
|
+
uint32 array_length;
|
|
166
|
+
continue_reading = ioStream.ReadCount(array_length);
|
|
167
|
+
|
|
168
|
+
// Read array items
|
|
169
|
+
if (continue_reading)
|
|
170
|
+
{
|
|
171
|
+
inArray.clear();
|
|
172
|
+
inArray.resize(array_length);
|
|
173
|
+
for (uint32 el = 0; el < array_length && continue_reading; ++el)
|
|
174
|
+
continue_reading = OSReadData(ioStream, inArray[el]);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return continue_reading;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/// Define serialization templates for static arrays
|
|
181
|
+
template <class T, uint N>
|
|
182
|
+
bool OSReadData(IObjectStreamIn &ioStream, StaticArray<T, N> &inArray)
|
|
183
|
+
{
|
|
184
|
+
bool continue_reading = true;
|
|
185
|
+
|
|
186
|
+
// Read array length
|
|
187
|
+
uint32 array_length;
|
|
188
|
+
continue_reading = ioStream.ReadCount(array_length);
|
|
189
|
+
|
|
190
|
+
// Check if we can fit this many elements
|
|
191
|
+
if (array_length > N)
|
|
192
|
+
return false;
|
|
193
|
+
|
|
194
|
+
// Read array items
|
|
195
|
+
if (continue_reading)
|
|
196
|
+
{
|
|
197
|
+
inArray.clear();
|
|
198
|
+
inArray.resize(array_length);
|
|
199
|
+
for (uint32 el = 0; el < array_length && continue_reading; ++el)
|
|
200
|
+
continue_reading = OSReadData(ioStream, inArray[el]);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return continue_reading;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/// Define serialization templates for C style arrays
|
|
207
|
+
template <class T, uint N>
|
|
208
|
+
bool OSReadData(IObjectStreamIn &ioStream, T (&inArray)[N])
|
|
209
|
+
{
|
|
210
|
+
bool continue_reading = true;
|
|
211
|
+
|
|
212
|
+
// Read array length
|
|
213
|
+
uint32 array_length;
|
|
214
|
+
continue_reading = ioStream.ReadCount(array_length);
|
|
215
|
+
if (array_length != N)
|
|
216
|
+
return false;
|
|
217
|
+
|
|
218
|
+
// Read array items
|
|
219
|
+
for (uint32 el = 0; el < N && continue_reading; ++el)
|
|
220
|
+
continue_reading = OSReadData(ioStream, inArray[el]);
|
|
221
|
+
|
|
222
|
+
return continue_reading;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/// Define serialization templates for references
|
|
226
|
+
template <class T>
|
|
227
|
+
bool OSReadData(IObjectStreamIn &ioStream, Ref<T> &inRef)
|
|
228
|
+
{
|
|
229
|
+
return ioStream.ReadPointerData(JPH_RTTI(T), inRef.InternalGetPointer(), T::sInternalGetRefCountOffset());
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
template <class T>
|
|
233
|
+
bool OSReadData(IObjectStreamIn &ioStream, RefConst<T> &inRef)
|
|
234
|
+
{
|
|
235
|
+
return ioStream.ReadPointerData(JPH_RTTI(T), inRef.InternalGetPointer(), T::sInternalGetRefCountOffset());
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Define serialization templates for dynamic arrays
|
|
239
|
+
template <class T, class A>
|
|
240
|
+
void OSWriteDataType(IObjectStreamOut &ioStream, Array<T, A> *)
|
|
241
|
+
{
|
|
242
|
+
ioStream.WriteDataType(EOSDataType::Array);
|
|
243
|
+
OSWriteDataType(ioStream, static_cast<T *>(nullptr));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
template <class T, class A>
|
|
247
|
+
void OSWriteData(IObjectStreamOut &ioStream, const Array<T, A> &inArray)
|
|
248
|
+
{
|
|
249
|
+
// Write size of array
|
|
250
|
+
ioStream.HintNextItem();
|
|
251
|
+
ioStream.WriteCount(static_cast<uint32>(inArray.size()));
|
|
252
|
+
|
|
253
|
+
// Write data in array
|
|
254
|
+
ioStream.HintIndentUp();
|
|
255
|
+
for (const T &v : inArray)
|
|
256
|
+
OSWriteData(ioStream, v);
|
|
257
|
+
ioStream.HintIndentDown();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/// Define serialization templates for static arrays
|
|
261
|
+
template <class T, uint N>
|
|
262
|
+
void OSWriteDataType(IObjectStreamOut &ioStream, StaticArray<T, N> *)
|
|
263
|
+
{
|
|
264
|
+
ioStream.WriteDataType(EOSDataType::Array);
|
|
265
|
+
OSWriteDataType(ioStream, static_cast<T *>(nullptr));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
template <class T, uint N>
|
|
269
|
+
void OSWriteData(IObjectStreamOut &ioStream, const StaticArray<T, N> &inArray)
|
|
270
|
+
{
|
|
271
|
+
// Write size of array
|
|
272
|
+
ioStream.HintNextItem();
|
|
273
|
+
ioStream.WriteCount(inArray.size());
|
|
274
|
+
|
|
275
|
+
// Write data in array
|
|
276
|
+
ioStream.HintIndentUp();
|
|
277
|
+
for (const typename StaticArray<T, N>::value_type &v : inArray)
|
|
278
|
+
OSWriteData(ioStream, v);
|
|
279
|
+
ioStream.HintIndentDown();
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/// Define serialization templates for C style arrays
|
|
283
|
+
template <class T, uint N>
|
|
284
|
+
void OSWriteDataType(IObjectStreamOut &ioStream, T (*)[N])
|
|
285
|
+
{
|
|
286
|
+
ioStream.WriteDataType(EOSDataType::Array);
|
|
287
|
+
OSWriteDataType(ioStream, static_cast<T *>(nullptr));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
template <class T, uint N>
|
|
291
|
+
void OSWriteData(IObjectStreamOut &ioStream, const T (&inArray)[N])
|
|
292
|
+
{
|
|
293
|
+
// Write size of array
|
|
294
|
+
ioStream.HintNextItem();
|
|
295
|
+
ioStream.WriteCount(uint32(N));
|
|
296
|
+
|
|
297
|
+
// Write data in array
|
|
298
|
+
ioStream.HintIndentUp();
|
|
299
|
+
for (const T &v : inArray)
|
|
300
|
+
OSWriteData(ioStream, v);
|
|
301
|
+
ioStream.HintIndentDown();
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/// Define serialization templates for references
|
|
305
|
+
template <class T>
|
|
306
|
+
void OSWriteDataType(IObjectStreamOut &ioStream, Ref<T> *)
|
|
307
|
+
{
|
|
308
|
+
OSWriteDataType(ioStream, static_cast<T *>(nullptr));
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
template <class T>
|
|
312
|
+
void OSWriteData(IObjectStreamOut &ioStream, const Ref<T> &inRef)
|
|
313
|
+
{
|
|
314
|
+
if (inRef != nullptr)
|
|
315
|
+
ioStream.WritePointerData(GetRTTI(inRef.GetPtr()), inRef.GetPtr());
|
|
316
|
+
else
|
|
317
|
+
ioStream.WritePointerData(nullptr, nullptr);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
template <class T>
|
|
321
|
+
void OSWriteDataType(IObjectStreamOut &ioStream, RefConst<T> *)
|
|
322
|
+
{
|
|
323
|
+
OSWriteDataType(ioStream, static_cast<T *>(nullptr));
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
template <class T>
|
|
327
|
+
void OSWriteData(IObjectStreamOut &ioStream, const RefConst<T> &inRef)
|
|
328
|
+
{
|
|
329
|
+
if (inRef != nullptr)
|
|
330
|
+
ioStream.WritePointerData(GetRTTI(inRef.GetPtr()), inRef.GetPtr());
|
|
331
|
+
else
|
|
332
|
+
ioStream.WritePointerData(nullptr, nullptr);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
JPH_NAMESPACE_END
|
|
336
|
+
|
|
337
|
+
#endif // JPH_OBJECT_STREAM
|