Skip to main content

Module determinism

Module determinism 

Source
Expand description

Falling-ragdoll determinism scene helpers from shared/determinism.c.

Builds a grid of ragdolls over mesh grounds and hashes settled transforms. The final EXPECTED_HASH gate in test_determinism.c stays deferred until task-6 lands mesh narrow-phase (bodies currently fall through meshes).

The content hash itself (b3Hash / crate::core::hash) already lives in crate::core; this module adds the world-transform byte layout used by the scene.

SPDX-FileCopyrightText: 2022 Erin Catto SPDX-License-Identifier: MIT

Structs§

FallingRagdollData
Falling-ragdoll scene state. (FallingRagdollData)
RagdollGroup
One cell of ragdolls. (RagdollGroup)

Constants§

RAGDOLL_GRID_COUNT
Grid dimension (NxN cells). (RAGDOLL_GRID_COUNT)
RAGDOLL_GROUP_SIZE
Humans per ground cell. (RAGDOLL_GROUP_SIZE)

Functions§

create_falling_ragdolls
Build mesh grounds and spawn the ragdoll grid. (CreateFallingRagdolls)
destroy_falling_ragdolls
Release owned mesh data. (DestroyFallingRagdolls)
hash_world_transform
Hash a world transform’s raw little-endian field bytes in C declaration order, matching b3Hash(hash, (uint8_t*)&xf, sizeof(b3WorldTransform)) on little-endian hosts. (determinism.c UpdateFallingRagdolls)
update_falling_ragdolls
Advance sleep/hash tracking after a world step. Returns true once settled. (UpdateFallingRagdolls)