21 lines
494 B
Rust
21 lines
494 B
Rust
//! This module provides a physics-based simulation of one system.
|
|
|
|
pub mod objects;
|
|
pub mod physimage;
|
|
mod physsim;
|
|
mod physwrapper;
|
|
mod stepresources;
|
|
|
|
use std::sync::atomic::{AtomicU64, Ordering};
|
|
|
|
pub use physimage::*;
|
|
pub use physsim::{PhysSim, PhysSimShipHandle};
|
|
pub use physwrapper::PhysWrapper;
|
|
pub use stepresources::*;
|
|
|
|
/// A unique id given to each physics object
|
|
static PHYS_UID: AtomicU64 = AtomicU64::new(0);
|
|
fn get_phys_id() -> u64 {
|
|
PHYS_UID.fetch_add(1, Ordering::Relaxed)
|
|
}
|