crosstyan 0bfcfe5901 fix: track full-motion scene bounds and ignore runtime files
Accumulate scene bounds from actual geometry and marker samples across the full trajectory instead of seeding Range3D with sentinel extrema and only joining against the first sample.

Why this loader change is necessary:

- Viewer camera framing and reference sizing derive from scene.initialBounds.

- The old code only incorporated sample==0 geometry and marker positions, so motions that travel away from the initial pose could be framed incorrectly.

- The old sentinel initialization depended on joining with artificial min/max values instead of real bounds.

What changed:

- Use first-real-bound initialization in scaledBounds(), transformBounds(), and buildCpuMesh().

- Accumulate scene.initialBounds across all trajectory samples in src/OpenSimLoader.cpp.

- Ignore generated runtime files imgui.ini and opensim.log in .gitignore.

Validation:

- Rebuilt successfully with: cmake --build build -j
2026-03-11 11:56:25 +08:00

osim-magnum-viewer

Read-only OpenSim viewer built with OpenSim, Magnum, SDL2, and ImGui.

Build

git submodule update --init --recursive
cmake -S . -B build -DOpenSim_DIR=/home/crosstyan/Code/opensim-core-build/install/lib/cmake/OpenSim
cmake --build build -j

Run

./build/bin/osim-magnum-viewer /path/to/model.osim /path/to/motion.mot

Optional flags:

./build/bin/osim-magnum-viewer model.osim motion.mot --geometry-dir /path/to/Geometry --speed 0.5 --start-paused

The repo vendors a Geometry/ directory and searches it automatically at runtime.

Sample run:

./build/bin/osim-magnum-viewer \
  /home/crosstyan/Code/opensim-core/OpenSim/Moco/Test/walk_gait1018_subject01.osim \
  /home/crosstyan/Code/opensim-core/OpenSim/Moco/Test/walk_gait1018_state_reference.mot

Notes

S
Description
No description provided
Readme 19 MiB
Languages
CMake 69.9%
C++ 29.2%
Python 0.9%