How orurh/metasimultor works
METASim is a desktop scene editor and simulation application centered on fire, terrain, agents, and rendered particle effects. The main workflow starts in the application loop: it updates and renders the scene, while an editor extension builds the UI and tools that let users modify it; scene files and recordings provide persistence and capture. The scene combines domain systems with graphics and prefab data. Several subsystem connections are based on declarations or the source index rather than implementation excerpts, so those links are marked unverified.
Main entry points: Scene.cc Scene runtime · Application.cc Application loop · EditorExtension.cc Editor extension · panels Editor panels
Components 25
Application
- Program entry
src/main.cc - Application loop
src/core/Application.cc - Window and input
src/core/Window.cc
Editor UI
- Editor extension
src/app/EditorExtension.cc - Editor and tools
src/ui/Editor.h - Editor modules
src/ui/modules - Editor panels
src/ui/panels - Prefab preview
src/ui/panels/PrefabPreviewRenderer.cc
Scene Simulation
- Scene runtime
src/core/scene/Scene.cc - Entity components
src/core/scene/Components.h - Fire simulation
src/core/fire/FireSimulationSystem.cc - Agent manager
src/core/AgentManager.cc - Terrain
src/core/scene/Terrain.cc - Heat map
src/core/scene/heatMap.h - Simulation time
src/core/scene/SimulationTime.h - Entity registry
libs/entt/entt.hpp
Scene Data
- Scene recording
src/core/snapshot/SceneRecorder.h - Snapshot system
src/core/snapshot/SnapshotSystem.cc - Scene serialization
src/data/SceneSerializer.cc - Prefab system
src/data/PrefabSystem.cc
Rendering
- Scene renderer
src/graphics/Renderer.cc - Particle systems
src/graphics/ParticleSystem/ParticleSystem.cc - Compute shaders
src/graphics/ComputeShader.cc - Models and materials
src/graphics/Model.h
Other components
- Editor user
Connections 26
- Editor user → Editor extension: edits scene
src/app/EditorExtension.cc - Program entry → Application loop: starts
src/main.cc - Application loop → Window and input: polls events
src/core/Application.cc - Application loop → Scene runtime: updates and renders
src/core/Application.cc - Application loop → Editor extension: dispatches hooks
src/core/Application.cc - Application loop → Scene recording: updates recording
src/core/Application.cc - Application loop → Scene serialization: loads and saves
src/core/Application.cc - Editor extension → Editor and tools: builds UI
src/app/EditorExtension.cc - Editor extension → Editor modules: registers modules
src/app/EditorExtension.cc - Editor extension → Editor panels: draws editor
- Editor panels → Prefab preview: renders preview
src/ui/panels/PrefabPreviewRenderer.cc - Editor panels → Scene runtime: edits scene
- Scene runtime → Agent manager: manages agents
- Scene runtime → Fire simulation: runs fire model
- Scene runtime → Terrain: uses terrain
- Scene runtime → Heat map: exposes heat map
- Scene runtime → Simulation time: tracks simulation time
- Scene runtime → Prefab system: creates prefab agents
- Scene runtime → Entity components: stores components
- Scene runtime → Entity registry: uses registry
- Scene runtime → Scene renderer: renders scene
- Scene runtime → Particle systems: uses particle systems
- Fire simulation → Compute shaders: dispatches compute
- Scene renderer → Models and materials: draws models
- Scene recording → Snapshot system: uses snapshots
- Prefab preview → Models and materials: renders prefab model