braid_sim/lib.rs
1// Copyright (C) The Strand-Braid Authors
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Simulation core for end-to-end testing of Braid's live 3D tracking.
5//!
6//! This crate is the shared simulation core. It provides:
7//!
8//! - [`scenario::Scenario`]: a `sim.toml`-deserializable description of the
9//! simulated world (arena, cameras, insects, blob rendering, frame rate).
10//! - [`world::World`]: a deterministic ground-truth model — insect 3D positions
11//! are a pure function of time, so independent fake-camera processes can each
12//! reconstruct the same world for a given synchronized frame.
13//! - [`calibration::build_calibration`]: generate a synthetic multi-camera
14//! [`flydra_mvg::FlydraMultiCameraSystem`] (and serialize it to the flydra XML
15//! that Braid loads) so the *same* calibration is used to project ground truth
16//! and to reconstruct it.
17//! - [`projection`]: project a 3D point into each camera's distorted pixel, with
18//! field-of-view culling.
19
20#[cfg(feature = "inprocess")]
21pub mod bench;
22pub mod calibration;
23pub mod harness;
24#[cfg(feature = "inprocess")]
25pub mod inject;
26pub mod projection;
27pub mod render;
28pub mod scenario;
29pub mod score;
30pub mod truth;
31pub mod world;
32
33pub use scenario::Scenario;
34pub use world::{InsectState, World};