@series-inc/rundot-syncplay 6.0.0-rc.2 → 6.0.0-rc.21
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/README.md +133 -0
- package/core/deterministic-math.d.ts +75 -1
- package/core/native/instance_ledger.hpp +1095 -0
- package/core/native/legacy_checkpoint_ids.hpp +107 -0
- package/core/native/physics/abi.cpp +39 -211
- package/core/native/physics/abi.hpp +2 -6
- package/core/native/physics/articulation.cpp +1434 -0
- package/core/native/physics/articulation.hpp +279 -0
- package/core/native/physics/buoyancy.cpp +1588 -0
- package/core/native/physics/buoyancy.hpp +254 -0
- package/core/native/physics/capsule_triangle.cpp +168 -0
- package/core/native/physics/capsule_triangle.hpp +40 -0
- package/core/native/physics/capsule_triangle_native.inc +291 -0
- package/core/native/physics/certified_sum.hpp +218 -0
- package/core/native/physics/character.cpp +638 -0
- package/core/native/physics/character.hpp +169 -0
- package/core/native/physics/checkpoint_schema.hpp +379 -0
- package/core/native/physics/cloth.cpp +1401 -0
- package/core/native/physics/cloth.hpp +357 -0
- package/core/native/physics/constraint_rows.cpp +363 -2
- package/core/native/physics/constraint_rows.hpp +72 -1
- package/core/native/physics/deformable_query.cpp +1630 -0
- package/core/native/physics/deformable_query.hpp +578 -0
- package/core/native/physics/distance.cpp +1166 -0
- package/core/native/physics/distance.hpp +151 -0
- package/core/native/physics/exact/exact-applied.cpp +101 -0
- package/core/native/physics/exact/exact-applied.hpp +112 -0
- package/core/native/physics/exact/exact-dyadic.cpp +691 -0
- package/core/native/physics/exact/exact-dyadic.hpp +58 -0
- package/core/native/physics/exact/exact-operation.hpp +51 -0
- package/core/native/physics/exact/word-core.hpp +262 -0
- package/core/native/physics/extended_abi.cpp +1242 -0
- package/core/native/physics/extended_abi.hpp +355 -0
- package/core/native/physics/extended_abi_characters.cpp +261 -0
- package/core/native/physics/extended_abi_characters.hpp +434 -0
- package/core/native/physics/extended_abi_core_features.cpp +713 -0
- package/core/native/physics/extended_abi_core_features.hpp +226 -0
- package/core/native/physics/extended_abi_deformables.cpp +448 -0
- package/core/native/physics/extended_abi_deformables.hpp +867 -0
- package/core/native/physics/extended_abi_vehicles.cpp +411 -0
- package/core/native/physics/extended_abi_vehicles.hpp +222 -0
- package/core/native/physics/fracture.cpp +1981 -0
- package/core/native/physics/fracture.hpp +460 -0
- package/core/native/physics/gear.cpp +563 -0
- package/core/native/physics/gear.hpp +158 -0
- package/core/native/physics/geometry_memory.hpp +476 -0
- package/core/native/physics/geometry_store.cpp +547 -0
- package/core/native/physics/geometry_store.hpp +134 -0
- package/core/native/physics/lag_compensation.cpp +1626 -0
- package/core/native/physics/lag_compensation.hpp +405 -0
- package/core/native/physics/mass_properties.cpp +449 -0
- package/core/native/physics/mass_properties.hpp +23 -0
- package/core/native/physics/material_pose.hpp +988 -0
- package/core/native/physics/particles.cpp +1065 -0
- package/core/native/physics/particles.hpp +261 -0
- package/core/native/physics/path_joint.cpp +781 -0
- package/core/native/physics/path_joint.hpp +154 -0
- package/core/native/physics/physics.cpp +13043 -1065
- package/core/native/physics/physics.hpp +184 -8
- package/core/native/physics/planar_deformable.cpp +2433 -0
- package/core/native/physics/planar_deformable.hpp +889 -0
- package/core/native/physics/platformer_2d.cpp +1353 -0
- package/core/native/physics/platformer_2d.hpp +340 -0
- package/core/native/physics/powered_ragdoll.cpp +1100 -0
- package/core/native/physics/powered_ragdoll.hpp +279 -0
- package/core/native/physics/powertrain.cpp +586 -0
- package/core/native/physics/powertrain.hpp +180 -0
- package/core/native/physics/pulley.cpp +311 -0
- package/core/native/physics/pulley.hpp +121 -0
- package/core/native/physics/ragdoll.cpp +586 -0
- package/core/native/physics/ragdoll.hpp +221 -0
- package/core/native/physics/rope.cpp +692 -0
- package/core/native/physics/rope.hpp +215 -0
- package/core/native/physics/rounded_convex.cpp +1229 -0
- package/core/native/physics/rounded_convex.hpp +287 -0
- package/core/native/physics/sdf_geometry.cpp +1821 -0
- package/core/native/physics/sdf_geometry.hpp +474 -0
- package/core/native/physics/soft_body.cpp +1449 -0
- package/core/native/physics/soft_body.hpp +328 -0
- package/core/native/physics/soft_collision.cpp +1862 -0
- package/core/native/physics/soft_collision.hpp +561 -0
- package/core/native/physics/surface_velocity.cpp +366 -0
- package/core/native/physics/surface_velocity.hpp +243 -0
- package/core/native/physics/topology.cpp +357 -39
- package/core/native/physics/topology.hpp +97 -6
- package/core/native/physics/tracks.cpp +1179 -0
- package/core/native/physics/tracks.hpp +404 -0
- package/core/native/physics/vehicle.cpp +629 -0
- package/core/native/physics/vehicle.hpp +191 -0
- package/core/native/physics/voxel_cooking.cpp +1929 -0
- package/core/native/physics/voxel_cooking.hpp +395 -0
- package/core/native/physics/world.cpp +5290 -854
- package/core/native/physics/world.hpp +796 -24
- package/core/native/physics/world_abi.cpp +3840 -306
- package/core/native/physics/world_abi.hpp +530 -10
- package/core/native/physics/world_digest_visitor.hpp +277 -0
- package/core/native/physics/world_strong_digest.hpp +557 -0
- package/core/native/physics2d/ccd.cpp +1302 -0
- package/core/native/physics2d/ccd.hpp +141 -0
- package/core/native/physics2d/checkpoint_memory.hpp +349 -0
- package/core/native/physics2d/clock_primitives.hpp +138 -0
- package/core/native/physics2d/commands.cpp +174 -28
- package/core/native/physics2d/commands.hpp +3 -1
- package/core/native/physics2d/compound.cpp +581 -0
- package/core/native/physics2d/compound.hpp +248 -0
- package/core/native/physics2d/contour.cpp +325 -0
- package/core/native/physics2d/contour.hpp +143 -0
- package/core/native/physics2d/frame_scope.hpp +124 -0
- package/core/native/physics2d/joint_phases.hpp +93 -0
- package/core/native/physics2d/joints.cpp +587 -150
- package/core/native/physics2d/joints.hpp +5 -0
- package/core/native/physics2d/memory_private.hpp +125 -0
- package/core/native/physics2d/owned_abi.cpp +1354 -879
- package/core/native/physics2d/owned_abi.hpp +190 -52
- package/core/native/physics2d/phase_test_hooks.hpp +17 -0
- package/core/native/physics2d/physics2d.cpp +2073 -120
- package/core/native/physics2d/physics2d.hpp +154 -2
- package/core/native/physics2d/queries.cpp +1055 -79
- package/core/native/physics2d/queries.hpp +71 -5
- package/core/native/physics2d/world.cpp +1313 -353
- package/core/native/physics2d/world.hpp +124 -13
- package/core/native/sha256/sha256_compress_unsigned.hpp +68 -0
- package/core/native/sha256/sha256_fips_constants.hpp +24 -0
- package/core/native/sha256/sha256_length.hpp +56 -0
- package/core/native/sha256/sha256_memo.hpp +48 -0
- package/core/native/sha256/sha256_sink.hpp +234 -0
- package/core/physics2d-owned.d.ts +466 -126
- package/core/runtime.d.ts +192 -19
- package/core/scripts/build-native.mjs +34 -0
- package/core/scripts/build-wasm-physics.mjs +272 -23
- package/core/scripts/extended-physics-profile.mjs +634 -0
- package/core/scripts/generate-physics2d-vectors.mjs +59 -0
- package/core/src/kinetix-deterministic-math.d.ts +2 -0
- package/core/src/kinetix-deterministic-math.mjs +513 -27
- package/core/src/kinetix-owned-runtime-adapter.mjs +788 -0
- package/core/src/kinetix-runtime-adapter-utils.mjs +54 -6
- package/core/src/kinetix-runtime-contract.mjs +55 -9
- package/core/src/kinetix-runtime-identity.mjs +12 -1
- package/core/src/kinetix-session-config.mjs +7 -2
- package/core/src/kinetix-state-report.mjs +36 -0
- package/core/src/physics/abi-constants.mjs +5 -4
- package/core/src/physics/articulation.d.mts +194 -0
- package/core/src/physics/articulation.mjs +1141 -0
- package/core/src/physics/buoyancy.d.mts +143 -0
- package/core/src/physics/buoyancy.mjs +268 -0
- package/core/src/physics/cloth.d.mts +314 -0
- package/core/src/physics/cloth.mjs +1156 -0
- package/core/src/physics/deformable-query.d.mts +217 -0
- package/core/src/physics/deformable-query.mjs +1412 -0
- package/core/src/physics/distance.d.mts +160 -0
- package/core/src/physics/distance.mjs +175 -0
- package/core/src/physics/extended-wasm-instance.d.mts +5 -0
- package/core/src/physics/extended-wasm-instance.mjs +48 -0
- package/core/src/physics/feature-api.d.mts +74 -0
- package/core/src/physics/feature-api.mjs +98 -0
- package/core/src/physics/fracture.d.mts +133 -0
- package/core/src/physics/fracture.mjs +1324 -0
- package/core/src/physics/gear.d.mts +585 -0
- package/core/src/physics/gear.mjs +955 -0
- package/core/src/physics/lag-compensation.d.mts +101 -0
- package/core/src/physics/lag-compensation.mjs +1100 -0
- package/core/src/physics/mass-properties.d.mts +114 -0
- package/core/src/physics/mass-properties.mjs +137 -468
- package/core/src/physics/particles.d.mts +177 -0
- package/core/src/physics/particles.mjs +758 -0
- package/core/src/physics/path-joint.d.mts +171 -0
- package/core/src/physics/path-joint.mjs +1231 -0
- package/core/src/physics/physics-extended-wasm-module.generated.mjs +13 -0
- package/core/src/physics/physics-profile-wasm-module.generated.mjs +48 -0
- package/core/src/physics/physics-wasm-module.generated.mjs +34 -5
- package/core/src/physics/powered-ragdoll.d.mts +188 -0
- package/core/src/physics/powered-ragdoll.mjs +1043 -0
- package/core/src/physics/powertrain.d.mts +260 -0
- package/core/src/physics/powertrain.mjs +621 -0
- package/core/src/physics/pulley.d.mts +98 -0
- package/core/src/physics/pulley.mjs +686 -0
- package/core/src/physics/ragdoll.d.mts +289 -0
- package/core/src/physics/ragdoll.mjs +1323 -0
- package/core/src/physics/rope.d.mts +241 -0
- package/core/src/physics/rope.mjs +319 -0
- package/core/src/physics/rounded-convex.d.mts +328 -0
- package/core/src/physics/rounded-convex.mjs +1404 -0
- package/core/src/physics/sdf-geometry.d.mts +117 -0
- package/core/src/physics/sdf-geometry.mjs +1204 -0
- package/core/src/physics/soft-body.d.mts +144 -0
- package/core/src/physics/soft-body.mjs +1285 -0
- package/core/src/physics/soft-collision.d.mts +651 -0
- package/core/src/physics/soft-collision.mjs +1883 -0
- package/core/src/physics/surface-velocity.d.mts +156 -0
- package/core/src/physics/surface-velocity.mjs +722 -0
- package/core/src/physics/tracks.d.mts +411 -0
- package/core/src/physics/tracks.mjs +1074 -0
- package/core/src/physics/vehicle.d.mts +3 -0
- package/core/src/physics/vehicle.mjs +172 -0
- package/core/src/physics/voxel-cooking.d.mts +219 -0
- package/core/src/physics/voxel-cooking.mjs +1499 -0
- package/core/src/physics/voxel-swept-quad.mjs +110 -0
- package/core/src/physics/wasm-instance.mjs +160 -23
- package/core/src/physics/world.d.mts +62 -0
- package/core/src/physics/world.mjs +1947 -152
- package/core/src/physics2d/body-state.mjs +218 -15
- package/core/src/physics2d/collision.d.mts +52 -0
- package/core/src/physics2d/collision.mjs +234 -0
- package/core/src/physics2d/compound.mjs +454 -0
- package/core/src/physics2d/contour-state.mjs +771 -0
- package/core/src/physics2d/feature-api.d.mts +211 -0
- package/core/src/physics2d/feature-api.mjs +3 -0
- package/core/src/physics2d/fluid-state.mjs +145 -0
- package/core/src/physics2d/joint-state.mjs +1 -1
- package/core/src/physics2d/owned-queries.mjs +3 -1
- package/core/src/physics2d/owned-transport.mjs +268 -122
- package/core/src/physics2d/owned-world.mjs +353 -230
- package/core/src/physics2d/particle-fluid.d.mts +152 -0
- package/core/src/physics2d/particle-fluid.mjs +233 -0
- package/core/src/physics2d/physics2d-wasm-module.generated.mjs +27 -10
- package/core/src/physics2d/query-codec.mjs +61 -13
- package/core/src/physics2d/submerged-geometry.d.mts +51 -0
- package/core/src/physics2d/submerged-geometry.mjs +186 -0
- package/core/src/runtime.mjs +23 -0
- package/core/src/shared/bytes.d.mts +2 -0
- package/core/src/shared/bytes.mjs +33 -0
- package/core/src/shared/sha256.d.mts +3 -0
- package/core/src/shared/sha256.mjs +72 -22
- package/core/units.d.ts +50 -0
- package/core/world.d.ts +253 -5
- package/dist/authority-room.d.ts +9 -0
- package/dist/authority-room.js +45 -16
- package/dist/browser.d.ts +6 -5
- package/dist/browser.js +4 -3
- package/dist/cadence.d.ts +7 -0
- package/dist/cadence.js +19 -0
- package/dist/canonical.d.ts +1 -0
- package/dist/canonical.js +3 -0
- package/dist/checksum-policy.d.ts +10 -0
- package/dist/checksum-policy.js +14 -0
- package/dist/collider-cooking-hull.d.ts +18 -0
- package/dist/collider-cooking-hull.js +248 -0
- package/dist/collider-cooking.d.ts +140 -0
- package/dist/collider-cooking.js +794 -0
- package/dist/compat/v5.d.ts +121 -0
- package/dist/compat/v5.js +479 -0
- package/dist/creator.d.ts +7 -6
- package/dist/creator.js +4 -3
- package/dist/game-byte-section.d.ts +36 -0
- package/dist/game-byte-section.js +350 -0
- package/dist/index.d.ts +13 -6
- package/dist/index.js +9 -4
- package/dist/instant-replay.d.ts +27 -2
- package/dist/instant-replay.js +91 -16
- package/dist/lag-compensation3d.js +11 -10
- package/dist/match-log.d.ts +21 -4
- package/dist/match-log.js +92 -9
- package/dist/math.d.ts +2 -0
- package/dist/math.js +1 -0
- package/dist/modules/character-3d.d.ts +16 -1
- package/dist/modules/character-3d.js +42 -5
- package/dist/modules/combat.js +6 -5
- package/dist/movement3d-revision1.d.ts +2 -0
- package/dist/movement3d-revision1.js +973 -0
- package/dist/movement3d.d.ts +53 -3
- package/dist/movement3d.js +917 -247
- package/dist/networked-client.d.ts +15 -0
- package/dist/networked-client.js +378 -105
- package/dist/node.d.ts +3 -2
- package/dist/node.js +2 -1
- package/dist/physics/2d.d.ts +38 -4
- package/dist/physics/2d.js +57 -36
- package/dist/physics/3d.d.ts +755 -111
- package/dist/physics/3d.js +2355 -158
- package/dist/physics/edit-result-graph.d.ts +36 -0
- package/dist/physics/edit-result-graph.js +141 -0
- package/dist/physics/game-codec3d.d.ts +41 -0
- package/dist/physics/game-codec3d.js +544 -0
- package/dist/physics/installed-checkpoint3d.d.ts +13 -0
- package/dist/physics/installed-checkpoint3d.js +120 -0
- package/dist/physics/installed-runtime3d.d.ts +51 -0
- package/dist/physics/installed-runtime3d.js +372 -0
- package/dist/physics/installed-state-commitment3d.d.ts +2 -0
- package/dist/physics/installed-state-commitment3d.js +24 -0
- package/dist/physics/units.d.ts +38 -0
- package/dist/physics/units.js +56 -0
- package/dist/physics/vehicle-state3d.d.ts +93 -0
- package/dist/physics/vehicle-state3d.js +1191 -0
- package/dist/physics/voxel-body-state.d.ts +61 -0
- package/dist/physics/voxel-body-state.js +410 -0
- package/dist/r3f-render-adapter.d.ts +59 -1
- package/dist/r3f-render-adapter.js +137 -2
- package/dist/replay.d.ts +13 -0
- package/dist/replay.js +95 -70
- package/dist/run-room-transport.js +5 -1
- package/dist/runner.d.ts +17 -2
- package/dist/runner.js +472 -84
- package/dist/runtime-cleanup.d.ts +54 -0
- package/dist/runtime-cleanup.js +266 -0
- package/dist/runtime-lease.d.ts +11 -1
- package/dist/runtime-lease.js +23 -10
- package/dist/runtime-room-metadata.d.ts +2 -8
- package/dist/runtime-room-metadata.js +11 -14
- package/dist/runtime-session.d.ts +8 -0
- package/dist/runtime-session.js +222 -58
- package/dist/schema-codegen.js +3 -0
- package/dist/schema-dsl-binary.d.ts +10 -4
- package/dist/schema-dsl-binary.js +375 -76
- package/dist/scratch-pool.d.ts +32 -0
- package/dist/scratch-pool.js +60 -0
- package/dist/sdk-session.d.ts +1 -0
- package/dist/sdk-session.js +4 -0
- package/dist/secret-config.js +2 -60
- package/dist/secret-crypto.js +70 -36
- package/dist/session-snapshot.d.ts +15 -4
- package/dist/session-snapshot.js +35 -33
- package/dist/session-wire.js +14 -22
- package/dist/sparse-set.d.ts +1 -0
- package/dist/sparse-set.js +22 -0
- package/dist/spatial/spatial-grid-3d.d.ts +41 -0
- package/dist/spatial/spatial-grid-3d.js +115 -0
- package/dist/synctest.d.ts +9 -0
- package/dist/synctest.js +106 -17
- package/dist/testing-network.d.ts +2 -0
- package/dist/testing-network.js +122 -18
- package/dist/testing.d.ts +27 -6
- package/dist/testing.js +297 -56
- package/dist/tools/index.d.ts +3 -2
- package/dist/tools/index.js +3 -2
- package/dist/tools/module-certification.d.ts +6 -0
- package/dist/tools/module-certification.js +26 -2
- package/package.json +18 -5
- package/core/scripts/run-box3d-benchmark.mjs +0 -350
- package/core/src/physics/index.mjs +0 -3169
|
@@ -1,20 +1,40 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
+
#include <cstddef>
|
|
3
4
|
#include <cstdint>
|
|
5
|
+
#include <limits>
|
|
4
6
|
|
|
5
7
|
namespace rundot::kinetix::physics {
|
|
6
8
|
|
|
7
|
-
constexpr std::uint32_t kWorldTopologyAbiVersion =
|
|
9
|
+
constexpr std::uint32_t kWorldTopologyAbiVersion = 2;
|
|
8
10
|
constexpr std::uint32_t kWorldTopologyCommandStride = 12;
|
|
9
11
|
constexpr std::uint32_t kWorldTopologyResultStride = 4;
|
|
10
|
-
constexpr std::uint32_t kWorldTopologyInfoStride =
|
|
12
|
+
constexpr std::uint32_t kWorldTopologyInfoStride = 13;
|
|
11
13
|
constexpr std::uint32_t kWorldTopologyBodyIdStride = 2;
|
|
12
14
|
constexpr std::uint32_t kWorldTopologyJointIdentityStride = 6;
|
|
15
|
+
constexpr std::uint32_t kWorldTopologyFluidIdStride = 2;
|
|
13
16
|
constexpr std::uint32_t kWorldQueryInputStride = 21;
|
|
14
17
|
constexpr std::uint32_t kWorldQueryHitStride = 8;
|
|
15
18
|
constexpr std::uint32_t kWorldQueryBodyIdStride = 2;
|
|
16
|
-
constexpr std::uint32_t kWorldContactOutputValueStride =
|
|
19
|
+
constexpr std::uint32_t kWorldContactOutputValueStride = 11;
|
|
17
20
|
constexpr std::uint32_t kWorldContactOutputMetadataStride = 6;
|
|
21
|
+
constexpr std::uint32_t kWorldJointReactionValueStride = 6;
|
|
22
|
+
constexpr std::uint32_t kWorldJointReactionMetadataStride = 6;
|
|
23
|
+
constexpr std::uint32_t kWorldJointBreakMetadataStride = 3;
|
|
24
|
+
constexpr std::uint32_t kWorldFluidInteractionValueStride = 13;
|
|
25
|
+
constexpr std::uint32_t kWorldFluidInteractionMetadataStride = 5;
|
|
26
|
+
constexpr std::uint32_t kWorldBodyGeometryInfoVersion = 1;
|
|
27
|
+
constexpr std::uint32_t kWorldBodyGeometryInfoStride = 6;
|
|
28
|
+
constexpr std::uint32_t kWorldTopologyGeometryAbiVersion = 4;
|
|
29
|
+
constexpr std::uint32_t kWorldTopologyGeometryCommandStride = 16;
|
|
30
|
+
constexpr std::uint32_t kTopologyEditHeaderWords = 10;
|
|
31
|
+
constexpr std::uint32_t kTopologyEditHeaderFormatVersion = 1;
|
|
32
|
+
constexpr std::uint32_t kTopologyEditRemovedRecordWords = 4;
|
|
33
|
+
constexpr std::uint32_t kTopologyEditRemovedKindBody = 1;
|
|
34
|
+
constexpr std::uint32_t kTopologyEditRemovedKindJoint = 2;
|
|
35
|
+
constexpr std::uint32_t kTopologyEditRemovedKindFluid = 3;
|
|
36
|
+
|
|
37
|
+
enum class WorldBodyGeometryActionTag : std::uint32_t { Keep = 0, Install = 1, Clear = 2 };
|
|
18
38
|
|
|
19
39
|
enum class WorldTopologyCommandTag : std::uint32_t {
|
|
20
40
|
CreateBody = 1,
|
|
@@ -23,6 +43,9 @@ enum class WorldTopologyCommandTag : std::uint32_t {
|
|
|
23
43
|
CreateJoint = 4,
|
|
24
44
|
EditJoint = 5,
|
|
25
45
|
RemoveJoint = 6,
|
|
46
|
+
CreateFluid = 7,
|
|
47
|
+
EditFluid = 8,
|
|
48
|
+
RemoveFluid = 9,
|
|
26
49
|
};
|
|
27
50
|
|
|
28
51
|
enum class WorldTopologyReferenceTag : std::uint32_t {
|
|
@@ -31,25 +54,86 @@ enum class WorldTopologyReferenceTag : std::uint32_t {
|
|
|
31
54
|
ExistingBody = 2,
|
|
32
55
|
CreatedJoint = 3,
|
|
33
56
|
ExistingJoint = 4,
|
|
57
|
+
CreatedFluid = 5,
|
|
58
|
+
ExistingFluid = 6,
|
|
34
59
|
};
|
|
35
60
|
|
|
61
|
+
// Selected checkpoint info is 7 u32 words:
|
|
62
|
+
// frame low, frame high, body count, contact count, reaction count, break count, fluid count.
|
|
63
|
+
constexpr std::uint32_t kCheckpointViewInfoWords = 7;
|
|
64
|
+
|
|
65
|
+
// Reject a count whose byte length does not fit in addressLimit.
|
|
66
|
+
// addressLimit is SIZE_MAX on the host that runs the check.
|
|
67
|
+
inline bool checkedRangeBytes(
|
|
68
|
+
std::uint64_t count,
|
|
69
|
+
std::uint64_t elementBytes,
|
|
70
|
+
std::uint64_t addressLimit,
|
|
71
|
+
std::uint64_t& bytes) noexcept {
|
|
72
|
+
if (elementBytes != 0 && count > std::numeric_limits<std::uint64_t>::max() / elementBytes) return false;
|
|
73
|
+
const std::uint64_t product = count * elementBytes;
|
|
74
|
+
if (product > addressLimit) return false;
|
|
75
|
+
bytes = product;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
inline bool hostRangeBytes(
|
|
80
|
+
std::uint64_t count,
|
|
81
|
+
std::uint64_t elementBytes,
|
|
82
|
+
std::size_t& bytes) noexcept {
|
|
83
|
+
std::uint64_t wide = 0;
|
|
84
|
+
if (!checkedRangeBytes(count, elementBytes, std::numeric_limits<std::size_t>::max(), wide)) return false;
|
|
85
|
+
bytes = static_cast<std::size_t>(wide);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
36
89
|
} // namespace rundot::kinetix::physics
|
|
37
90
|
|
|
38
91
|
extern "C" {
|
|
39
92
|
|
|
93
|
+
struct rundot_kinetix_world_support_spring {
|
|
94
|
+
std::uint32_t body_low;
|
|
95
|
+
std::uint32_t body_high;
|
|
96
|
+
std::uint32_t support_low;
|
|
97
|
+
std::uint32_t support_high;
|
|
98
|
+
double point[3];
|
|
99
|
+
double normal[3];
|
|
100
|
+
double compression;
|
|
101
|
+
double travel;
|
|
102
|
+
double stiffness;
|
|
103
|
+
double damping;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
struct rundot_kinetix_world_support_force {
|
|
107
|
+
std::uint32_t body_low;
|
|
108
|
+
std::uint32_t body_high;
|
|
109
|
+
std::uint32_t support_low;
|
|
110
|
+
std::uint32_t support_high;
|
|
111
|
+
double force[3];
|
|
112
|
+
double point[3];
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
static_assert(sizeof(rundot_kinetix_world_support_spring) == 96);
|
|
116
|
+
static_assert(offsetof(rundot_kinetix_world_support_spring, point) == 16);
|
|
117
|
+
static_assert(sizeof(rundot_kinetix_world_support_force) == 64);
|
|
118
|
+
static_assert(offsetof(rundot_kinetix_world_support_force, force) == 16);
|
|
119
|
+
|
|
40
120
|
std::uint32_t rundot_kinetix_world_abi_version();
|
|
41
121
|
std::uint32_t rundot_kinetix_world_max_handles();
|
|
122
|
+
std::uint32_t rundot_kinetix_world_max_support_records();
|
|
42
123
|
std::uint32_t rundot_kinetix_world_topology_abi_version();
|
|
124
|
+
std::uint32_t rundot_kinetix_world_topology_geometry_abi_version();
|
|
125
|
+
std::uint32_t rundot_kinetix_world_topology_geometry_command_stride();
|
|
43
126
|
std::uint32_t rundot_kinetix_world_topology_max_commands();
|
|
44
127
|
std::uint32_t rundot_kinetix_world_topology_command_stride();
|
|
45
128
|
std::uint32_t rundot_kinetix_world_topology_result_stride();
|
|
46
129
|
std::uint32_t rundot_kinetix_world_topology_info_stride();
|
|
47
130
|
std::uint32_t rundot_kinetix_world_topology_body_id_stride();
|
|
48
131
|
std::uint32_t rundot_kinetix_world_topology_joint_identity_stride();
|
|
132
|
+
std::uint32_t rundot_kinetix_world_topology_fluid_id_stride();
|
|
49
133
|
std::uint32_t rundot_kinetix_world_joint_warm_state_stride();
|
|
50
134
|
|
|
51
135
|
std::uintptr_t rundot_kinetix_world_buffer_allocate(std::uint32_t byte_count) noexcept;
|
|
52
|
-
|
|
136
|
+
std::int32_t rundot_kinetix_world_buffer_free(std::uintptr_t pointer) noexcept;
|
|
53
137
|
|
|
54
138
|
std::int32_t rundot_kinetix_world_create(
|
|
55
139
|
std::uint32_t abi_version,
|
|
@@ -58,14 +142,54 @@ std::int32_t rundot_kinetix_world_create(
|
|
|
58
142
|
std::uint32_t profile_id_bytes,
|
|
59
143
|
const std::uint8_t* geometry_digest,
|
|
60
144
|
std::uint32_t geometry_digest_bytes,
|
|
145
|
+
std::uint32_t body_capacity,
|
|
146
|
+
std::uint32_t joint_capacity,
|
|
147
|
+
std::uint32_t fluid_capacity,
|
|
148
|
+
std::uint32_t fluid_interaction_capacity,
|
|
61
149
|
std::uint32_t* output_handle) noexcept;
|
|
62
150
|
|
|
151
|
+
std::int32_t rundot_kinetix_world_create_with_checkpoint_capacity(
|
|
152
|
+
std::uint32_t abi_version,
|
|
153
|
+
std::uint32_t numeric_profile,
|
|
154
|
+
const std::uint8_t* profile_id,
|
|
155
|
+
std::uint32_t profile_id_bytes,
|
|
156
|
+
const std::uint8_t* geometry_digest,
|
|
157
|
+
std::uint32_t geometry_digest_bytes,
|
|
158
|
+
std::uint32_t body_capacity,
|
|
159
|
+
std::uint32_t joint_capacity,
|
|
160
|
+
std::uint32_t fluid_capacity,
|
|
161
|
+
std::uint32_t fluid_interaction_capacity,
|
|
162
|
+
std::uint32_t checkpoint_capacity,
|
|
163
|
+
std::uint32_t* output_handle) noexcept;
|
|
164
|
+
|
|
165
|
+
std::int32_t rundot_kinetix_world_fluid_interaction_info(
|
|
166
|
+
std::uint32_t handle,
|
|
167
|
+
std::uint32_t* output_count) noexcept;
|
|
168
|
+
|
|
169
|
+
std::int32_t rundot_kinetix_world_copy_fluid_interactions(
|
|
170
|
+
std::uint32_t handle,
|
|
171
|
+
double* values,
|
|
172
|
+
std::uint32_t value_capacity,
|
|
173
|
+
std::uint32_t* metadata,
|
|
174
|
+
std::uint32_t metadata_capacity) noexcept;
|
|
175
|
+
|
|
63
176
|
std::int32_t rundot_kinetix_world_destroy(std::uint32_t handle) noexcept;
|
|
64
177
|
|
|
65
178
|
std::int32_t rundot_kinetix_world_digest(
|
|
66
179
|
std::uint32_t handle,
|
|
67
180
|
std::uint64_t* output) noexcept;
|
|
68
181
|
|
|
182
|
+
std::int32_t rundot_kinetix_world_frame(
|
|
183
|
+
std::uint32_t handle, std::uint64_t* output) noexcept;
|
|
184
|
+
|
|
185
|
+
std::int32_t rundot_kinetix_world_body_geometry_info(
|
|
186
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
187
|
+
std::uint32_t* output, std::uint32_t output_values) noexcept;
|
|
188
|
+
|
|
189
|
+
std::int32_t rundot_kinetix_world_copy_body_geometry(
|
|
190
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
191
|
+
double* output, std::uint32_t output_capacity_values) noexcept;
|
|
192
|
+
|
|
69
193
|
std::int32_t rundot_kinetix_world_replace_state(
|
|
70
194
|
std::uint32_t handle,
|
|
71
195
|
std::uint32_t frame_low,
|
|
@@ -83,7 +207,11 @@ std::int32_t rundot_kinetix_world_replace_state(
|
|
|
83
207
|
const std::uint8_t* joint_warm_state,
|
|
84
208
|
std::uint32_t joint_warm_state_bytes,
|
|
85
209
|
const std::uint32_t* topology_state,
|
|
86
|
-
std::uint32_t topology_state_values
|
|
210
|
+
std::uint32_t topology_state_values,
|
|
211
|
+
const double* surface_velocities,
|
|
212
|
+
std::uint32_t surface_velocity_values,
|
|
213
|
+
const double* fluids,
|
|
214
|
+
std::uint32_t fluid_values) noexcept;
|
|
87
215
|
|
|
88
216
|
std::int32_t rundot_kinetix_world_step(
|
|
89
217
|
std::uint32_t handle,
|
|
@@ -111,6 +239,97 @@ std::int32_t rundot_kinetix_world_apply_impulse(
|
|
|
111
239
|
double point_y,
|
|
112
240
|
double point_z) noexcept;
|
|
113
241
|
|
|
242
|
+
std::int32_t rundot_kinetix_world_set_body_force(
|
|
243
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
244
|
+
double force_x, double force_y, double force_z,
|
|
245
|
+
double torque_x, double torque_y, double torque_z) noexcept;
|
|
246
|
+
|
|
247
|
+
std::int32_t rundot_kinetix_world_apply_force(
|
|
248
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
249
|
+
double force_x, double force_y, double force_z,
|
|
250
|
+
double torque_x, double torque_y, double torque_z) noexcept;
|
|
251
|
+
|
|
252
|
+
std::int32_t rundot_kinetix_world_apply_force_at_point(
|
|
253
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
254
|
+
double force_x, double force_y, double force_z,
|
|
255
|
+
double point_x, double point_y, double point_z) noexcept;
|
|
256
|
+
|
|
257
|
+
std::int32_t rundot_kinetix_world_clear_body_force(
|
|
258
|
+
std::uint32_t handle, std::uint32_t body_low,
|
|
259
|
+
std::uint32_t body_high) noexcept;
|
|
260
|
+
|
|
261
|
+
std::int32_t rundot_kinetix_world_set_body_surface_velocity(
|
|
262
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
263
|
+
double velocity_x, double velocity_y, double velocity_z) noexcept;
|
|
264
|
+
|
|
265
|
+
std::int32_t rundot_kinetix_world_set_body_linear_velocity(
|
|
266
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
267
|
+
double velocity_x, double velocity_y, double velocity_z) noexcept;
|
|
268
|
+
|
|
269
|
+
std::int32_t rundot_kinetix_world_set_body_angular_velocity(
|
|
270
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
271
|
+
double velocity_x, double velocity_y, double velocity_z) noexcept;
|
|
272
|
+
|
|
273
|
+
std::int32_t rundot_kinetix_world_set_body_transform(
|
|
274
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
275
|
+
double x, double y, double z,
|
|
276
|
+
double qx, double qy, double qz, double qw) noexcept;
|
|
277
|
+
|
|
278
|
+
std::int32_t rundot_kinetix_world_set_body_linear_damping(
|
|
279
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
280
|
+
double damping) noexcept;
|
|
281
|
+
|
|
282
|
+
std::int32_t rundot_kinetix_world_wake_body(
|
|
283
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high) noexcept;
|
|
284
|
+
|
|
285
|
+
std::int32_t rundot_kinetix_world_write_body_motion(
|
|
286
|
+
std::uint32_t handle,
|
|
287
|
+
double* pose, std::uint32_t pose_values,
|
|
288
|
+
double* velocity, std::uint32_t velocity_values,
|
|
289
|
+
std::uint32_t* ids, std::uint32_t id_words,
|
|
290
|
+
std::uint8_t* status, std::uint32_t status_bytes,
|
|
291
|
+
std::uint32_t* output_header, std::uint32_t header_words) noexcept;
|
|
292
|
+
|
|
293
|
+
std::uint32_t rundot_kinetix_world_motion_pose_stride() noexcept;
|
|
294
|
+
std::uint32_t rundot_kinetix_world_motion_velocity_stride() noexcept;
|
|
295
|
+
std::uint32_t rundot_kinetix_world_motion_status_version() noexcept;
|
|
296
|
+
std::uint32_t rundot_kinetix_world_motion_pose_value_limit() noexcept;
|
|
297
|
+
std::uint32_t rundot_kinetix_world_motion_velocity_value_limit() noexcept;
|
|
298
|
+
std::uint32_t rundot_kinetix_world_motion_id_word_limit() noexcept;
|
|
299
|
+
std::uint32_t rundot_kinetix_world_motion_status_byte_limit() noexcept;
|
|
300
|
+
|
|
301
|
+
std::int32_t rundot_kinetix_world_apply_support(
|
|
302
|
+
std::uint32_t handle,
|
|
303
|
+
const rundot_kinetix_world_support_spring* springs,
|
|
304
|
+
std::uint32_t spring_count,
|
|
305
|
+
const rundot_kinetix_world_support_force* forces,
|
|
306
|
+
std::uint32_t force_count,
|
|
307
|
+
std::uint32_t wake_low,
|
|
308
|
+
std::uint32_t wake_high) noexcept;
|
|
309
|
+
|
|
310
|
+
std::int32_t rundot_kinetix_world_read_surface_velocity(
|
|
311
|
+
std::uint32_t handle,
|
|
312
|
+
std::uint32_t body_low,
|
|
313
|
+
std::uint32_t body_high,
|
|
314
|
+
double* velocity) noexcept;
|
|
315
|
+
|
|
316
|
+
std::int32_t rundot_kinetix_world_read_body_mobility(
|
|
317
|
+
std::uint32_t handle,
|
|
318
|
+
std::uint32_t body_low,
|
|
319
|
+
std::uint32_t body_high,
|
|
320
|
+
double* inverse_linear,
|
|
321
|
+
double* inverse_angular) noexcept;
|
|
322
|
+
|
|
323
|
+
std::int32_t rundot_kinetix_world_read_pending_support_impulse(
|
|
324
|
+
std::uint32_t handle,
|
|
325
|
+
std::uint32_t body_low,
|
|
326
|
+
std::uint32_t body_high,
|
|
327
|
+
double dt,
|
|
328
|
+
std::uint32_t substeps,
|
|
329
|
+
double* linear,
|
|
330
|
+
double* angular,
|
|
331
|
+
std::uint32_t* below_bound) noexcept;
|
|
332
|
+
|
|
114
333
|
std::int32_t rundot_kinetix_world_query(
|
|
115
334
|
std::uint32_t handle,
|
|
116
335
|
std::uint32_t kind,
|
|
@@ -124,8 +343,17 @@ std::int32_t rundot_kinetix_world_query(
|
|
|
124
343
|
std::uint32_t body_id_capacity_values,
|
|
125
344
|
std::uint32_t* required_hit_count) noexcept;
|
|
126
345
|
|
|
346
|
+
std::int32_t rundot_kinetix_world_query_body_ray(
|
|
347
|
+
std::uint32_t handle, std::uint32_t body_low, std::uint32_t body_high,
|
|
348
|
+
const double* query, std::uint32_t query_values,
|
|
349
|
+
std::uint32_t excluded_body_low, std::uint32_t excluded_body_high,
|
|
350
|
+
double* hits, std::uint32_t hit_capacity_values,
|
|
351
|
+
std::uint32_t* body_ids, std::uint32_t body_id_capacity_values,
|
|
352
|
+
std::uint32_t* required_hit_count) noexcept;
|
|
353
|
+
|
|
127
354
|
// State info contains frame low/high, then body, joint, geometry, cache, and
|
|
128
|
-
// force value counts,
|
|
355
|
+
// force value counts, joint warm-state byte count, surface velocity count, and
|
|
356
|
+
// fluid value count.
|
|
129
357
|
std::int32_t rundot_kinetix_world_state_info(
|
|
130
358
|
std::uint32_t handle,
|
|
131
359
|
std::uint32_t* output,
|
|
@@ -144,7 +372,11 @@ std::int32_t rundot_kinetix_world_copy_state(
|
|
|
144
372
|
double* forces,
|
|
145
373
|
std::uint32_t force_capacity,
|
|
146
374
|
std::uint8_t* joint_warm_state,
|
|
147
|
-
std::uint32_t joint_warm_state_capacity_bytes
|
|
375
|
+
std::uint32_t joint_warm_state_capacity_bytes,
|
|
376
|
+
double* surface_velocities,
|
|
377
|
+
std::uint32_t surface_velocity_capacity,
|
|
378
|
+
double* fluids,
|
|
379
|
+
std::uint32_t fluid_capacity) noexcept;
|
|
148
380
|
|
|
149
381
|
// Topology commands contain twelve uint32 values. Full body and joint payload
|
|
150
382
|
// records use payload indices in command field 10. Created-ID results contain
|
|
@@ -161,8 +393,44 @@ std::int32_t rundot_kinetix_world_apply_topology_batch(
|
|
|
161
393
|
std::uint32_t output_capacity_values,
|
|
162
394
|
std::uint32_t* required_output_values) noexcept;
|
|
163
395
|
|
|
164
|
-
//
|
|
165
|
-
//
|
|
396
|
+
// Fields 12 to 15 contain action, scalar offset, scalar count and reserved zero.
|
|
397
|
+
// Install payloads follow command order with no gaps or overlaps.
|
|
398
|
+
std::int32_t rundot_kinetix_world_apply_topology_geometry_batch(
|
|
399
|
+
std::uint32_t handle, std::uint32_t envelope_version,
|
|
400
|
+
const std::uint32_t* commands, std::uint32_t command_count,
|
|
401
|
+
const double* body_records, std::uint32_t body_record_count,
|
|
402
|
+
const double* joint_records, std::uint32_t joint_record_count,
|
|
403
|
+
const double* fluid_records, std::uint32_t fluid_record_count,
|
|
404
|
+
const double* geometry_values, std::uint32_t geometry_value_count,
|
|
405
|
+
std::uint32_t* output, std::uint32_t output_capacity_values,
|
|
406
|
+
std::uint32_t* required_output_values) noexcept;
|
|
407
|
+
|
|
408
|
+
// Header is exactly 10 u32 words: format, serial, revision, epoch, removed counts.
|
|
409
|
+
std::int32_t rundot_kinetix_world_prepare_topology_edit(
|
|
410
|
+
std::uint32_t handle, std::uint32_t envelope_version,
|
|
411
|
+
std::uint32_t expected_revision_lo, std::uint32_t expected_revision_hi,
|
|
412
|
+
const std::uint32_t* commands, std::uint32_t command_count,
|
|
413
|
+
const double* body_records, std::uint32_t body_record_count,
|
|
414
|
+
const double* joint_records, std::uint32_t joint_record_count,
|
|
415
|
+
const double* fluid_records, std::uint32_t fluid_record_count,
|
|
416
|
+
const double* geometry_values, std::uint32_t geometry_value_count,
|
|
417
|
+
std::uint32_t* created_output, std::uint32_t created_capacity_values,
|
|
418
|
+
std::uint32_t* required_created_values,
|
|
419
|
+
std::uint32_t* header_output, std::uint32_t header_capacity_values) noexcept;
|
|
420
|
+
|
|
421
|
+
std::int32_t rundot_kinetix_world_copy_topology_edit_removed(
|
|
422
|
+
std::uint32_t handle, std::uint32_t serial_lo, std::uint32_t serial_hi,
|
|
423
|
+
std::uint32_t* out, std::uint32_t capacity_values) noexcept;
|
|
424
|
+
|
|
425
|
+
std::int32_t rundot_kinetix_world_commit_topology_edit(
|
|
426
|
+
std::uint32_t handle, std::uint32_t serial_lo, std::uint32_t serial_hi,
|
|
427
|
+
std::uint32_t revision_lo, std::uint32_t revision_hi) noexcept;
|
|
428
|
+
|
|
429
|
+
std::int32_t rundot_kinetix_world_abandon_topology_edit(
|
|
430
|
+
std::uint32_t handle, std::uint32_t serial_lo, std::uint32_t serial_hi) noexcept;
|
|
431
|
+
|
|
432
|
+
// Topology info contains restore epoch, next body, joint, and fluid IDs,
|
|
433
|
+
// the three counts, and mutationRevision as words 11 and 12. Stride is 13.
|
|
166
434
|
std::int32_t rundot_kinetix_world_topology_info(
|
|
167
435
|
std::uint32_t handle,
|
|
168
436
|
std::uint32_t* output,
|
|
@@ -173,7 +441,9 @@ std::int32_t rundot_kinetix_world_copy_topology(
|
|
|
173
441
|
std::uint32_t* body_ids,
|
|
174
442
|
std::uint32_t body_id_capacity_values,
|
|
175
443
|
std::uint32_t* joint_identities,
|
|
176
|
-
std::uint32_t joint_identity_capacity_values
|
|
444
|
+
std::uint32_t joint_identity_capacity_values,
|
|
445
|
+
std::uint32_t* fluid_ids,
|
|
446
|
+
std::uint32_t fluid_id_capacity_values) noexcept;
|
|
177
447
|
|
|
178
448
|
std::int32_t rundot_kinetix_world_body_exists(
|
|
179
449
|
std::uint32_t handle,
|
|
@@ -185,6 +455,11 @@ std::int32_t rundot_kinetix_world_joint_exists(
|
|
|
185
455
|
std::uint32_t id_low,
|
|
186
456
|
std::uint32_t id_high) noexcept;
|
|
187
457
|
|
|
458
|
+
std::int32_t rundot_kinetix_world_fluid_exists(
|
|
459
|
+
std::uint32_t handle,
|
|
460
|
+
std::uint32_t id_low,
|
|
461
|
+
std::uint32_t id_high) noexcept;
|
|
462
|
+
|
|
188
463
|
std::int32_t rundot_kinetix_world_read_body(
|
|
189
464
|
std::uint32_t handle,
|
|
190
465
|
std::uint32_t id_low,
|
|
@@ -201,6 +476,13 @@ std::int32_t rundot_kinetix_world_read_joint(
|
|
|
201
476
|
std::uint32_t* endpoint_ids,
|
|
202
477
|
std::uint32_t endpoint_id_values) noexcept;
|
|
203
478
|
|
|
479
|
+
std::int32_t rundot_kinetix_world_read_fluid(
|
|
480
|
+
std::uint32_t handle,
|
|
481
|
+
std::uint32_t id_low,
|
|
482
|
+
std::uint32_t id_high,
|
|
483
|
+
double* output,
|
|
484
|
+
std::uint32_t output_values) noexcept;
|
|
485
|
+
|
|
204
486
|
std::int32_t rundot_kinetix_world_contact_output_info(
|
|
205
487
|
std::uint32_t handle,
|
|
206
488
|
std::uint32_t* output_count) noexcept;
|
|
@@ -212,6 +494,20 @@ std::int32_t rundot_kinetix_world_copy_contact_output(
|
|
|
212
494
|
std::uint32_t* metadata,
|
|
213
495
|
std::uint32_t metadata_capacity) noexcept;
|
|
214
496
|
|
|
497
|
+
std::int32_t rundot_kinetix_world_joint_output_info(
|
|
498
|
+
std::uint32_t handle,
|
|
499
|
+
std::uint32_t* reaction_count,
|
|
500
|
+
std::uint32_t* break_count) noexcept;
|
|
501
|
+
|
|
502
|
+
std::int32_t rundot_kinetix_world_copy_joint_output(
|
|
503
|
+
std::uint32_t handle,
|
|
504
|
+
double* reaction_values,
|
|
505
|
+
std::uint32_t reaction_value_capacity,
|
|
506
|
+
std::uint32_t* reaction_metadata,
|
|
507
|
+
std::uint32_t reaction_metadata_capacity,
|
|
508
|
+
std::uint32_t* break_metadata,
|
|
509
|
+
std::uint32_t break_metadata_capacity) noexcept;
|
|
510
|
+
|
|
215
511
|
std::int32_t rundot_kinetix_world_capture_snapshot(
|
|
216
512
|
std::uint32_t handle,
|
|
217
513
|
std::uint8_t* output,
|
|
@@ -223,6 +519,9 @@ std::int32_t rundot_kinetix_world_import_snapshot(
|
|
|
223
519
|
const std::uint8_t* bytes,
|
|
224
520
|
std::uint32_t byte_count) noexcept;
|
|
225
521
|
|
|
522
|
+
// Legacy handles are opaque nonzero uint32 IDs. Do not decode them.
|
|
523
|
+
// IDs are never reused within a module instance. Zero is never valid.
|
|
524
|
+
// New callers use the separate slot and generation token exports.
|
|
226
525
|
std::int32_t rundot_kinetix_world_checkpoint_capture(
|
|
227
526
|
std::uint32_t handle,
|
|
228
527
|
std::uint32_t* checkpoint_handle) noexcept;
|
|
@@ -242,6 +541,227 @@ std::int32_t rundot_kinetix_world_checkpoint_capture_snapshot(
|
|
|
242
541
|
std::uint32_t output_capacity,
|
|
243
542
|
std::uint32_t* required_bytes) noexcept;
|
|
244
543
|
|
|
544
|
+
std::int32_t rundot_kinetix_world_attach(
|
|
545
|
+
std::uint32_t handle,
|
|
546
|
+
std::uint32_t expected_digest_low,
|
|
547
|
+
std::uint32_t expected_digest_high,
|
|
548
|
+
std::uint32_t* output_token) noexcept;
|
|
549
|
+
|
|
550
|
+
std::int32_t rundot_kinetix_world_detach(
|
|
551
|
+
std::uint32_t handle,
|
|
552
|
+
std::uint32_t token) noexcept;
|
|
553
|
+
|
|
554
|
+
std::int32_t rundot_kinetix_world_revision(
|
|
555
|
+
std::uint32_t handle,
|
|
556
|
+
std::uint64_t* output_revision) noexcept;
|
|
557
|
+
|
|
558
|
+
std::int32_t rundot_kinetix_world_checkpoint_capture_token(
|
|
559
|
+
std::uint32_t handle,
|
|
560
|
+
std::uint32_t attachment_token,
|
|
561
|
+
std::uint32_t* output_slot_index,
|
|
562
|
+
std::uint32_t* output_generation) noexcept;
|
|
563
|
+
|
|
564
|
+
std::int32_t rundot_kinetix_world_checkpoint_restore_token(
|
|
565
|
+
std::uint32_t handle,
|
|
566
|
+
std::uint32_t attachment_token,
|
|
567
|
+
std::uint32_t slot_index,
|
|
568
|
+
std::uint32_t generation) noexcept;
|
|
569
|
+
|
|
570
|
+
std::int32_t rundot_kinetix_world_checkpoint_release_token(
|
|
571
|
+
std::uint32_t handle,
|
|
572
|
+
std::uint32_t attachment_token,
|
|
573
|
+
std::uint32_t slot_index,
|
|
574
|
+
std::uint32_t generation) noexcept;
|
|
575
|
+
|
|
576
|
+
std::int32_t rundot_kinetix_world_checkpoint_capture_snapshot_token(
|
|
577
|
+
std::uint32_t handle,
|
|
578
|
+
std::uint32_t attachment_token,
|
|
579
|
+
std::uint32_t slot_index,
|
|
580
|
+
std::uint32_t generation,
|
|
581
|
+
std::uint8_t* output,
|
|
582
|
+
std::uint32_t output_capacity,
|
|
583
|
+
std::uint32_t* required_bytes) noexcept;
|
|
584
|
+
|
|
585
|
+
std::int32_t rundot_kinetix_world_import_snapshot_attached(
|
|
586
|
+
std::uint32_t handle,
|
|
587
|
+
std::uint32_t attachment_token,
|
|
588
|
+
const std::uint8_t* bytes,
|
|
589
|
+
std::uint32_t byte_count) noexcept;
|
|
590
|
+
|
|
591
|
+
std::uint32_t rundot_kinetix_world_digest_algorithm_revision() noexcept;
|
|
592
|
+
|
|
593
|
+
std::int32_t rundot_kinetix_world_checkpoint_digest(
|
|
594
|
+
std::uint32_t handle,
|
|
595
|
+
std::uint32_t checkpoint_id,
|
|
596
|
+
std::uint64_t* output) noexcept;
|
|
597
|
+
|
|
598
|
+
std::int32_t rundot_kinetix_world_checkpoint_digest_token(
|
|
599
|
+
std::uint32_t handle,
|
|
600
|
+
std::uint32_t attachment_token,
|
|
601
|
+
std::uint32_t slot_index,
|
|
602
|
+
std::uint32_t generation,
|
|
603
|
+
std::uint64_t* output) noexcept;
|
|
604
|
+
|
|
605
|
+
std::uint32_t rundot_kinetix_world_strong_digest_algorithm_revision() noexcept;
|
|
606
|
+
|
|
607
|
+
std::int32_t rundot_kinetix_world_checkpoint_strong_digest(
|
|
608
|
+
std::uint32_t handle,
|
|
609
|
+
std::uint32_t checkpoint_id,
|
|
610
|
+
std::uint8_t* output) noexcept;
|
|
611
|
+
|
|
612
|
+
std::int32_t rundot_kinetix_world_checkpoint_strong_digest_token(
|
|
613
|
+
std::uint32_t handle,
|
|
614
|
+
std::uint32_t attachment_token,
|
|
615
|
+
std::uint32_t slot_index,
|
|
616
|
+
std::uint32_t generation,
|
|
617
|
+
std::uint8_t* output) noexcept;
|
|
618
|
+
|
|
619
|
+
// Motion header words 2-5 are checkpoint frame low/high then two zeros.
|
|
620
|
+
// Packet checkpoint_latest_output_v1 is f64 contacts, reactions, fluids,
|
|
621
|
+
// then u32 contact, reaction, break, and fluid metadata. Counts stay in view_info.
|
|
622
|
+
std::int32_t rundot_kinetix_world_checkpoint_view_info(
|
|
623
|
+
std::uint32_t handle,
|
|
624
|
+
std::uint32_t checkpoint_id,
|
|
625
|
+
std::uint32_t* output,
|
|
626
|
+
std::uint32_t output_words) noexcept;
|
|
627
|
+
|
|
628
|
+
std::int32_t rundot_kinetix_world_checkpoint_view_info_token(
|
|
629
|
+
std::uint32_t handle,
|
|
630
|
+
std::uint32_t attachment_token,
|
|
631
|
+
std::uint32_t slot_index,
|
|
632
|
+
std::uint32_t generation,
|
|
633
|
+
std::uint32_t* output,
|
|
634
|
+
std::uint32_t output_words) noexcept;
|
|
635
|
+
|
|
636
|
+
std::int32_t rundot_kinetix_world_checkpoint_write_body_motion_into(
|
|
637
|
+
std::uint32_t handle,
|
|
638
|
+
std::uint32_t checkpoint_id,
|
|
639
|
+
double* pose,
|
|
640
|
+
std::uint32_t pose_values,
|
|
641
|
+
double* velocity,
|
|
642
|
+
std::uint32_t velocity_values,
|
|
643
|
+
std::uint32_t* ids,
|
|
644
|
+
std::uint32_t id_words,
|
|
645
|
+
std::uint8_t* status,
|
|
646
|
+
std::uint32_t status_bytes,
|
|
647
|
+
std::uint32_t* output_header,
|
|
648
|
+
std::uint32_t header_words) noexcept;
|
|
649
|
+
|
|
650
|
+
std::int32_t rundot_kinetix_world_checkpoint_write_body_motion_into_token(
|
|
651
|
+
std::uint32_t handle,
|
|
652
|
+
std::uint32_t attachment_token,
|
|
653
|
+
std::uint32_t slot_index,
|
|
654
|
+
std::uint32_t generation,
|
|
655
|
+
double* pose,
|
|
656
|
+
std::uint32_t pose_values,
|
|
657
|
+
double* velocity,
|
|
658
|
+
std::uint32_t velocity_values,
|
|
659
|
+
std::uint32_t* ids,
|
|
660
|
+
std::uint32_t id_words,
|
|
661
|
+
std::uint8_t* status,
|
|
662
|
+
std::uint32_t status_bytes,
|
|
663
|
+
std::uint32_t* output_header,
|
|
664
|
+
std::uint32_t header_words) noexcept;
|
|
665
|
+
|
|
666
|
+
std::int32_t rundot_kinetix_world_checkpoint_copy_latest_output(
|
|
667
|
+
std::uint32_t handle,
|
|
668
|
+
std::uint32_t checkpoint_id,
|
|
669
|
+
std::uint8_t* packet,
|
|
670
|
+
std::uint32_t packet_bytes) noexcept;
|
|
671
|
+
|
|
672
|
+
std::int32_t rundot_kinetix_world_checkpoint_copy_latest_output_token(
|
|
673
|
+
std::uint32_t handle,
|
|
674
|
+
std::uint32_t attachment_token,
|
|
675
|
+
std::uint32_t slot_index,
|
|
676
|
+
std::uint32_t generation,
|
|
677
|
+
std::uint8_t* packet,
|
|
678
|
+
std::uint32_t packet_bytes) noexcept;
|
|
679
|
+
|
|
680
|
+
std::int32_t rundot_kinetix_world_checkpoint_import(
|
|
681
|
+
std::uint32_t handle,
|
|
682
|
+
const std::uint8_t* bytes,
|
|
683
|
+
std::uint32_t byte_count,
|
|
684
|
+
std::uint32_t* checkpoint_handle) noexcept;
|
|
685
|
+
|
|
686
|
+
std::int32_t rundot_kinetix_world_checkpoint_import_token(
|
|
687
|
+
std::uint32_t handle,
|
|
688
|
+
std::uint32_t attachment_token,
|
|
689
|
+
const std::uint8_t* bytes,
|
|
690
|
+
std::uint32_t byte_count,
|
|
691
|
+
std::uint32_t* output_slot_index,
|
|
692
|
+
std::uint32_t* output_generation) noexcept;
|
|
693
|
+
|
|
694
|
+
std::int32_t rundot_kinetix_world_checkpoint_capacity(
|
|
695
|
+
std::uint32_t handle,
|
|
696
|
+
std::uint32_t* output_capacity) noexcept;
|
|
697
|
+
|
|
698
|
+
std::int32_t rundot_kinetix_world_checkpoint_live_count(
|
|
699
|
+
std::uint32_t handle,
|
|
700
|
+
std::uint32_t* output_live_count) noexcept;
|
|
701
|
+
|
|
702
|
+
std::int32_t rundot_kinetix_world_checkpoint_preflight(
|
|
703
|
+
std::uint32_t handle,
|
|
704
|
+
std::uint32_t required_slots,
|
|
705
|
+
std::uint32_t* can_allocate) noexcept;
|
|
706
|
+
|
|
707
|
+
std::int32_t rundot_kinetix_world_checkpoint_legacy_preflight(
|
|
708
|
+
std::uint32_t handle,
|
|
709
|
+
std::uint32_t required_slots,
|
|
710
|
+
std::uint32_t* can_allocate) noexcept;
|
|
711
|
+
|
|
712
|
+
std::int32_t rundot_kinetix_world_ownership_counts(
|
|
713
|
+
std::uint32_t handle,
|
|
714
|
+
std::uint32_t* unique_captures,
|
|
715
|
+
std::uint32_t* abi_slots) noexcept;
|
|
716
|
+
|
|
717
|
+
std::int32_t rundot_kinetix_instance_ledger_info(
|
|
718
|
+
std::uint64_t* live_slots,
|
|
719
|
+
std::uint64_t* high_water_slots,
|
|
720
|
+
std::uint64_t* checkpoint_bytes,
|
|
721
|
+
std::uint64_t* geometry_bytes,
|
|
722
|
+
std::uint64_t* high_water_bytes,
|
|
723
|
+
std::uint64_t* wasm_heap_bytes) noexcept;
|
|
724
|
+
|
|
725
|
+
std::int32_t rundot_kinetix_instance_ledger_reset_high_water() noexcept;
|
|
726
|
+
|
|
727
|
+
std::int32_t rundot_kinetix_instance_ledger_metadata(
|
|
728
|
+
std::uint64_t* metadata_bytes,
|
|
729
|
+
std::uint64_t* payload_bytes,
|
|
730
|
+
std::uint64_t* geometry_bytes,
|
|
731
|
+
std::uint64_t* retained_bytes,
|
|
732
|
+
std::uint64_t* live_worlds,
|
|
733
|
+
std::uint64_t* imbalance) noexcept;
|
|
734
|
+
|
|
735
|
+
std::int32_t rundot_kinetix_instance_ledger_classes(
|
|
736
|
+
std::uint64_t* bytes,
|
|
737
|
+
std::uint64_t* high_water,
|
|
738
|
+
std::uint32_t class_count) noexcept;
|
|
739
|
+
|
|
740
|
+
std::int32_t rundot_kinetix_world_capture_cache_bytes(
|
|
741
|
+
std::uint32_t handle,
|
|
742
|
+
std::uint64_t* output) noexcept;
|
|
743
|
+
|
|
744
|
+
#if defined(RUNDOT_PHYSICS_PHASE_TEST_HOOKS)
|
|
745
|
+
void rundot_kinetix_test_set_next_checkpoint_generation(
|
|
746
|
+
std::uint32_t generation) noexcept;
|
|
747
|
+
void rundot_kinetix_test_set_next_legacy_generation(
|
|
748
|
+
std::uint32_t generation) noexcept;
|
|
749
|
+
bool rundot_kinetix_test_restore_checkpoint_generation(
|
|
750
|
+
std::uint32_t generation) noexcept;
|
|
751
|
+
bool rundot_kinetix_test_restore_legacy_generation(
|
|
752
|
+
std::uint32_t generation) noexcept;
|
|
753
|
+
void* rundot_kinetix_test_world(std::uint32_t handle) noexcept;
|
|
754
|
+
void* rundot_kinetix_test_legacy_table(std::uint32_t handle) noexcept;
|
|
755
|
+
std::uint32_t rundot_kinetix_test_checkpoint_generation() noexcept;
|
|
756
|
+
std::uint32_t rundot_kinetix_test_legacy_generation() noexcept;
|
|
757
|
+
std::uint32_t rundot_kinetix_test_first_free(std::uint32_t handle) noexcept;
|
|
758
|
+
void rundot_kinetix_test_throw_after_slot_claim() noexcept;
|
|
759
|
+
void rundot_kinetix_test_arm_checkpoint_view_pin() noexcept;
|
|
760
|
+
bool rundot_kinetix_test_wait_checkpoint_view_pinned(
|
|
761
|
+
std::uint32_t timeout_ms) noexcept;
|
|
762
|
+
void rundot_kinetix_test_resume_checkpoint_view_pin() noexcept;
|
|
763
|
+
#endif
|
|
764
|
+
|
|
245
765
|
std::uint32_t rundot_kinetix_world_error_size() noexcept;
|
|
246
766
|
std::uint32_t rundot_kinetix_world_error_command_index() noexcept;
|
|
247
767
|
std::int32_t rundot_kinetix_world_copy_error(
|