How 8ored/solar-system-simulator works
This is a C++ OpenGL solar-system visualization. The main workflow is keyboard and mouse input, per-frame camera and orbit simulation, then rendering the Sun, planets, Moon, and scene overlays. The graph also preserves documented features such as scale modes, proximity behavior, Saturn’s ring, and texture fallbacks. Several implementations were not sampled in full, so their relationships are included only where the excerpts, source index, or README support them.
Main entry points: render.cpp Scene Rendering · input.cpp Input Callbacks · simulation.cpp Frame Simulation · main.cpp Window Setup
Components 12
Application
- Window Setup
main.cpp - Scale and Constants
config.h - Shared State
state.cpp
Camera and Controls
- Input Callbacks
input.cpp
Solar System Dynamics
- Frame Simulation
simulation.cpp - Orbit Positions
orbit.cpp
Scene Graphics
- Scene Rendering
render.cpp - Sphere Mesh
sphere.cpp - Texture Loading
texture.cpp - Image Decoder
stb_image.h
Other components
- Viewer
- Solar System View
Connections 18
- Viewer → Input Callbacks: controls
README.md - Window Setup → Input Callbacks: registers callbacks
main.cpp - Window Setup → Frame Simulation: starts timer
main.cpp - Window Setup → Scene Rendering: registers display
main.cpp - Window Setup → Texture Loading: loads textures
main.cpp - Input Callbacks → Shared State: updates
input.cpp - Input Callbacks → Frame Simulation: calls physics
input.cpp - Input Callbacks → Orbit Positions: gets positions
input.cpp - Frame Simulation → Shared State: updates
simulation.cpp - Frame Simulation → Orbit Positions: gets positions
simulation.cpp - Scene Rendering → Shared State: reads
render.cpp - Scene Rendering → Orbit Positions: gets positions
render.cpp - Scene Rendering → Sphere Mesh: draws spheres
render.cpp - Texture Loading → Image Decoder: decodes images
texture.cpp - Scene Rendering → Solar System View: draws
render.cpp - Scene Rendering → Scale and Constants: uses constants
render.cpp - Frame Simulation → Scale and Constants: uses constants
simulation.cpp - Input Callbacks → Scale and Constants: uses constants
input.cpp