Add design persistence, world rendering, metrics overlay and logs
M3: STL/OBJ import with mesh validation, mass/COM/inertia, material database, RON scene with content-addressed blobs and v0->v1 migration. M4: deterministic heightmap terrain, trimesh colliders, wgpu renderer with instancing and depth, winit app with 1 kHz physics, fly camera, on-screen metrics overlay and per-frame CSV/dev logs. Docs: UI, logging, network and headless CLI plans.
This commit is contained in:
parent
79928b645b
commit
93075ab1fd
107 changed files with 14785 additions and 46 deletions
|
|
@ -123,6 +123,10 @@ quantity!(/// Acceleration, m/s².
|
|||
MetersPerSecondSquared);
|
||||
quantity!(/// Torque, N·m.
|
||||
NewtonMeters);
|
||||
quantity!(/// Volume, m³.
|
||||
CubicMeters);
|
||||
quantity!(/// Density, kg/m³.
|
||||
KilogramsPerCubicMeter);
|
||||
|
||||
impl Radians {
|
||||
/// Converts degrees to radians; degrees exist only at the UI and import boundary.
|
||||
|
|
@ -189,6 +193,13 @@ impl Mul<Seconds> for RadiansPerSecond {
|
|||
Radians(self.0 * rhs.0)
|
||||
}
|
||||
}
|
||||
impl Mul<CubicMeters> for KilogramsPerCubicMeter {
|
||||
type Output = Kilograms;
|
||||
#[inline]
|
||||
fn mul(self, rhs: CubicMeters) -> Kilograms {
|
||||
Kilograms(self.0 * rhs.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
|
|
|||
|
|
@ -39,3 +39,10 @@ fn derived_motion_units() {
|
|||
let rate = RadiansPerSecond(3.0);
|
||||
assert_eq!(rate * Seconds(2.0), Radians(6.0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn volume_and_density_give_mass() {
|
||||
let volume = CubicMeters(0.002);
|
||||
let steel = KilogramsPerCubicMeter(7_850.0);
|
||||
assert!(((steel * volume).get() - 15.7).abs() < 1e-9);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue