Expand description
Physics simulation I/O formats.
Provides writers and readers for full physics scenes (bodies, joints, materials), multi-body trajectories, contact force logs, energy logs, simulation checkpoints, VTK time-series output, and XDMF wrappers.
Structs§
- Body
Desc - A rigid body descriptor for scene serialization.
- Checkpoint
Reader - Read a checkpoint and restore simulation state.
- Checkpoint
Writer - A simulation checkpoint: full state including bodies, constraints, and broadphase.
- Contact
Force Log - Log of contact forces at each timestep.
- Contact
Force Record - A single contact force record.
- Energy
Entry - Energy log entry for one timestep.
- Energy
Log - Log kinetic/potential/total energy, angular momentum, linear momentum.
- Joint
Desc - A joint descriptor.
- Material
Desc - A physics material descriptor.
- Paraview
Xdmf - XDMF wrapper for HDF5-based trajectory (positions as heavy data).
- Physics
Scene Reader - Read a physics scene from JSON, validate it, and reconstruct a body list.
- Physics
Scene Writer - Write a full physics scene (bodies, joints, materials) to JSON or binary.
- Trajectory
Frame - A single trajectory frame: positions, velocities, quaternions.
- Trajectory
Reader - Reader for binary trajectory files produced by
TrajectoryWriter. - Trajectory
Writer - Writer for multi-body trajectory files: positions, velocities, quaternions per timestep.
- VtkTrajectory
- Write a time-series VTK output: per-step VTU files + a PVD collection.
Functions§
- encode_
quaternion_ f32 - Encode a quaternion (w, x, y, z) as four f32 values in little-endian bytes.
- pack_
float3_ array - Pack a slice of [f64; 3] vectors into an interleaved f32 little-endian byte buffer.
- read_
xdmf_ timesteps - Parse a simple XDMF file and return a list of (time, data_file) pairs.
- write_
pvd_ collection - Write a ParaView PVD collection XML file pointing to per-step VTU files.