An OpenGL-based 3D Model Viewer with CAD-style controls and intuitive user interaction, built using Qt and Assimp.
- ✅ Load and view 3D models (via Assimp)
- 🎥 Orbit-style camera controls with inertia
- 🧭 CAD-style projection views (top, front, side, isometric)
- 🔭 Orthographic and perspective projections with smooth toggling
- 📐 Fit-to-view functionality for any model size
- 🧊 Trihedron (XYZ axis marker) with custom OpenGL drawing
- 🖱️ Mouse interaction with zoom, pan, and rotation
- 🖼️ Viewport UI using Qt (custom toolbars and layouts)
Input | Action |
---|---|
Ctrl + Left Mouse Drag |
Orbit (rotate) |
Ctrl + Right Mouse Drag |
Pan |
Ctrl + Middle Mouse Drag |
Zoom |
Mouse Wheel |
Zoom in/out |
Toolbar Buttons |
Switch views (top, side...) |
Auto Zoom |
Fit model to viewport |
git clone https://github.com/your-username/modelviewer.git
cd modelviewer
mkdir build && cd build
cmake ..
make
./ModelViewer
💡 Make sure Qt and Assimp are properly installed and discoverable by
cmake
.
ModelViewer/
├── src/
│ ├── main.cpp
│ ├── MainWindow.cpp/.h
│ ├── ModelViewerWidget.cpp/.h
│ ├── GLCamera.cpp/.h
│ ├── HighlightDelegate.cpp/.h
├── res/
│ └── icons images/
├── CMakeLists.txt
└── README.md
- Windows 10/11 (MSVC, Qt 6.5)
- Linux (GCC, Qt 5.15+)
- macOS (Intel, Qt 6.2)
- Drag-and-drop file loading
- STL/PLY color and material support
- Annotation and markup
- Selection highlighting
This project is open source under the MIT License.