@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,449 @@
|
|
|
1
|
+
#include "mass_properties.hpp"
|
|
2
|
+
|
|
3
|
+
#include <algorithm>
|
|
4
|
+
#include <array>
|
|
5
|
+
#include <cmath>
|
|
6
|
+
#include <cstdint>
|
|
7
|
+
#include <limits>
|
|
8
|
+
#include <vector>
|
|
9
|
+
|
|
10
|
+
namespace {
|
|
11
|
+
|
|
12
|
+
constexpr std::uint32_t kShapeStride = 12;
|
|
13
|
+
constexpr std::uint32_t kOutputStride = 10;
|
|
14
|
+
constexpr double kPi = 3.14159265358979323846;
|
|
15
|
+
|
|
16
|
+
struct Vec3 {
|
|
17
|
+
double x = 0;
|
|
18
|
+
double y = 0;
|
|
19
|
+
double z = 0;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
struct Matrix {
|
|
23
|
+
double xx = 0;
|
|
24
|
+
double yy = 0;
|
|
25
|
+
double zz = 0;
|
|
26
|
+
double xy = 0;
|
|
27
|
+
double xz = 0;
|
|
28
|
+
double yz = 0;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
struct Properties {
|
|
32
|
+
double volume = 0;
|
|
33
|
+
Vec3 center{};
|
|
34
|
+
Matrix inertia{};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
Vec3 subtract(Vec3 left, Vec3 right) {
|
|
38
|
+
return {left.x - right.x, left.y - right.y, left.z - right.z};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
Vec3 scale(Vec3 value, double factor) {
|
|
42
|
+
return {value.x * factor, value.y * factor, value.z * factor};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
double dot(Vec3 left, Vec3 right) {
|
|
46
|
+
return left.x * right.x + left.y * right.y + left.z * right.z;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Vec3 cross(Vec3 left, Vec3 right) {
|
|
50
|
+
return {
|
|
51
|
+
left.y * right.z - left.z * right.y,
|
|
52
|
+
left.z * right.x - left.x * right.z,
|
|
53
|
+
left.x * right.y - left.y * right.x,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
bool lexicographicLess(Vec3 left, Vec3 right) {
|
|
58
|
+
if (left.x != right.x) return left.x < right.x;
|
|
59
|
+
if (left.y != right.y) return left.y < right.y;
|
|
60
|
+
return left.z < right.z;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
Matrix scaleMatrix(Matrix value, double factor) {
|
|
64
|
+
return {
|
|
65
|
+
value.xx * factor, value.yy * factor, value.zz * factor,
|
|
66
|
+
value.xy * factor, value.xz * factor, value.yz * factor,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
Matrix addParallelAxis(Matrix value, double mass, Vec3 offset) {
|
|
71
|
+
value.xx += mass * (offset.y * offset.y + offset.z * offset.z);
|
|
72
|
+
value.yy += mass * (offset.x * offset.x + offset.z * offset.z);
|
|
73
|
+
value.zz += mass * (offset.x * offset.x + offset.y * offset.y);
|
|
74
|
+
value.xy -= mass * offset.x * offset.y;
|
|
75
|
+
value.xz -= mass * offset.x * offset.z;
|
|
76
|
+
value.yz -= mass * offset.y * offset.z;
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
Properties boundsProperties(const std::vector<Vec3>& points) {
|
|
81
|
+
if (points.empty()) return {};
|
|
82
|
+
Vec3 minimum{
|
|
83
|
+
std::numeric_limits<double>::infinity(),
|
|
84
|
+
std::numeric_limits<double>::infinity(),
|
|
85
|
+
std::numeric_limits<double>::infinity(),
|
|
86
|
+
};
|
|
87
|
+
Vec3 maximum{-minimum.x, -minimum.y, -minimum.z};
|
|
88
|
+
for (const Vec3 point : points) {
|
|
89
|
+
minimum.x = std::min(minimum.x, point.x);
|
|
90
|
+
minimum.y = std::min(minimum.y, point.y);
|
|
91
|
+
minimum.z = std::min(minimum.z, point.z);
|
|
92
|
+
maximum.x = std::max(maximum.x, point.x);
|
|
93
|
+
maximum.y = std::max(maximum.y, point.y);
|
|
94
|
+
maximum.z = std::max(maximum.z, point.z);
|
|
95
|
+
}
|
|
96
|
+
const Vec3 size = subtract(maximum, minimum);
|
|
97
|
+
const double volume = std::max(
|
|
98
|
+
size.x * size.y * size.z, std::numeric_limits<double>::denorm_min());
|
|
99
|
+
return {
|
|
100
|
+
volume,
|
|
101
|
+
scale({minimum.x + maximum.x, minimum.y + maximum.y, minimum.z + maximum.z}, 0.5),
|
|
102
|
+
{
|
|
103
|
+
volume * (size.y * size.y + size.z * size.z) / 12,
|
|
104
|
+
volume * (size.x * size.x + size.z * size.z) / 12,
|
|
105
|
+
volume * (size.x * size.x + size.y * size.y) / 12,
|
|
106
|
+
0, 0, 0,
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
struct Face {
|
|
112
|
+
Vec3 normal{};
|
|
113
|
+
double offset = 0;
|
|
114
|
+
std::vector<std::size_t> vertices;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
Vec3 orthonormalAny(Vec3 normal) {
|
|
118
|
+
const double ax = std::abs(normal.x);
|
|
119
|
+
const double ay = std::abs(normal.y);
|
|
120
|
+
const double az = std::abs(normal.z);
|
|
121
|
+
const Vec3 reference = ax <= ay && ax <= az
|
|
122
|
+
? Vec3{1, 0, 0} : ay <= az ? Vec3{0, 1, 0} : Vec3{0, 0, 1};
|
|
123
|
+
const Vec3 projected = subtract(reference, scale(normal, dot(reference, normal)));
|
|
124
|
+
const double length = std::sqrt(dot(projected, projected));
|
|
125
|
+
return length > 1e-12 ? scale(projected, 1 / length) : Vec3{1, 0, 0};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
Properties hullProperties(std::vector<Vec3> vertices) {
|
|
129
|
+
std::sort(vertices.begin(), vertices.end(), lexicographicLess);
|
|
130
|
+
vertices.erase(std::unique(vertices.begin(), vertices.end(), [](Vec3 left, Vec3 right) {
|
|
131
|
+
const Vec3 delta = subtract(left, right);
|
|
132
|
+
return dot(delta, delta) <= 1e-12;
|
|
133
|
+
}), vertices.end());
|
|
134
|
+
if (vertices.size() < 4 || vertices.size() > 16) return boundsProperties(vertices);
|
|
135
|
+
|
|
136
|
+
Vec3 centroid{};
|
|
137
|
+
for (const Vec3 value : vertices) {
|
|
138
|
+
centroid.x += value.x;
|
|
139
|
+
centroid.y += value.y;
|
|
140
|
+
centroid.z += value.z;
|
|
141
|
+
}
|
|
142
|
+
centroid = scale(centroid, 1 / static_cast<double>(vertices.size()));
|
|
143
|
+
std::vector<Face> faces;
|
|
144
|
+
for (std::size_t i = 0; i < vertices.size(); ++i) {
|
|
145
|
+
for (std::size_t j = i + 1; j < vertices.size(); ++j) {
|
|
146
|
+
for (std::size_t k = j + 1; k < vertices.size(); ++k) {
|
|
147
|
+
Vec3 normal = cross(subtract(vertices[j], vertices[i]), subtract(vertices[k], vertices[i]));
|
|
148
|
+
const double length = std::sqrt(dot(normal, normal));
|
|
149
|
+
if (length < 1e-9) continue;
|
|
150
|
+
normal = scale(normal, 1 / length);
|
|
151
|
+
double planeOffset = dot(normal, vertices[i]);
|
|
152
|
+
if (dot(normal, centroid) > planeOffset) {
|
|
153
|
+
normal = scale(normal, -1);
|
|
154
|
+
planeOffset = -planeOffset;
|
|
155
|
+
}
|
|
156
|
+
std::vector<std::size_t> onPlane;
|
|
157
|
+
bool supporting = true;
|
|
158
|
+
for (std::size_t index = 0; index < vertices.size(); ++index) {
|
|
159
|
+
const double distance = dot(normal, vertices[index]) - planeOffset;
|
|
160
|
+
if (distance > 1e-9) {
|
|
161
|
+
supporting = false;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
if (distance >= -1e-9) onPlane.push_back(index);
|
|
165
|
+
}
|
|
166
|
+
if (!supporting || onPlane.size() < 3) continue;
|
|
167
|
+
const bool duplicate = std::any_of(faces.begin(), faces.end(), [&](const Face& face) {
|
|
168
|
+
return std::abs(face.normal.x - normal.x) <= 1e-6
|
|
169
|
+
&& std::abs(face.normal.y - normal.y) <= 1e-6
|
|
170
|
+
&& std::abs(face.normal.z - normal.z) <= 1e-6
|
|
171
|
+
&& std::abs(face.offset - planeOffset) <= 1e-6;
|
|
172
|
+
});
|
|
173
|
+
if (!duplicate) faces.push_back({normal, planeOffset, std::move(onPlane)});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (faces.size() < 4) return boundsProperties(vertices);
|
|
178
|
+
for (Face& face : faces) {
|
|
179
|
+
Vec3 center{};
|
|
180
|
+
for (const std::size_t index : face.vertices) {
|
|
181
|
+
center.x += vertices[index].x;
|
|
182
|
+
center.y += vertices[index].y;
|
|
183
|
+
center.z += vertices[index].z;
|
|
184
|
+
}
|
|
185
|
+
center = scale(center, 1 / static_cast<double>(face.vertices.size()));
|
|
186
|
+
Vec3 tangent = subtract(vertices[face.vertices[0]], center);
|
|
187
|
+
const double tangentLength = std::sqrt(dot(tangent, tangent));
|
|
188
|
+
tangent = tangentLength > 1e-12 ? scale(tangent, 1 / tangentLength) : orthonormalAny(face.normal);
|
|
189
|
+
const Vec3 bitangent = cross(face.normal, tangent);
|
|
190
|
+
std::sort(face.vertices.begin(), face.vertices.end(), [&](std::size_t left, std::size_t right) {
|
|
191
|
+
const Vec3 leftDirection = subtract(vertices[left], center);
|
|
192
|
+
const Vec3 rightDirection = subtract(vertices[right], center);
|
|
193
|
+
const int leftHalf = dot(leftDirection, bitangent) >= 0 ? 0 : 1;
|
|
194
|
+
const int rightHalf = dot(rightDirection, bitangent) >= 0 ? 0 : 1;
|
|
195
|
+
if (leftHalf != rightHalf) return leftHalf < rightHalf;
|
|
196
|
+
const double turn = dot(cross(leftDirection, rightDirection), face.normal);
|
|
197
|
+
if (std::abs(turn) > 1e-6) return turn > 0;
|
|
198
|
+
return left < right;
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
std::sort(faces.begin(), faces.end(), [](const Face& left, const Face& right) {
|
|
202
|
+
if (lexicographicLess(left.normal, right.normal)) return true;
|
|
203
|
+
if (lexicographicLess(right.normal, left.normal)) return false;
|
|
204
|
+
return left.offset < right.offset;
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
double volume = 0;
|
|
208
|
+
Vec3 first{};
|
|
209
|
+
double xx = 0, yy = 0, zz = 0, xy = 0, xz = 0, yz = 0;
|
|
210
|
+
auto squareIntegral = [](Vec3 a, Vec3 b, Vec3 c, int component) {
|
|
211
|
+
const std::array<double, 3> av{a.x, a.y, a.z};
|
|
212
|
+
const std::array<double, 3> bv{b.x, b.y, b.z};
|
|
213
|
+
const std::array<double, 3> cv{c.x, c.y, c.z};
|
|
214
|
+
return av[component] * av[component] + bv[component] * bv[component]
|
|
215
|
+
+ cv[component] * cv[component] + av[component] * bv[component]
|
|
216
|
+
+ av[component] * cv[component] + bv[component] * cv[component];
|
|
217
|
+
};
|
|
218
|
+
auto productIntegral = [](Vec3 a, Vec3 b, Vec3 c, int firstComponent, int secondComponent) {
|
|
219
|
+
const std::array<std::array<double, 3>, 3> values{{
|
|
220
|
+
{a.x, a.y, a.z}, {b.x, b.y, b.z}, {c.x, c.y, c.z},
|
|
221
|
+
}};
|
|
222
|
+
double result = 0;
|
|
223
|
+
for (const auto& value : values) result += 2 * value[firstComponent] * value[secondComponent];
|
|
224
|
+
for (int i = 0; i < 3; ++i) for (int j = i + 1; j < 3; ++j) {
|
|
225
|
+
result += values[i][firstComponent] * values[j][secondComponent]
|
|
226
|
+
+ values[i][secondComponent] * values[j][firstComponent];
|
|
227
|
+
}
|
|
228
|
+
return result;
|
|
229
|
+
};
|
|
230
|
+
for (const Face& face : faces) {
|
|
231
|
+
const Vec3 a = vertices[face.vertices[0]];
|
|
232
|
+
for (std::size_t index = 1; index + 1 < face.vertices.size(); ++index) {
|
|
233
|
+
const Vec3 b = vertices[face.vertices[index]];
|
|
234
|
+
const Vec3 c = vertices[face.vertices[index + 1]];
|
|
235
|
+
const double tetrahedron = dot(a, cross(b, c)) / 6;
|
|
236
|
+
volume += tetrahedron;
|
|
237
|
+
first.x += tetrahedron * (a.x + b.x + c.x) / 4;
|
|
238
|
+
first.y += tetrahedron * (a.y + b.y + c.y) / 4;
|
|
239
|
+
first.z += tetrahedron * (a.z + b.z + c.z) / 4;
|
|
240
|
+
xx += tetrahedron * squareIntegral(a, b, c, 0) / 10;
|
|
241
|
+
yy += tetrahedron * squareIntegral(a, b, c, 1) / 10;
|
|
242
|
+
zz += tetrahedron * squareIntegral(a, b, c, 2) / 10;
|
|
243
|
+
xy += tetrahedron * productIntegral(a, b, c, 0, 1) / 20;
|
|
244
|
+
xz += tetrahedron * productIntegral(a, b, c, 0, 2) / 20;
|
|
245
|
+
yz += tetrahedron * productIntegral(a, b, c, 1, 2) / 20;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if (!std::isfinite(volume) || std::abs(volume) <= 1e-12) return boundsProperties(vertices);
|
|
249
|
+
const double sign = volume < 0 ? -1 : 1;
|
|
250
|
+
volume *= sign;
|
|
251
|
+
first = scale(first, sign / volume);
|
|
252
|
+
xx *= sign;
|
|
253
|
+
yy *= sign;
|
|
254
|
+
zz *= sign;
|
|
255
|
+
xy *= sign;
|
|
256
|
+
xz *= sign;
|
|
257
|
+
yz *= sign;
|
|
258
|
+
return {
|
|
259
|
+
volume,
|
|
260
|
+
first,
|
|
261
|
+
{
|
|
262
|
+
yy + zz - volume * (first.y * first.y + first.z * first.z),
|
|
263
|
+
xx + zz - volume * (first.x * first.x + first.z * first.z),
|
|
264
|
+
xx + yy - volume * (first.x * first.x + first.y * first.y),
|
|
265
|
+
-xy + volume * first.x * first.y,
|
|
266
|
+
-xz + volume * first.x * first.z,
|
|
267
|
+
-yz + volume * first.y * first.z,
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
Properties computeShape(
|
|
273
|
+
const double* shapes,
|
|
274
|
+
std::uint32_t shapeCount,
|
|
275
|
+
const double* geometry,
|
|
276
|
+
std::uint32_t geometryCount,
|
|
277
|
+
std::uint32_t index) {
|
|
278
|
+
const double* shape = shapes + index * kShapeStride;
|
|
279
|
+
const std::uint32_t kind = static_cast<std::uint32_t>(shape[0]);
|
|
280
|
+
const Vec3 size{shape[1], shape[2], shape[3]};
|
|
281
|
+
if (kind == 0) {
|
|
282
|
+
const double volume = 8 * size.x * size.y * size.z;
|
|
283
|
+
return {volume, {}, {
|
|
284
|
+
volume * (size.y * size.y + size.z * size.z) / 3,
|
|
285
|
+
volume * (size.x * size.x + size.z * size.z) / 3,
|
|
286
|
+
volume * (size.x * size.x + size.y * size.y) / 3, 0, 0, 0,
|
|
287
|
+
}};
|
|
288
|
+
}
|
|
289
|
+
if (kind == 1) {
|
|
290
|
+
const double volume = 4 * kPi * size.x * size.x * size.x / 3;
|
|
291
|
+
const double inertia = 2 * volume * size.x * size.x / 5;
|
|
292
|
+
return {volume, {}, {inertia, inertia, inertia, 0, 0, 0}};
|
|
293
|
+
}
|
|
294
|
+
if (kind == 2) {
|
|
295
|
+
const double height = 2 * size.y;
|
|
296
|
+
const double volume = kPi * size.x * size.x * height
|
|
297
|
+
+ 4 * kPi * size.x * size.x * size.x / 3;
|
|
298
|
+
return {volume, {}, {
|
|
299
|
+
volume * (3 * size.x * size.x + height * height) / 12,
|
|
300
|
+
0.5 * volume * size.x * size.x,
|
|
301
|
+
volume * (3 * size.x * size.x + height * height) / 12, 0, 0, 0,
|
|
302
|
+
}};
|
|
303
|
+
}
|
|
304
|
+
if (kind == 3 || kind == 4 || kind == 6) {
|
|
305
|
+
const std::uint32_t offset = static_cast<std::uint32_t>(shape[4]);
|
|
306
|
+
const std::uint32_t count = static_cast<std::uint32_t>(shape[5]);
|
|
307
|
+
if (offset + count * 3 > geometryCount) return {};
|
|
308
|
+
std::vector<Vec3> points;
|
|
309
|
+
points.reserve(count);
|
|
310
|
+
for (std::uint32_t point = 0; point < count; ++point) {
|
|
311
|
+
const std::uint32_t base = offset + point * 3;
|
|
312
|
+
points.push_back({geometry[base], geometry[base + 1], geometry[base + 2]});
|
|
313
|
+
}
|
|
314
|
+
return kind == 3 ? hullProperties(std::move(points)) : boundsProperties(points);
|
|
315
|
+
}
|
|
316
|
+
if (kind != 5) return {};
|
|
317
|
+
struct Child { double mass; Vec3 center; Matrix inertia; };
|
|
318
|
+
std::vector<Child> children;
|
|
319
|
+
double totalMass = 0;
|
|
320
|
+
Vec3 weightedCenter{};
|
|
321
|
+
for (std::uint32_t child = 0; child < shapeCount; ++child) {
|
|
322
|
+
const double* childShape = shapes + child * kShapeStride;
|
|
323
|
+
if (static_cast<std::int32_t>(childShape[6]) != static_cast<std::int32_t>(index)) continue;
|
|
324
|
+
const Properties value = computeShape(shapes, shapeCount, geometry, geometryCount, child);
|
|
325
|
+
const Vec3 center{
|
|
326
|
+
value.center.x + childShape[7],
|
|
327
|
+
value.center.y + childShape[8],
|
|
328
|
+
value.center.z + childShape[9],
|
|
329
|
+
};
|
|
330
|
+
totalMass += value.volume;
|
|
331
|
+
weightedCenter.x += center.x * value.volume;
|
|
332
|
+
weightedCenter.y += center.y * value.volume;
|
|
333
|
+
weightedCenter.z += center.z * value.volume;
|
|
334
|
+
children.push_back({value.volume, center, value.inertia});
|
|
335
|
+
}
|
|
336
|
+
if (!(totalMass > 0)) return {};
|
|
337
|
+
const Vec3 center = scale(weightedCenter, 1 / totalMass);
|
|
338
|
+
Matrix inertia{};
|
|
339
|
+
for (const Child& child : children) {
|
|
340
|
+
const Matrix shifted = addParallelAxis(child.inertia, child.mass, subtract(child.center, center));
|
|
341
|
+
inertia.xx += shifted.xx;
|
|
342
|
+
inertia.yy += shifted.yy;
|
|
343
|
+
inertia.zz += shifted.zz;
|
|
344
|
+
inertia.xy += shifted.xy;
|
|
345
|
+
inertia.xz += shifted.xz;
|
|
346
|
+
inertia.yz += shifted.yz;
|
|
347
|
+
}
|
|
348
|
+
return {totalMass, center, inertia};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
} // namespace
|
|
352
|
+
|
|
353
|
+
extern "C" {
|
|
354
|
+
|
|
355
|
+
std::uint32_t rundot_kinetix_ext_mass_properties_abi_version() { return 1; }
|
|
356
|
+
std::uint32_t rundot_kinetix_ext_mass_properties_shape_stride() { return kShapeStride; }
|
|
357
|
+
std::uint32_t rundot_kinetix_ext_mass_properties_output_stride() { return kOutputStride; }
|
|
358
|
+
|
|
359
|
+
std::int32_t rundot_kinetix_ext_mass_properties_compute(
|
|
360
|
+
const double* shapeData,
|
|
361
|
+
std::uint32_t shapeCount,
|
|
362
|
+
const double* geometryData,
|
|
363
|
+
std::uint32_t geometryCount,
|
|
364
|
+
double mass,
|
|
365
|
+
double* outputData) {
|
|
366
|
+
if (shapeData == nullptr || shapeCount == 0 || geometryData == nullptr
|
|
367
|
+
|| outputData == nullptr || !std::isfinite(mass) || !(mass > 0)) return -1;
|
|
368
|
+
const Properties base = computeShape(shapeData, shapeCount, geometryData, geometryCount, 0);
|
|
369
|
+
if (!std::isfinite(base.volume) || !(base.volume > 0)) return -2;
|
|
370
|
+
const Matrix inertia = scaleMatrix(base.inertia, mass / base.volume);
|
|
371
|
+
outputData[0] = mass;
|
|
372
|
+
outputData[1] = base.center.x;
|
|
373
|
+
outputData[2] = base.center.y;
|
|
374
|
+
outputData[3] = base.center.z;
|
|
375
|
+
outputData[4] = inertia.xx;
|
|
376
|
+
outputData[5] = inertia.yy;
|
|
377
|
+
outputData[6] = inertia.zz;
|
|
378
|
+
outputData[7] = inertia.xy;
|
|
379
|
+
outputData[8] = inertia.xz;
|
|
380
|
+
outputData[9] = inertia.yz;
|
|
381
|
+
return 0;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
std::int32_t rundot_kinetix_ext_mass_properties_diagonalize(
|
|
385
|
+
const double* matrixData,
|
|
386
|
+
double* outputData) {
|
|
387
|
+
if (matrixData == nullptr || outputData == nullptr) return -1;
|
|
388
|
+
double values[3][3] = {
|
|
389
|
+
{matrixData[0], matrixData[3], matrixData[4]},
|
|
390
|
+
{matrixData[3], matrixData[1], matrixData[5]},
|
|
391
|
+
{matrixData[4], matrixData[5], matrixData[2]},
|
|
392
|
+
};
|
|
393
|
+
double vectors[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
|
|
394
|
+
for (int iteration = 0; iteration < 24; ++iteration) {
|
|
395
|
+
int p = 0, q = 1;
|
|
396
|
+
if (std::abs(values[0][2]) > std::abs(values[p][q])) { p = 0; q = 2; }
|
|
397
|
+
if (std::abs(values[1][2]) > std::abs(values[p][q])) { p = 1; q = 2; }
|
|
398
|
+
const double offDiagonal = values[p][q];
|
|
399
|
+
if (std::abs(offDiagonal) <= 1e-14) break;
|
|
400
|
+
const double tau = (values[q][q] - values[p][p]) / (2 * offDiagonal);
|
|
401
|
+
const double tangent = (tau < 0 ? -1 : 1) / (std::abs(tau) + std::sqrt(1 + tau * tau));
|
|
402
|
+
const double cosine = 1 / std::sqrt(1 + tangent * tangent);
|
|
403
|
+
const double sine = tangent * cosine;
|
|
404
|
+
const double pp = values[p][p], qq = values[q][q];
|
|
405
|
+
values[p][p] = cosine * cosine * pp - 2 * sine * cosine * offDiagonal + sine * sine * qq;
|
|
406
|
+
values[q][q] = sine * sine * pp + 2 * sine * cosine * offDiagonal + cosine * cosine * qq;
|
|
407
|
+
values[p][q] = values[q][p] = 0;
|
|
408
|
+
for (int index = 0; index < 3; ++index) {
|
|
409
|
+
if (index == p || index == q) continue;
|
|
410
|
+
const double ip = values[index][p], iq = values[index][q];
|
|
411
|
+
values[index][p] = values[p][index] = cosine * ip - sine * iq;
|
|
412
|
+
values[index][q] = values[q][index] = sine * ip + cosine * iq;
|
|
413
|
+
}
|
|
414
|
+
for (int index = 0; index < 3; ++index) {
|
|
415
|
+
const double ip = vectors[index][p], iq = vectors[index][q];
|
|
416
|
+
vectors[index][p] = cosine * ip - sine * iq;
|
|
417
|
+
vectors[index][q] = sine * ip + cosine * iq;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
outputData[0] = values[0][0];
|
|
421
|
+
outputData[1] = values[1][1];
|
|
422
|
+
outputData[2] = values[2][2];
|
|
423
|
+
for (int row = 0; row < 3; ++row) for (int column = 0; column < 3; ++column) {
|
|
424
|
+
outputData[3 + row * 3 + column] = vectors[row][column];
|
|
425
|
+
}
|
|
426
|
+
return 0;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
std::int32_t rundot_kinetix_ext_mass_properties_is_positive_definite(
|
|
430
|
+
const double* matrixData) {
|
|
431
|
+
if (matrixData == nullptr) return 0;
|
|
432
|
+
const double xx = matrixData[0], yy = matrixData[1], zz = matrixData[2];
|
|
433
|
+
const double xy = matrixData[3], xz = matrixData[4], yz = matrixData[5];
|
|
434
|
+
const std::array<double, 6> values{xx, yy, zz, xy, xz, yz};
|
|
435
|
+
if (!std::all_of(values.begin(), values.end(), [](double value) { return std::isfinite(value); })) return 0;
|
|
436
|
+
const double magnitude = *std::max_element(values.begin(), values.end(), [](double left, double right) {
|
|
437
|
+
return std::abs(left) < std::abs(right);
|
|
438
|
+
});
|
|
439
|
+
const double scaleValue = std::abs(magnitude);
|
|
440
|
+
if (!(scaleValue > 0)) return 0;
|
|
441
|
+
const double axx = xx / scaleValue, ayy = yy / scaleValue, azz = zz / scaleValue;
|
|
442
|
+
const double axy = xy / scaleValue, axz = xz / scaleValue, ayz = yz / scaleValue;
|
|
443
|
+
const double minor = axx * ayy - axy * axy;
|
|
444
|
+
const double determinant = axx * (ayy * azz - ayz * ayz)
|
|
445
|
+
- axy * (axy * azz - ayz * axz) + axz * (axy * ayz - ayy * axz);
|
|
446
|
+
return axx > 0 && minor > 0 && determinant > 0 && std::isfinite(determinant) ? 1 : 0;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
} // extern "C"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <cstdint>
|
|
4
|
+
|
|
5
|
+
extern "C" {
|
|
6
|
+
|
|
7
|
+
std::uint32_t rundot_kinetix_ext_mass_properties_abi_version();
|
|
8
|
+
std::uint32_t rundot_kinetix_ext_mass_properties_shape_stride();
|
|
9
|
+
std::uint32_t rundot_kinetix_ext_mass_properties_output_stride();
|
|
10
|
+
std::int32_t rundot_kinetix_ext_mass_properties_compute(
|
|
11
|
+
const double* shapeData,
|
|
12
|
+
std::uint32_t shapeCount,
|
|
13
|
+
const double* geometryData,
|
|
14
|
+
std::uint32_t geometryCount,
|
|
15
|
+
double mass,
|
|
16
|
+
double* outputData);
|
|
17
|
+
std::int32_t rundot_kinetix_ext_mass_properties_diagonalize(
|
|
18
|
+
const double* matrixData,
|
|
19
|
+
double* outputData);
|
|
20
|
+
std::int32_t rundot_kinetix_ext_mass_properties_is_positive_definite(
|
|
21
|
+
const double* matrixData);
|
|
22
|
+
|
|
23
|
+
}
|