|
group2 0.1.0
CSE 125 Group 2
|
Deterministic state-hash for CI golden testing. More...
Go to the source code of this file.
Namespaces | |
| namespace | physics |
| Pure physics math — no ECS types, no registry. | |
| namespace | physics::diag |
Functions | |
| uint64_t | physics::diag::hashPhysicsState (const Registry ®istry) noexcept |
| Compute a deterministic hash of physics-relevant ECS state. | |
Deterministic state-hash for CI golden testing.
Walks every replicated physics component on every entity in a stable (entity-id-sorted) order and folds their bits into a 64-bit FNV-1a hash. Two runs producing the same hash → bit-equal physics state.
Intended use:
Cost. O(entity count) per call, ~50 ns per entity on a typical CPU. Cheap enough to run every frame in dev / debug builds.