Skip to content

sharjith/AssimpQtViewer

Repository files navigation

ModelViewer

An OpenGL-based 3D Model Viewer with CAD-style controls and intuitive user interaction, built using Qt and Assimp.

screenshot


✨ Features

  • ✅ 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)

🖱️ Controls

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

🧰 Dependencies


🔧 Build Instructions

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.


📁 Project Structure

ModelViewer/
├── src/
│   ├── main.cpp
│   ├── MainWindow.cpp/.h
│   ├── ModelViewerWidget.cpp/.h
│   ├── GLCamera.cpp/.h
│   ├── HighlightDelegate.cpp/.h
├── res/
│   └── icons images/
├── CMakeLists.txt
└── README.md

🧪 Tested Platforms

  • Windows 10/11 (MSVC, Qt 6.5)
  • Linux (GCC, Qt 5.15+)
  • macOS (Intel, Qt 6.2)

📌 TODO

  • Drag-and-drop file loading
  • STL/PLY color and material support
  • Annotation and markup
  • Selection highlighting

📜 License

This project is open source under the MIT License.


🙋‍♂️ Acknowledgments

  • Assimp for model import
  • Qt for GUI and OpenGL integration

About

A minimal Assimp model viewer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published