Skip to content

a simple qt/opengl viewer similar to qglviewer in pure python

License

Notifications You must be signed in to change notification settings

maxime-tournier/snap.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snap.py is a simple python package that does some of what QGLViewer does, but in pure python. It provides a QGLWidget with basic viewing features.

The goal is to have something easy to hack from for trying stuff out.

There is a subtree branch you can easily add as a submodule into an existing git repository using:

git submodule add -b subtree [email protected]:maxime-tournier/snap.py.git snap

DONE

  • viewport/projection matrix
  • rotation trackball (left click)
  • translation (right click)
  • zoom (mouse wheel)
  • axis clamping (double click)
  • animation control (on/off/fps)
  • spin/slide when rotating/translating fast
  • basic lighting
  • axis display
  • PySide 4/5 compatible
  • fullscreen
  • point under pixel
  • set pivot point

TODO

  • save/restore state
  • picking ?
  • text overlay
  • easy/pythonic keybindings
  • grid
  • PyQt compatible

Usage

Install dependencies, e.g. on Debian/Ubuntu:

sudo apt-get install python3-numpy python3-pyside python3-opengl

then start one of the examples:

$ python3 robot.py

About

a simple qt/opengl viewer similar to qglviewer in pure python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published