@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
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <algorithm>
|
|
4
|
+
#include <array>
|
|
5
|
+
#include <cmath>
|
|
6
|
+
#include <cstdint>
|
|
7
|
+
#include <limits>
|
|
8
|
+
#include <span>
|
|
9
|
+
|
|
10
|
+
#include "physics.hpp"
|
|
11
|
+
#include "constraint_rows.hpp"
|
|
12
|
+
|
|
13
|
+
namespace rundot::kinetix::physics {
|
|
14
|
+
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// ABI and Capacity Constants
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
constexpr std::uint32_t kSoftCollisionAbiVersion = 1;
|
|
20
|
+
|
|
21
|
+
constexpr std::uint32_t kSoftNodeStride = 16;
|
|
22
|
+
constexpr std::uint32_t kSoftFaceStride = 6;
|
|
23
|
+
constexpr std::uint32_t kSoftBodyStride = 12;
|
|
24
|
+
constexpr std::uint32_t kSoftParamsStride = 12;
|
|
25
|
+
constexpr std::uint32_t kSoftRigidContactStride = 12;
|
|
26
|
+
constexpr std::uint32_t kSoftSoftContactStride = 14;
|
|
27
|
+
constexpr std::uint32_t kSoftSensorEventStride = 10;
|
|
28
|
+
constexpr std::uint32_t kSoftRaycastQueryStride = 8;
|
|
29
|
+
constexpr std::uint32_t kSoftRaycastHitStride = 8;
|
|
30
|
+
constexpr std::uint32_t kSoftOverlapQueryStride = 6;
|
|
31
|
+
constexpr std::uint32_t kSoftOverlapHitStride = 6;
|
|
32
|
+
constexpr std::uint32_t kSoftClosestPointQueryStride = 6;
|
|
33
|
+
constexpr std::uint32_t kSoftClosestPointResultStride = 8;
|
|
34
|
+
|
|
35
|
+
constexpr std::uint32_t kSoftMaxNodes = 1024;
|
|
36
|
+
constexpr std::uint32_t kSoftMaxFaces = 2048;
|
|
37
|
+
constexpr std::uint32_t kSoftMaxBodies = 64;
|
|
38
|
+
constexpr std::uint32_t kSoftMaxContacts = 2048;
|
|
39
|
+
constexpr std::uint32_t kSoftMaxSensorEvents = 512;
|
|
40
|
+
constexpr std::uint32_t kSoftMaxExclusions = 2048;
|
|
41
|
+
constexpr std::uint32_t kSoftMaxQueryHits = 256;
|
|
42
|
+
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// Enums
|
|
45
|
+
// ---------------------------------------------------------------------------
|
|
46
|
+
|
|
47
|
+
enum class SoftCollisionStatus : std::int32_t {
|
|
48
|
+
Success = 0,
|
|
49
|
+
InvalidInput = -1,
|
|
50
|
+
InvalidCapacity = -2,
|
|
51
|
+
InvalidParams = -3,
|
|
52
|
+
BufferOverflow = -4,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
enum class SoftSelfCollisionPolicy : std::uint32_t {
|
|
56
|
+
Disabled = 0,
|
|
57
|
+
VertexVertex = 1,
|
|
58
|
+
VertexFace = 2,
|
|
59
|
+
Full = 3,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
enum class SoftCollisionPolicy : std::uint32_t {
|
|
63
|
+
Default = 0,
|
|
64
|
+
IgnoreSoftSoft = 1,
|
|
65
|
+
IgnoreSoftRigid = 2,
|
|
66
|
+
SensorOnly = 3,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
enum class SoftTargetKind : std::uint32_t {
|
|
70
|
+
RigidBody = 0,
|
|
71
|
+
SoftBody = 1,
|
|
72
|
+
Ground = 2,
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
enum class SoftPrimitiveKind : std::uint32_t {
|
|
76
|
+
Node = 0,
|
|
77
|
+
Segment = 1,
|
|
78
|
+
Face = 2,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
// Deterministic Math Types (Double Only)
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
struct SoftVec3 {
|
|
86
|
+
double x = 0.0;
|
|
87
|
+
double y = 0.0;
|
|
88
|
+
double z = 0.0;
|
|
89
|
+
|
|
90
|
+
constexpr bool operator==(const SoftVec3& other) const = default;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
struct SoftQuat {
|
|
94
|
+
double x = 0.0;
|
|
95
|
+
double y = 0.0;
|
|
96
|
+
double z = 0.0;
|
|
97
|
+
double w = 1.0;
|
|
98
|
+
|
|
99
|
+
constexpr bool operator==(const SoftQuat& other) const = default;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
inline SoftVec3 addSoftVec3(const SoftVec3& a, const SoftVec3& b) {
|
|
103
|
+
return {a.x + b.x, a.y + b.y, a.z + b.z};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
inline SoftVec3 subSoftVec3(const SoftVec3& a, const SoftVec3& b) {
|
|
107
|
+
return {a.x - b.x, a.y - b.y, a.z - b.z};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
inline SoftVec3 scaleSoftVec3(const SoftVec3& v, double s) {
|
|
111
|
+
return {v.x * s, v.y * s, v.z * s};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
inline double dotSoftVec3(const SoftVec3& a, const SoftVec3& b) {
|
|
115
|
+
return a.x * b.x + a.y * b.y + a.z * b.z;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
inline SoftVec3 crossSoftVec3(const SoftVec3& a, const SoftVec3& b) {
|
|
119
|
+
return {
|
|
120
|
+
a.y * b.z - a.z * b.y,
|
|
121
|
+
a.z * b.x - a.x * b.z,
|
|
122
|
+
a.x * b.y - a.y * b.x,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
inline double lengthSquaredSoftVec3(const SoftVec3& v) {
|
|
127
|
+
return dotSoftVec3(v, v);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
inline double lengthSoftVec3(const SoftVec3& v) {
|
|
131
|
+
const double sq = lengthSquaredSoftVec3(v);
|
|
132
|
+
return sq > 0.0 ? std::sqrt(sq) : 0.0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
inline SoftVec3 normalizeSoftVec3(const SoftVec3& v) {
|
|
136
|
+
const double len = lengthSoftVec3(v);
|
|
137
|
+
if (len <= 1e-15) {
|
|
138
|
+
return {0.0, 1.0, 0.0};
|
|
139
|
+
}
|
|
140
|
+
const double inv = 1.0 / len;
|
|
141
|
+
return {v.x * inv, v.y * inv, v.z * inv};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
inline SoftVec3 rotateByQuat(const SoftQuat& q, const SoftVec3& v) {
|
|
145
|
+
const SoftVec3 u{q.x, q.y, q.z};
|
|
146
|
+
const SoftVec3 uv = crossSoftVec3(u, v);
|
|
147
|
+
const SoftVec3 uuv = crossSoftVec3(u, uv);
|
|
148
|
+
return addSoftVec3(v, addSoftVec3(scaleSoftVec3(uv, 2.0 * q.w), scaleSoftVec3(uuv, 2.0)));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
inline SoftQuat conjugateQuat(const SoftQuat& q) {
|
|
152
|
+
return {-q.x, -q.y, -q.z, q.w};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
inline SoftVec3 invRotateByQuat(const SoftQuat& q, const SoftVec3& v) {
|
|
156
|
+
return rotateByQuat(conjugateQuat(q), v);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
inline double clampDouble(double v, double minVal, double maxVal) {
|
|
160
|
+
if (v < minVal) return minVal;
|
|
161
|
+
if (v > maxVal) return maxVal;
|
|
162
|
+
return v;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// ---------------------------------------------------------------------------
|
|
166
|
+
// Soft Body Node, Face, and Body Definitions
|
|
167
|
+
// ---------------------------------------------------------------------------
|
|
168
|
+
|
|
169
|
+
struct SoftNode {
|
|
170
|
+
SoftVec3 position{0.0, 0.0, 0.0};
|
|
171
|
+
SoftVec3 previousPosition{0.0, 0.0, 0.0};
|
|
172
|
+
SoftVec3 velocity{0.0, 0.0, 0.0};
|
|
173
|
+
double inverseMass = 1.0; // 0.0 = pinned / kinematic, > 0.0 = dynamic
|
|
174
|
+
double radius = 0.05;
|
|
175
|
+
double thickness = 0.01;
|
|
176
|
+
double friction = 0.4;
|
|
177
|
+
double restitution = 0.0;
|
|
178
|
+
std::uint32_t flags = 0; // bit 0: pinned, bit 1: sensor
|
|
179
|
+
std::uint32_t softBodyId = 0;
|
|
180
|
+
|
|
181
|
+
constexpr bool operator==(const SoftNode& other) const = default;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
struct SoftFace {
|
|
185
|
+
std::uint32_t nodeA = 0;
|
|
186
|
+
std::uint32_t nodeB = 0;
|
|
187
|
+
std::uint32_t nodeC = 0;
|
|
188
|
+
double thickness = 0.01;
|
|
189
|
+
std::uint32_t softBodyId = 0;
|
|
190
|
+
std::uint32_t flags = 0;
|
|
191
|
+
|
|
192
|
+
constexpr bool operator==(const SoftFace& other) const = default;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
struct SoftExclusionPair {
|
|
196
|
+
std::uint32_t nodeA = 0;
|
|
197
|
+
std::uint32_t nodeB = 0;
|
|
198
|
+
|
|
199
|
+
constexpr bool operator==(const SoftExclusionPair& other) const = default;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
struct SoftBodyDef {
|
|
203
|
+
std::uint32_t softBodyId = 0;
|
|
204
|
+
std::uint32_t layer = 1;
|
|
205
|
+
std::uint32_t mask = 0xffffffff;
|
|
206
|
+
SoftSelfCollisionPolicy selfPolicy = SoftSelfCollisionPolicy::VertexVertex;
|
|
207
|
+
SoftCollisionPolicy policy = SoftCollisionPolicy::Default;
|
|
208
|
+
double defaultThickness = 0.01;
|
|
209
|
+
double friction = 0.4;
|
|
210
|
+
double restitution = 0.0;
|
|
211
|
+
bool isSensor = false;
|
|
212
|
+
std::uint32_t firstNode = 0;
|
|
213
|
+
std::uint32_t nodeCount = 0;
|
|
214
|
+
std::uint32_t firstFace = 0;
|
|
215
|
+
std::uint32_t faceCount = 0;
|
|
216
|
+
|
|
217
|
+
constexpr bool operator==(const SoftBodyDef& other) const = default;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
struct SoftCollisionParams {
|
|
221
|
+
bool enableGround = true;
|
|
222
|
+
double groundY = 0.0;
|
|
223
|
+
double groundFriction = 0.5;
|
|
224
|
+
double groundRestitution = 0.0;
|
|
225
|
+
double groundThickness = 0.0;
|
|
226
|
+
double restitutionThreshold = 0.5;
|
|
227
|
+
double positionDamping = 0.0;
|
|
228
|
+
double velocityDamping = 0.01;
|
|
229
|
+
std::uint32_t solverIterations = 4;
|
|
230
|
+
double maxPenetrationCorrection = 1.0;
|
|
231
|
+
double selfCollisionExclusionHops = 1.0;
|
|
232
|
+
double twoWayRigidCoupling = 1.0; // 1.0 = enabled (default), 0.0 = one-way
|
|
233
|
+
|
|
234
|
+
constexpr bool operator==(const SoftCollisionParams& other) const = default;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
// ---------------------------------------------------------------------------
|
|
238
|
+
// Telemetry and Event Records
|
|
239
|
+
// ---------------------------------------------------------------------------
|
|
240
|
+
|
|
241
|
+
struct SoftRigidContact {
|
|
242
|
+
std::uint32_t softBodyId = 0;
|
|
243
|
+
std::uint32_t nodeIndex = 0;
|
|
244
|
+
std::uint32_t rigidBodyIndex = 0;
|
|
245
|
+
SoftVec3 point{0.0, 0.0, 0.0};
|
|
246
|
+
SoftVec3 normal{0.0, 1.0, 0.0}; // Directed from rigid body into soft node
|
|
247
|
+
double penetration = 0.0;
|
|
248
|
+
double normalImpulse = 0.0;
|
|
249
|
+
double frictionImpulse = 0.0;
|
|
250
|
+
bool isSensor = false;
|
|
251
|
+
|
|
252
|
+
constexpr bool operator==(const SoftRigidContact& other) const = default;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
struct SoftSoftContact {
|
|
256
|
+
std::uint32_t softBodyIdA = 0;
|
|
257
|
+
std::uint32_t elementIndexA = 0;
|
|
258
|
+
std::uint32_t softBodyIdB = 0;
|
|
259
|
+
std::uint32_t elementIndexB = 0;
|
|
260
|
+
bool isSelfCollision = false;
|
|
261
|
+
SoftVec3 point{0.0, 0.0, 0.0};
|
|
262
|
+
SoftVec3 normal{0.0, 1.0, 0.0}; // Directed from B towards A
|
|
263
|
+
double penetration = 0.0;
|
|
264
|
+
double normalImpulse = 0.0;
|
|
265
|
+
double frictionImpulse = 0.0;
|
|
266
|
+
bool isSensor = false;
|
|
267
|
+
|
|
268
|
+
constexpr bool operator==(const SoftSoftContact& other) const = default;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
struct SoftSensorEvent {
|
|
272
|
+
std::uint32_t softBodyId = 0;
|
|
273
|
+
std::uint32_t nodeIndex = 0;
|
|
274
|
+
SoftTargetKind otherKind = SoftTargetKind::RigidBody;
|
|
275
|
+
std::uint32_t otherId = 0;
|
|
276
|
+
std::uint32_t otherElementIndex = 0;
|
|
277
|
+
SoftVec3 point{0.0, 0.0, 0.0};
|
|
278
|
+
SoftVec3 normal{0.0, 1.0, 0.0};
|
|
279
|
+
double penetration = 0.0;
|
|
280
|
+
double relativeVelocity = 0.0;
|
|
281
|
+
|
|
282
|
+
constexpr bool operator==(const SoftSensorEvent& other) const = default;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
// ---------------------------------------------------------------------------
|
|
286
|
+
// Queries
|
|
287
|
+
// ---------------------------------------------------------------------------
|
|
288
|
+
|
|
289
|
+
struct SoftRay {
|
|
290
|
+
SoftVec3 origin{0.0, 0.0, 0.0};
|
|
291
|
+
SoftVec3 direction{0.0, 0.0, 1.0};
|
|
292
|
+
double maxDistance = 1e30;
|
|
293
|
+
double radius = 0.0;
|
|
294
|
+
std::uint32_t mask = 0xffffffff;
|
|
295
|
+
|
|
296
|
+
constexpr bool operator==(const SoftRay& other) const = default;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
struct SoftRayHit {
|
|
300
|
+
bool hit = false;
|
|
301
|
+
double distance = 0.0;
|
|
302
|
+
SoftVec3 point{0.0, 0.0, 0.0};
|
|
303
|
+
SoftVec3 normal{0.0, 1.0, 0.0};
|
|
304
|
+
std::uint32_t softBodyId = 0;
|
|
305
|
+
std::uint32_t elementIndex = 0;
|
|
306
|
+
SoftPrimitiveKind primitiveKind = SoftPrimitiveKind::Node;
|
|
307
|
+
|
|
308
|
+
constexpr bool operator==(const SoftRayHit& other) const = default;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
struct SoftOverlapSphereQuery {
|
|
312
|
+
SoftVec3 center{0.0, 0.0, 0.0};
|
|
313
|
+
double radius = 0.5;
|
|
314
|
+
std::uint32_t mask = 0xffffffff;
|
|
315
|
+
std::uint32_t maxHits = 64;
|
|
316
|
+
|
|
317
|
+
constexpr bool operator==(const SoftOverlapSphereQuery& other) const = default;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
struct SoftOverlapHit {
|
|
321
|
+
std::uint32_t softBodyId = 0;
|
|
322
|
+
std::uint32_t nodeIndex = 0;
|
|
323
|
+
SoftVec3 point{0.0, 0.0, 0.0};
|
|
324
|
+
double distance = 0.0;
|
|
325
|
+
|
|
326
|
+
constexpr bool operator==(const SoftOverlapHit& other) const = default;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
struct SoftClosestPointQuery {
|
|
330
|
+
SoftVec3 point{0.0, 0.0, 0.0};
|
|
331
|
+
double maxDistance = 1e30;
|
|
332
|
+
std::uint32_t mask = 0xffffffff;
|
|
333
|
+
|
|
334
|
+
constexpr bool operator==(const SoftClosestPointQuery& other) const = default;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
struct SoftClosestPointResult {
|
|
338
|
+
bool found = false;
|
|
339
|
+
double distance = 0.0;
|
|
340
|
+
SoftVec3 closestPoint{0.0, 0.0, 0.0};
|
|
341
|
+
SoftVec3 normal{0.0, 1.0, 0.0};
|
|
342
|
+
std::uint32_t softBodyId = 0;
|
|
343
|
+
std::uint32_t elementIndex = 0;
|
|
344
|
+
|
|
345
|
+
constexpr bool operator==(const SoftClosestPointResult& other) const = default;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// ---------------------------------------------------------------------------
|
|
349
|
+
// High-Level C++ API (deterministic, zero allocation in step path)
|
|
350
|
+
// ---------------------------------------------------------------------------
|
|
351
|
+
|
|
352
|
+
SoftCollisionStatus solveSoftRigid(
|
|
353
|
+
std::span<SoftNode> nodes,
|
|
354
|
+
std::span<const SoftBodyDef> bodyDefs,
|
|
355
|
+
std::span<Body> rigidBodies,
|
|
356
|
+
const SoftCollisionParams& params,
|
|
357
|
+
double dt,
|
|
358
|
+
std::span<SoftRigidContact> outContacts,
|
|
359
|
+
std::uint32_t& outContactCount,
|
|
360
|
+
std::span<SoftSensorEvent> outSensorEvents,
|
|
361
|
+
std::uint32_t& outSensorEventCount);
|
|
362
|
+
|
|
363
|
+
SoftCollisionStatus solveSoftSoft(
|
|
364
|
+
std::span<SoftNode> nodes,
|
|
365
|
+
std::span<const SoftFace> faces,
|
|
366
|
+
std::span<const SoftBodyDef> bodyDefs,
|
|
367
|
+
std::span<const SoftExclusionPair> exclusions,
|
|
368
|
+
const SoftCollisionParams& params,
|
|
369
|
+
double dt,
|
|
370
|
+
std::span<SoftSoftContact> outContacts,
|
|
371
|
+
std::uint32_t& outContactCount,
|
|
372
|
+
std::span<SoftSensorEvent> outSensorEvents,
|
|
373
|
+
std::uint32_t& outSensorEventCount);
|
|
374
|
+
|
|
375
|
+
SoftCollisionStatus stepSoftCollision(
|
|
376
|
+
std::span<SoftNode> nodes,
|
|
377
|
+
std::span<const SoftFace> faces,
|
|
378
|
+
std::span<const SoftBodyDef> bodyDefs,
|
|
379
|
+
std::span<const SoftExclusionPair> exclusions,
|
|
380
|
+
std::span<Body> rigidBodies,
|
|
381
|
+
const SoftCollisionParams& params,
|
|
382
|
+
double dt,
|
|
383
|
+
std::span<SoftRigidContact> outRigidContacts,
|
|
384
|
+
std::uint32_t& outRigidContactCount,
|
|
385
|
+
std::span<SoftSoftContact> outSoftContacts,
|
|
386
|
+
std::uint32_t& outSoftContactCount,
|
|
387
|
+
std::span<SoftSensorEvent> outSensorEvents,
|
|
388
|
+
std::uint32_t& outSensorEventCount);
|
|
389
|
+
|
|
390
|
+
SoftRayHit querySoftRaycast(
|
|
391
|
+
std::span<const SoftNode> nodes,
|
|
392
|
+
std::span<const SoftFace> faces,
|
|
393
|
+
std::span<const SoftBodyDef> bodyDefs,
|
|
394
|
+
const SoftRay& ray);
|
|
395
|
+
|
|
396
|
+
std::uint32_t querySoftOverlapSphere(
|
|
397
|
+
std::span<const SoftNode> nodes,
|
|
398
|
+
std::span<const SoftBodyDef> bodyDefs,
|
|
399
|
+
const SoftOverlapSphereQuery& query,
|
|
400
|
+
std::span<SoftOverlapHit> outHits);
|
|
401
|
+
|
|
402
|
+
std::uint32_t querySoftOverlapAABB(
|
|
403
|
+
std::span<const SoftNode> nodes,
|
|
404
|
+
std::span<const SoftBodyDef> bodyDefs,
|
|
405
|
+
const SoftVec3& minBounds,
|
|
406
|
+
const SoftVec3& maxBounds,
|
|
407
|
+
std::uint32_t mask,
|
|
408
|
+
std::span<std::uint32_t> outNodeIndices);
|
|
409
|
+
|
|
410
|
+
SoftClosestPointResult querySoftClosestPoint(
|
|
411
|
+
std::span<const SoftNode> nodes,
|
|
412
|
+
std::span<const SoftFace> faces,
|
|
413
|
+
std::span<const SoftBodyDef> bodyDefs,
|
|
414
|
+
const SoftClosestPointQuery& query);
|
|
415
|
+
|
|
416
|
+
// Geometry utilities
|
|
417
|
+
SoftVec3 closestPointOnTriangle(
|
|
418
|
+
const SoftVec3& p,
|
|
419
|
+
const SoftVec3& a,
|
|
420
|
+
const SoftVec3& b,
|
|
421
|
+
const SoftVec3& c,
|
|
422
|
+
double& outU,
|
|
423
|
+
double& outV,
|
|
424
|
+
double& outW);
|
|
425
|
+
|
|
426
|
+
SoftVec3 closestPointOnSegment(
|
|
427
|
+
const SoftVec3& p,
|
|
428
|
+
const SoftVec3& a,
|
|
429
|
+
const SoftVec3& b,
|
|
430
|
+
double& outT);
|
|
431
|
+
|
|
432
|
+
} // namespace rundot::kinetix::physics
|
|
433
|
+
|
|
434
|
+
// ---------------------------------------------------------------------------
|
|
435
|
+
// C ABI Export Declarations
|
|
436
|
+
// ---------------------------------------------------------------------------
|
|
437
|
+
|
|
438
|
+
extern "C" {
|
|
439
|
+
|
|
440
|
+
std::uint32_t rundot_kinetix_ext_soft_collision_abi_version();
|
|
441
|
+
std::uint32_t rundot_kinetix_ext_soft_node_stride();
|
|
442
|
+
std::uint32_t rundot_kinetix_ext_soft_face_stride();
|
|
443
|
+
std::uint32_t rundot_kinetix_ext_soft_body_stride();
|
|
444
|
+
std::uint32_t rundot_kinetix_ext_soft_params_stride();
|
|
445
|
+
std::uint32_t rundot_kinetix_ext_soft_rigid_contact_stride();
|
|
446
|
+
std::uint32_t rundot_kinetix_ext_soft_soft_contact_stride();
|
|
447
|
+
std::uint32_t rundot_kinetix_ext_soft_sensor_event_stride();
|
|
448
|
+
std::uint32_t rundot_kinetix_ext_soft_raycast_query_stride();
|
|
449
|
+
std::uint32_t rundot_kinetix_ext_soft_raycast_hit_stride();
|
|
450
|
+
std::uint32_t rundot_kinetix_ext_soft_overlap_query_stride();
|
|
451
|
+
std::uint32_t rundot_kinetix_ext_soft_overlap_hit_stride();
|
|
452
|
+
std::uint32_t rundot_kinetix_ext_soft_closest_point_query_stride();
|
|
453
|
+
std::uint32_t rundot_kinetix_ext_soft_closest_point_result_stride();
|
|
454
|
+
|
|
455
|
+
std::uint32_t rundot_kinetix_ext_soft_max_nodes();
|
|
456
|
+
std::uint32_t rundot_kinetix_ext_soft_max_faces();
|
|
457
|
+
std::uint32_t rundot_kinetix_ext_soft_max_bodies();
|
|
458
|
+
std::uint32_t rundot_kinetix_ext_soft_max_contacts();
|
|
459
|
+
std::uint32_t rundot_kinetix_ext_soft_max_sensor_events();
|
|
460
|
+
std::uint32_t rundot_kinetix_ext_soft_max_exclusions();
|
|
461
|
+
|
|
462
|
+
std::int32_t rundot_kinetix_ext_soft_rigid_solve(
|
|
463
|
+
double* nodeData,
|
|
464
|
+
std::uint32_t nodeCount,
|
|
465
|
+
const double* bodyDefData,
|
|
466
|
+
std::uint32_t bodyDefCount,
|
|
467
|
+
double* rigidBodyData,
|
|
468
|
+
std::uint32_t rigidBodyCount,
|
|
469
|
+
const double* paramsData,
|
|
470
|
+
double dt,
|
|
471
|
+
double* outContactData,
|
|
472
|
+
std::uint32_t maxContacts,
|
|
473
|
+
std::uint32_t* outContactCount,
|
|
474
|
+
double* outSensorEventData,
|
|
475
|
+
std::uint32_t maxSensorEvents,
|
|
476
|
+
std::uint32_t* outSensorEventCount);
|
|
477
|
+
|
|
478
|
+
std::int32_t rundot_kinetix_ext_soft_soft_solve(
|
|
479
|
+
double* nodeData,
|
|
480
|
+
std::uint32_t nodeCount,
|
|
481
|
+
const double* faceData,
|
|
482
|
+
std::uint32_t faceCount,
|
|
483
|
+
const double* bodyDefData,
|
|
484
|
+
std::uint32_t bodyDefCount,
|
|
485
|
+
const std::uint32_t* exclusionData,
|
|
486
|
+
std::uint32_t exclusionCount,
|
|
487
|
+
const double* paramsData,
|
|
488
|
+
double dt,
|
|
489
|
+
double* outContactData,
|
|
490
|
+
std::uint32_t maxContacts,
|
|
491
|
+
std::uint32_t* outContactCount,
|
|
492
|
+
double* outSensorEventData,
|
|
493
|
+
std::uint32_t maxSensorEvents,
|
|
494
|
+
std::uint32_t* outSensorEventCount);
|
|
495
|
+
|
|
496
|
+
std::int32_t rundot_kinetix_ext_soft_step(
|
|
497
|
+
double* nodeData,
|
|
498
|
+
std::uint32_t nodeCount,
|
|
499
|
+
const double* faceData,
|
|
500
|
+
std::uint32_t faceCount,
|
|
501
|
+
const double* bodyDefData,
|
|
502
|
+
std::uint32_t bodyDefCount,
|
|
503
|
+
const std::uint32_t* exclusionData,
|
|
504
|
+
std::uint32_t exclusionCount,
|
|
505
|
+
double* rigidBodyData,
|
|
506
|
+
std::uint32_t rigidBodyCount,
|
|
507
|
+
const double* paramsData,
|
|
508
|
+
double dt,
|
|
509
|
+
double* outRigidContacts,
|
|
510
|
+
std::uint32_t maxRigidContacts,
|
|
511
|
+
std::uint32_t* outRigidContactCount,
|
|
512
|
+
double* outSoftContacts,
|
|
513
|
+
std::uint32_t maxSoftContacts,
|
|
514
|
+
std::uint32_t* outSoftContactCount,
|
|
515
|
+
double* outSensorEvents,
|
|
516
|
+
std::uint32_t maxSensorEvents,
|
|
517
|
+
std::uint32_t* outSensorEventCount);
|
|
518
|
+
|
|
519
|
+
std::int32_t rundot_kinetix_ext_soft_raycast(
|
|
520
|
+
const double* nodeData,
|
|
521
|
+
std::uint32_t nodeCount,
|
|
522
|
+
const double* faceData,
|
|
523
|
+
std::uint32_t faceCount,
|
|
524
|
+
const double* bodyDefData,
|
|
525
|
+
std::uint32_t bodyDefCount,
|
|
526
|
+
const double* rayData,
|
|
527
|
+
double* outHitData);
|
|
528
|
+
|
|
529
|
+
std::int32_t rundot_kinetix_ext_soft_overlap_sphere(
|
|
530
|
+
const double* nodeData,
|
|
531
|
+
std::uint32_t nodeCount,
|
|
532
|
+
const double* bodyDefData,
|
|
533
|
+
std::uint32_t bodyDefCount,
|
|
534
|
+
const double* queryData,
|
|
535
|
+
double* outHitData,
|
|
536
|
+
std::uint32_t maxHits,
|
|
537
|
+
std::uint32_t* outHitCount);
|
|
538
|
+
|
|
539
|
+
std::int32_t rundot_kinetix_ext_soft_overlap_aabb(
|
|
540
|
+
const double* nodeData,
|
|
541
|
+
std::uint32_t nodeCount,
|
|
542
|
+
const double* bodyDefData,
|
|
543
|
+
std::uint32_t bodyDefCount,
|
|
544
|
+
const double* minBoundsData,
|
|
545
|
+
const double* maxBoundsData,
|
|
546
|
+
std::uint32_t mask,
|
|
547
|
+
std::uint32_t* outNodeIndices,
|
|
548
|
+
std::uint32_t maxIndices,
|
|
549
|
+
std::uint32_t* outIndexCount);
|
|
550
|
+
|
|
551
|
+
std::int32_t rundot_kinetix_ext_soft_closest_point(
|
|
552
|
+
const double* nodeData,
|
|
553
|
+
std::uint32_t nodeCount,
|
|
554
|
+
const double* faceData,
|
|
555
|
+
std::uint32_t faceCount,
|
|
556
|
+
const double* bodyDefData,
|
|
557
|
+
std::uint32_t bodyDefCount,
|
|
558
|
+
const double* queryData,
|
|
559
|
+
double* outResultData);
|
|
560
|
+
|
|
561
|
+
}
|