@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
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
namespace rundot::kinetix::physics2d::owned_abi {
|
|
12
12
|
|
|
13
|
-
constexpr std::uint32_t kCAbiVersion =
|
|
14
|
-
constexpr std::uint32_t kWorldStorageAbiVersion =
|
|
15
|
-
constexpr std::uint32_t kSnapshotVersion =
|
|
13
|
+
constexpr std::uint32_t kCAbiVersion = 6;
|
|
14
|
+
constexpr std::uint32_t kWorldStorageAbiVersion = 7;
|
|
15
|
+
constexpr std::uint32_t kSnapshotVersion = 6;
|
|
16
16
|
constexpr std::uint32_t kSettingsAbiVersion = 1;
|
|
17
17
|
constexpr std::uint32_t kPhysicsProfile = 1;
|
|
18
18
|
constexpr std::uint32_t kNoIndex = 0xffffu;
|
|
19
|
+
constexpr std::uint32_t kMaxRegistries = 64;
|
|
19
20
|
constexpr std::uint32_t kMaxWorldsPerRegistry = 65'535;
|
|
20
21
|
constexpr std::uint32_t kResultDomainBits = 2;
|
|
21
22
|
constexpr std::uint64_t kResultReservedMask = 0xfffc'0000'0000'0000ull;
|
|
@@ -38,7 +39,15 @@ enum class Status : std::int16_t {
|
|
|
38
39
|
OutputCapacity = -309,
|
|
39
40
|
AliasedBuffers = -310,
|
|
40
41
|
RegistryAlreadyInitialized = -311,
|
|
42
|
+
WorldAttached = -312,
|
|
43
|
+
InitialStateMismatch = -313,
|
|
44
|
+
CheckpointTokenExhausted = -314,
|
|
45
|
+
BufferRejected = -315,
|
|
46
|
+
BufferBusy = -316,
|
|
47
|
+
AllocationFailure = -101,
|
|
41
48
|
};
|
|
49
|
+
static_assert(static_cast<std::int32_t>(Status::AllocationFailure)
|
|
50
|
+
== static_cast<std::int32_t>(WorldStatus2D::AllocationFailure));
|
|
42
51
|
|
|
43
52
|
enum class ErrorDomain : std::uint8_t {
|
|
44
53
|
None = 0,
|
|
@@ -57,8 +66,17 @@ struct WorldCapacity {
|
|
|
57
66
|
std::uint32_t body = 0;
|
|
58
67
|
std::uint32_t joint = 0;
|
|
59
68
|
std::uint32_t fluid = 0;
|
|
60
|
-
std::uint32_t
|
|
69
|
+
std::uint32_t contact = 0;
|
|
70
|
+
std::uint32_t contourEdges = 0;
|
|
71
|
+
std::uint32_t checkpointCapacity = 0;
|
|
61
72
|
};
|
|
73
|
+
static_assert(sizeof(WorldCapacity) == 24);
|
|
74
|
+
|
|
75
|
+
struct CheckpointToken {
|
|
76
|
+
std::uint32_t slotIndex = 0;
|
|
77
|
+
std::uint32_t generation = 0;
|
|
78
|
+
};
|
|
79
|
+
static_assert(sizeof(CheckpointToken) == 8);
|
|
62
80
|
|
|
63
81
|
struct WorldSettings {
|
|
64
82
|
double fixedDt = 0.0;
|
|
@@ -83,8 +101,8 @@ struct WorldInfo {
|
|
|
83
101
|
std::uint32_t bodyCapacity = 0;
|
|
84
102
|
std::uint32_t jointCapacity = 0;
|
|
85
103
|
std::uint32_t fluidCapacity = 0;
|
|
86
|
-
std::uint32_t
|
|
87
|
-
std::uint32_t
|
|
104
|
+
std::uint32_t latestContactEventCount = 0;
|
|
105
|
+
std::uint32_t contactCapacity = 0;
|
|
88
106
|
std::uint64_t owner = 0;
|
|
89
107
|
std::uint64_t epoch = 0;
|
|
90
108
|
std::uint64_t frame = 0;
|
|
@@ -102,7 +120,7 @@ struct LatestOutputInfo {
|
|
|
102
120
|
std::uint32_t telemetry = 0;
|
|
103
121
|
std::uint32_t breakEvents = 0;
|
|
104
122
|
std::uint32_t gearReactions = 0;
|
|
105
|
-
std::uint32_t
|
|
123
|
+
std::uint32_t contactEvents = 0;
|
|
106
124
|
std::uint64_t frame = 0;
|
|
107
125
|
StepOptions latestStepOptions{};
|
|
108
126
|
};
|
|
@@ -139,6 +157,10 @@ constexpr bool resultReservedZero(std::uint64_t result) {
|
|
|
139
157
|
}
|
|
140
158
|
|
|
141
159
|
static_assert(sizeof(Status) == 2);
|
|
160
|
+
static_assert(kMaxRegistries == 64);
|
|
161
|
+
static_assert(static_cast<std::int16_t>(Status::RegistryAlreadyInitialized) == -311);
|
|
162
|
+
static_assert(static_cast<std::int16_t>(Status::BufferRejected) == -315);
|
|
163
|
+
static_assert(static_cast<std::int16_t>(Status::BufferBusy) == -316);
|
|
142
164
|
static_assert(sizeof(ErrorDomain) == 1);
|
|
143
165
|
static_assert(kMaxTopologyCommands2D < kNoIndex);
|
|
144
166
|
static_assert(static_cast<std::int32_t>(EditStatus2D::OutputCapacity)
|
|
@@ -159,12 +181,21 @@ static_assert(offsetof(WorldKey, generation) == 12);
|
|
|
159
181
|
|
|
160
182
|
static_assert(std::is_standard_layout_v<WorldCapacity>);
|
|
161
183
|
static_assert(std::is_trivially_copyable_v<WorldCapacity>);
|
|
162
|
-
static_assert(sizeof(WorldCapacity) ==
|
|
184
|
+
static_assert(sizeof(WorldCapacity) == 24);
|
|
163
185
|
static_assert(alignof(WorldCapacity) == 4);
|
|
164
186
|
static_assert(offsetof(WorldCapacity, body) == 0);
|
|
165
187
|
static_assert(offsetof(WorldCapacity, joint) == 4);
|
|
166
188
|
static_assert(offsetof(WorldCapacity, fluid) == 8);
|
|
167
|
-
static_assert(offsetof(WorldCapacity,
|
|
189
|
+
static_assert(offsetof(WorldCapacity, contact) == 12);
|
|
190
|
+
static_assert(offsetof(WorldCapacity, contourEdges) == 16);
|
|
191
|
+
static_assert(offsetof(WorldCapacity, checkpointCapacity) == 20);
|
|
192
|
+
|
|
193
|
+
static_assert(std::is_standard_layout_v<CheckpointToken>);
|
|
194
|
+
static_assert(std::is_trivially_copyable_v<CheckpointToken>);
|
|
195
|
+
static_assert(sizeof(CheckpointToken) == 8);
|
|
196
|
+
static_assert(alignof(CheckpointToken) == 4);
|
|
197
|
+
static_assert(offsetof(CheckpointToken, slotIndex) == 0);
|
|
198
|
+
static_assert(offsetof(CheckpointToken, generation) == 4);
|
|
168
199
|
|
|
169
200
|
static_assert(std::is_standard_layout_v<WorldSettings>);
|
|
170
201
|
static_assert(std::is_trivially_copyable_v<WorldSettings>);
|
|
@@ -188,6 +219,8 @@ static_assert(offsetof(WorldInfo, physicsProfile) == 16);
|
|
|
188
219
|
static_assert(offsetof(WorldInfo, bodyCount) == 20);
|
|
189
220
|
static_assert(offsetof(WorldInfo, latestTelemetryCount) == 32);
|
|
190
221
|
static_assert(offsetof(WorldInfo, bodyCapacity) == 44);
|
|
222
|
+
static_assert(offsetof(WorldInfo, latestContactEventCount) == 56);
|
|
223
|
+
static_assert(offsetof(WorldInfo, contactCapacity) == 60);
|
|
191
224
|
static_assert(offsetof(WorldInfo, owner) == 64);
|
|
192
225
|
static_assert(offsetof(WorldInfo, epoch) == 72);
|
|
193
226
|
static_assert(offsetof(WorldInfo, frame) == 80);
|
|
@@ -207,7 +240,7 @@ static_assert(alignof(LatestOutputInfo) == 8);
|
|
|
207
240
|
static_assert(offsetof(LatestOutputInfo, telemetry) == 0);
|
|
208
241
|
static_assert(offsetof(LatestOutputInfo, breakEvents) == 4);
|
|
209
242
|
static_assert(offsetof(LatestOutputInfo, gearReactions) == 8);
|
|
210
|
-
static_assert(offsetof(LatestOutputInfo,
|
|
243
|
+
static_assert(offsetof(LatestOutputInfo, contactEvents) == 12);
|
|
211
244
|
static_assert(offsetof(LatestOutputInfo, frame) == 16);
|
|
212
245
|
static_assert(offsetof(LatestOutputInfo, latestStepOptions) == 24);
|
|
213
246
|
|
|
@@ -222,17 +255,16 @@ static_assert(resultReservedZero(kPackedControl));
|
|
|
222
255
|
|
|
223
256
|
extern "C" {
|
|
224
257
|
|
|
225
|
-
// Each
|
|
226
|
-
//
|
|
227
|
-
// A
|
|
258
|
+
// Each pointer argument is an admitted scratch lease.
|
|
259
|
+
// A failed call leaves every output byte unchanged.
|
|
260
|
+
// A registry handle names one directory entry. A copy of the handle is the same name.
|
|
228
261
|
|
|
229
262
|
std::uint32_t rundot_physics2d_owned_c_abi_version() noexcept;
|
|
230
263
|
std::uint32_t rundot_physics2d_owned_world_storage_abi_version() noexcept;
|
|
231
264
|
std::uint32_t rundot_physics2d_owned_snapshot_version() noexcept;
|
|
232
265
|
std::uint32_t rundot_physics2d_owned_required_settings_abi_version() noexcept;
|
|
233
266
|
std::uint32_t rundot_physics2d_owned_physics_profile() noexcept;
|
|
234
|
-
std::uint32_t
|
|
235
|
-
std::uint32_t rundot_physics2d_owned_registry_alignment() noexcept;
|
|
267
|
+
std::uint32_t rundot_physics2d_owned_max_registries() noexcept;
|
|
236
268
|
std::uint32_t rundot_physics2d_owned_max_worlds_per_registry() noexcept;
|
|
237
269
|
std::uint32_t rundot_physics2d_owned_world_key_size() noexcept;
|
|
238
270
|
std::uint32_t rundot_physics2d_owned_world_capacity_size() noexcept;
|
|
@@ -244,45 +276,47 @@ std::uint32_t rundot_physics2d_owned_topology_command_size() noexcept;
|
|
|
244
276
|
std::uint32_t rundot_physics2d_owned_entity_handle_size() noexcept;
|
|
245
277
|
std::uint32_t rundot_physics2d_owned_removed_identity_size() noexcept;
|
|
246
278
|
std::uint32_t rundot_physics2d_owned_body_payload_size() noexcept;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
//
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
std::uint32_t
|
|
254
|
-
std::
|
|
255
|
-
std::uint64_t
|
|
279
|
+
std::uint32_t rundot_physics2d_owned_contact_event_size() noexcept;
|
|
280
|
+
std::uint32_t rundot_physics2d_owned_checkpoint_token_size() noexcept;
|
|
281
|
+
|
|
282
|
+
// Create writes the handle only after the entry is active.
|
|
283
|
+
// Destroy frees the slot table once. A later destroy of the same handle fails.
|
|
284
|
+
std::uint64_t rundot_physics2d_owned_registry_create(
|
|
285
|
+
std::uint32_t worldCapacity,
|
|
286
|
+
std::uint64_t* outputRegistry) noexcept;
|
|
287
|
+
std::uint64_t rundot_physics2d_owned_registry_destroy(std::uint64_t registry) noexcept;
|
|
288
|
+
std::uintptr_t rundot_physics2d_owned_buffer_allocate(std::uint32_t bytes) noexcept;
|
|
289
|
+
std::uint64_t rundot_physics2d_owned_buffer_free(std::uintptr_t pointer) noexcept;
|
|
256
290
|
|
|
257
291
|
// settings is a versioned byte record from the separate world-settings ABI.
|
|
258
292
|
std::uint64_t rundot_physics2d_owned_world_create(
|
|
259
|
-
|
|
293
|
+
std::uint64_t registry,
|
|
260
294
|
std::uint32_t settingsAbiVersion,
|
|
261
295
|
const std::uint8_t* settings,
|
|
262
296
|
std::uint32_t settingsBytes,
|
|
263
297
|
const rundot::kinetix::physics2d::owned_abi::WorldCapacity* capacity,
|
|
264
298
|
rundot::kinetix::physics2d::owned_abi::WorldKey* outputWorld) noexcept;
|
|
265
299
|
std::uint64_t rundot_physics2d_owned_world_destroy(
|
|
266
|
-
|
|
300
|
+
std::uint64_t registry,
|
|
267
301
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world) noexcept;
|
|
268
302
|
std::uint64_t rundot_physics2d_owned_world_info(
|
|
269
|
-
|
|
303
|
+
std::uint64_t registry,
|
|
270
304
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
271
305
|
rundot::kinetix::physics2d::owned_abi::WorldInfo* output) noexcept;
|
|
272
306
|
|
|
273
307
|
// One successful call advances one fixed tick from native-owned tick state.
|
|
274
308
|
// The settings ABI defines deterministic commands for mutable values such as gravity.
|
|
275
309
|
std::uint64_t rundot_physics2d_owned_world_step(
|
|
276
|
-
|
|
310
|
+
std::uint64_t registry,
|
|
277
311
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world) noexcept;
|
|
278
312
|
std::uint64_t rundot_physics2d_owned_world_set_gravity(
|
|
279
|
-
|
|
313
|
+
std::uint64_t registry,
|
|
280
314
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
281
315
|
double gravityX,
|
|
282
316
|
double gravityY) noexcept;
|
|
283
317
|
|
|
284
318
|
std::uint64_t rundot_physics2d_owned_world_edit(
|
|
285
|
-
|
|
319
|
+
std::uint64_t registry,
|
|
286
320
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
287
321
|
const rundot::kinetix::physics2d::TopologyCommand2D* commands,
|
|
288
322
|
std::uint32_t commandCount,
|
|
@@ -299,45 +333,54 @@ std::uint64_t rundot_physics2d_owned_world_edit(
|
|
|
299
333
|
std::uint32_t* handleCount,
|
|
300
334
|
rundot::kinetix::physics2d::RemovedIdentity2D* removed,
|
|
301
335
|
std::uint32_t removedCapacity,
|
|
302
|
-
std::uint32_t* removedCount
|
|
336
|
+
std::uint32_t* removedCount,
|
|
337
|
+
const rundot::kinetix::physics2d::ContourEdge2D* contourEdgePayloads = nullptr,
|
|
338
|
+
std::uint32_t contourEdgePayloadCount = 0) noexcept;
|
|
303
339
|
|
|
304
340
|
std::uint64_t rundot_physics2d_owned_world_resolve_body(
|
|
305
|
-
|
|
341
|
+
std::uint64_t registry,
|
|
306
342
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
307
343
|
std::uint32_t id,
|
|
308
344
|
rundot::kinetix::physics2d::EntityHandle2D* output) noexcept;
|
|
309
345
|
std::uint64_t rundot_physics2d_owned_world_resolve_joint(
|
|
310
|
-
|
|
346
|
+
std::uint64_t registry,
|
|
311
347
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
312
348
|
std::uint32_t id,
|
|
313
349
|
rundot::kinetix::physics2d::EntityHandle2D* output) noexcept;
|
|
314
350
|
std::uint64_t rundot_physics2d_owned_world_resolve_fluid(
|
|
315
|
-
|
|
351
|
+
std::uint64_t registry,
|
|
316
352
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
317
353
|
std::uint32_t id,
|
|
318
354
|
rundot::kinetix::physics2d::EntityHandle2D* output) noexcept;
|
|
319
355
|
|
|
320
356
|
std::uint64_t rundot_physics2d_owned_world_read_body(
|
|
321
|
-
|
|
357
|
+
std::uint64_t registry,
|
|
322
358
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
323
359
|
const rundot::kinetix::physics2d::EntityHandle2D* body,
|
|
324
360
|
rundot::kinetix::physics2d::Body* outputBody,
|
|
325
361
|
rundot::kinetix::physics2d::PolygonGeometry* outputGeometry) noexcept;
|
|
326
362
|
std::uint64_t rundot_physics2d_owned_world_read_joint(
|
|
327
|
-
|
|
363
|
+
std::uint64_t registry,
|
|
328
364
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
329
365
|
const rundot::kinetix::physics2d::EntityHandle2D* joint,
|
|
330
366
|
rundot::kinetix::physics2d::JointRecord2D* outputJoint,
|
|
331
367
|
rundot::kinetix::physics2d::JointState2D* outputState) noexcept;
|
|
332
368
|
std::uint64_t rundot_physics2d_owned_world_read_fluid(
|
|
333
|
-
|
|
369
|
+
std::uint64_t registry,
|
|
334
370
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
335
371
|
const rundot::kinetix::physics2d::EntityHandle2D* fluid,
|
|
336
372
|
rundot::kinetix::physics2d::FluidRegion2D* outputFluid) noexcept;
|
|
373
|
+
std::uint64_t rundot_physics2d_owned_world_read_contour_edges(
|
|
374
|
+
std::uint64_t registry,
|
|
375
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
376
|
+
const rundot::kinetix::physics2d::EntityHandle2D* body,
|
|
377
|
+
rundot::kinetix::physics2d::ContourEdge2D* outputEdges,
|
|
378
|
+
std::uint32_t maxEdges,
|
|
379
|
+
std::uint32_t* outputCount) noexcept;
|
|
337
380
|
|
|
338
|
-
// This call copies all
|
|
381
|
+
// This call copies all latest-step arrays or writes nothing.
|
|
339
382
|
std::uint64_t rundot_physics2d_owned_world_copy_latest_outputs(
|
|
340
|
-
|
|
383
|
+
std::uint64_t registry,
|
|
341
384
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
342
385
|
rundot::kinetix::physics2d::JointTelemetry2D* telemetry,
|
|
343
386
|
std::uint32_t telemetryCapacity,
|
|
@@ -345,80 +388,175 @@ std::uint64_t rundot_physics2d_owned_world_copy_latest_outputs(
|
|
|
345
388
|
std::uint32_t breakEventCapacity,
|
|
346
389
|
rundot::kinetix::physics2d::GearReactionEntry2D* gearReactions,
|
|
347
390
|
std::uint32_t gearReactionCapacity,
|
|
391
|
+
rundot::kinetix::physics2d::ContactEvent2D* contactEvents,
|
|
392
|
+
std::uint32_t contactEventCapacity,
|
|
348
393
|
rundot::kinetix::physics2d::owned_abi::LatestOutputInfo* outputInfo) noexcept;
|
|
349
394
|
|
|
350
395
|
std::uint64_t rundot_physics2d_owned_world_capture(
|
|
351
|
-
|
|
396
|
+
std::uint64_t registry,
|
|
352
397
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
353
398
|
std::uint8_t* output,
|
|
354
399
|
std::uint32_t outputCapacity,
|
|
355
400
|
std::uint32_t* outputBytes) noexcept;
|
|
356
401
|
std::uint64_t rundot_physics2d_owned_world_restore(
|
|
357
|
-
|
|
402
|
+
std::uint64_t registry,
|
|
358
403
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
359
404
|
const std::uint8_t* snapshot,
|
|
360
405
|
std::uint32_t snapshotBytes) noexcept;
|
|
361
406
|
std::uint64_t rundot_physics2d_owned_world_digest(
|
|
362
|
-
|
|
407
|
+
std::uint64_t registry,
|
|
363
408
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
364
409
|
std::uint64_t* output) noexcept;
|
|
365
410
|
std::uint64_t rundot_physics2d_owned_world_checkpoint_capture(
|
|
366
|
-
|
|
411
|
+
std::uint64_t registry,
|
|
367
412
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
368
413
|
std::uint32_t* checkpointHandle) noexcept;
|
|
369
414
|
std::uint64_t rundot_physics2d_owned_world_checkpoint_restore(
|
|
370
|
-
|
|
415
|
+
std::uint64_t registry,
|
|
371
416
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
372
417
|
std::uint32_t checkpointHandle) noexcept;
|
|
373
418
|
std::uint64_t rundot_physics2d_owned_world_checkpoint_release(
|
|
374
|
-
|
|
419
|
+
std::uint64_t registry,
|
|
375
420
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
376
421
|
std::uint32_t checkpointHandle) noexcept;
|
|
377
422
|
std::uint64_t rundot_physics2d_owned_world_checkpoint_capture_size(
|
|
378
|
-
|
|
423
|
+
std::uint64_t registry,
|
|
379
424
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
380
425
|
std::uint32_t checkpointHandle,
|
|
381
426
|
std::uint32_t* outputBytes) noexcept;
|
|
382
427
|
std::uint64_t rundot_physics2d_owned_world_checkpoint_capture_snapshot(
|
|
383
|
-
|
|
428
|
+
std::uint64_t registry,
|
|
384
429
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
385
430
|
std::uint32_t checkpointHandle,
|
|
386
431
|
std::uint8_t* output,
|
|
387
432
|
std::uint32_t outputCapacity,
|
|
388
433
|
std::uint32_t* outputBytes) noexcept;
|
|
389
434
|
|
|
435
|
+
std::uint64_t rundot_physics2d_owned_world_attach(
|
|
436
|
+
std::uint64_t registry,
|
|
437
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
438
|
+
std::uint64_t expectedInitialDigest,
|
|
439
|
+
std::uint32_t* outputAttachmentToken) noexcept;
|
|
440
|
+
std::uint64_t rundot_physics2d_owned_world_detach(
|
|
441
|
+
std::uint64_t registry,
|
|
442
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
443
|
+
std::uint32_t attachmentToken) noexcept;
|
|
444
|
+
std::uint64_t rundot_physics2d_owned_world_revision(
|
|
445
|
+
std::uint64_t registry,
|
|
446
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
447
|
+
std::uint64_t* outputRevision) noexcept;
|
|
448
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_capacity(
|
|
449
|
+
std::uint64_t registry,
|
|
450
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
451
|
+
std::uint32_t* outputCapacity) noexcept;
|
|
452
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_live_count(
|
|
453
|
+
std::uint64_t registry,
|
|
454
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
455
|
+
std::uint32_t* outputCount) noexcept;
|
|
456
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_preflight(
|
|
457
|
+
std::uint64_t registry,
|
|
458
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
459
|
+
std::uint32_t requiredSlots,
|
|
460
|
+
std::uint32_t* outputCanAllocate) noexcept;
|
|
461
|
+
|
|
462
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_capture_token(
|
|
463
|
+
std::uint64_t registry,
|
|
464
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
465
|
+
std::uint32_t attachmentToken,
|
|
466
|
+
rundot::kinetix::physics2d::owned_abi::CheckpointToken* outputToken) noexcept;
|
|
467
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_restore_token(
|
|
468
|
+
std::uint64_t registry,
|
|
469
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
470
|
+
std::uint32_t attachmentToken,
|
|
471
|
+
const rundot::kinetix::physics2d::owned_abi::CheckpointToken* token) noexcept;
|
|
472
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_release_token(
|
|
473
|
+
std::uint64_t registry,
|
|
474
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
475
|
+
std::uint32_t attachmentToken,
|
|
476
|
+
const rundot::kinetix::physics2d::owned_abi::CheckpointToken* token) noexcept;
|
|
477
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_capture_size_token(
|
|
478
|
+
std::uint64_t registry,
|
|
479
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
480
|
+
std::uint32_t attachmentToken,
|
|
481
|
+
const rundot::kinetix::physics2d::owned_abi::CheckpointToken* token,
|
|
482
|
+
std::uint32_t* outputBytes) noexcept;
|
|
483
|
+
std::uint64_t rundot_physics2d_owned_world_checkpoint_capture_snapshot_token(
|
|
484
|
+
std::uint64_t registry,
|
|
485
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
486
|
+
std::uint32_t attachmentToken,
|
|
487
|
+
const rundot::kinetix::physics2d::owned_abi::CheckpointToken* token,
|
|
488
|
+
std::uint8_t* output,
|
|
489
|
+
std::uint32_t outputCapacity,
|
|
490
|
+
std::uint32_t* outputBytes) noexcept;
|
|
491
|
+
|
|
492
|
+
std::uint64_t rundot_physics2d_owned_world_restore_authorized(
|
|
493
|
+
std::uint64_t registry,
|
|
494
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
495
|
+
std::uint32_t attachmentToken,
|
|
496
|
+
const std::uint8_t* snapshot,
|
|
497
|
+
std::uint32_t snapshotBytes) noexcept;
|
|
498
|
+
|
|
499
|
+
std::uint64_t rundot_physics2d_owned_instance_ledger_info(
|
|
500
|
+
std::uint64_t* outputPayloadBytes,
|
|
501
|
+
std::uint64_t* outputHighwaterBytes,
|
|
502
|
+
std::uint32_t* outputLiveSlots,
|
|
503
|
+
std::uint32_t* outputLiveWorlds,
|
|
504
|
+
std::uint64_t* outputMetadataBytes,
|
|
505
|
+
std::uint64_t* outputWasmMemoryBytes,
|
|
506
|
+
std::uint32_t* outputImbalanced,
|
|
507
|
+
std::uint64_t* outputScratchBytes) noexcept;
|
|
508
|
+
std::uint64_t rundot_physics2d_owned_instance_ledger_reset() noexcept;
|
|
509
|
+
|
|
510
|
+
#if defined(RUNDOT_PHYSICS2D_PHASE_TEST_HOOKS)
|
|
511
|
+
void rundot_physics2d_test_set_next_checkpoint_generation(std::uint32_t generation) noexcept;
|
|
512
|
+
#endif
|
|
513
|
+
|
|
390
514
|
std::uint64_t rundot_physics2d_owned_world_raycast(
|
|
391
|
-
|
|
515
|
+
std::uint64_t registry,
|
|
392
516
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
393
517
|
const rundot::kinetix::physics2d::RaycastQuery2D* request,
|
|
394
518
|
const rundot::kinetix::physics2d::QueryFilter2D* filter,
|
|
519
|
+
std::uint32_t excludedBodyCount,
|
|
395
520
|
const std::uint32_t* excludedBodyIds,
|
|
396
521
|
rundot::kinetix::physics2d::CastHit2D* output,
|
|
397
522
|
std::uint32_t outputCapacity,
|
|
398
523
|
std::uint32_t* outputCount) noexcept;
|
|
399
524
|
std::uint64_t rundot_physics2d_owned_world_overlap(
|
|
400
|
-
|
|
525
|
+
std::uint64_t registry,
|
|
401
526
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
402
527
|
const rundot::kinetix::physics2d::OverlapQuery2D* request,
|
|
403
528
|
const rundot::kinetix::physics2d::QueryFilter2D* filter,
|
|
529
|
+
std::uint32_t excludedBodyCount,
|
|
404
530
|
const std::uint32_t* excludedBodyIds,
|
|
405
531
|
rundot::kinetix::physics2d::OverlapHit2D* output,
|
|
406
532
|
std::uint32_t outputCapacity,
|
|
407
533
|
std::uint32_t* outputCount) noexcept;
|
|
534
|
+
std::uint64_t rundot_physics2d_owned_world_overlap_contacts(
|
|
535
|
+
std::uint64_t registry,
|
|
536
|
+
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
537
|
+
const rundot::kinetix::physics2d::OverlapQuery2D* request,
|
|
538
|
+
const rundot::kinetix::physics2d::QueryFilter2D* filter,
|
|
539
|
+
std::uint32_t excludedBodyCount,
|
|
540
|
+
const std::uint32_t* excludedBodyIds,
|
|
541
|
+
rundot::kinetix::physics2d::OverlapContactHit2D* output,
|
|
542
|
+
std::uint32_t outputCapacity,
|
|
543
|
+
std::uint32_t* outputCount) noexcept;
|
|
408
544
|
std::uint64_t rundot_physics2d_owned_world_shape_cast(
|
|
409
|
-
|
|
545
|
+
std::uint64_t registry,
|
|
410
546
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
411
547
|
const rundot::kinetix::physics2d::ShapeCastQuery2D* request,
|
|
412
548
|
const rundot::kinetix::physics2d::QueryFilter2D* filter,
|
|
549
|
+
std::uint32_t excludedBodyCount,
|
|
413
550
|
const std::uint32_t* excludedBodyIds,
|
|
414
551
|
rundot::kinetix::physics2d::CastHit2D* output,
|
|
415
552
|
std::uint32_t outputCapacity,
|
|
416
553
|
std::uint32_t* outputCount) noexcept;
|
|
417
554
|
std::uint64_t rundot_physics2d_owned_world_closest_points(
|
|
418
|
-
|
|
555
|
+
std::uint64_t registry,
|
|
419
556
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
420
557
|
const rundot::kinetix::physics2d::ClosestPointsQuery2D* request,
|
|
421
558
|
const rundot::kinetix::physics2d::QueryFilter2D* filter,
|
|
559
|
+
std::uint32_t excludedBodyCount,
|
|
422
560
|
const std::uint32_t* excludedBodyIds,
|
|
423
561
|
rundot::kinetix::physics2d::ClosestPointHit2D* output,
|
|
424
562
|
std::uint32_t outputCapacity,
|
|
@@ -475,7 +613,7 @@ std::int32_t rundot_physics2d_owned_particle_fluid_validate(
|
|
|
475
613
|
const rundot::kinetix::physics2d::VolumetricFluidState2D* state) noexcept;
|
|
476
614
|
|
|
477
615
|
std::uint64_t rundot_physics2d_owned_world_sample_fluid_medium(
|
|
478
|
-
|
|
616
|
+
std::uint64_t registry,
|
|
479
617
|
const rundot::kinetix::physics2d::owned_abi::WorldKey* world,
|
|
480
618
|
double x,
|
|
481
619
|
double y,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include <cstdint>
|
|
3
|
+
namespace rundot::kinetix::physics2d::phase_test_private {
|
|
4
|
+
enum class Code : std::uint32_t {
|
|
5
|
+
CombinedPose = 1, Velocity, Fluid, Contact, Pose, ForceClear,
|
|
6
|
+
PrimitivePrepare, PrimitiveWarm, GearPrepare, GearWarm,
|
|
7
|
+
PrimitiveSolve, GearSolve, JointFinish, PrimitiveRefresh, GearRefresh
|
|
8
|
+
};
|
|
9
|
+
#if defined(RUNDOT_PHYSICS2D_PHASE_TEST_HOOKS)
|
|
10
|
+
extern "C" void rundot_physics2d_phase_event(std::uint32_t, std::uint32_t);
|
|
11
|
+
inline void record(Code code, std::uint32_t index = 0) {
|
|
12
|
+
rundot_physics2d_phase_event(static_cast<std::uint32_t>(code), index);
|
|
13
|
+
}
|
|
14
|
+
#else
|
|
15
|
+
inline void record(Code, std::uint32_t = 0) {}
|
|
16
|
+
#endif
|
|
17
|
+
}
|