Hello Luke,
I am looking for a tool to visualize and manipulate tetrahedral mesh. I have some experience with numpy, matplotlib but nothing with opengl. With PyQtGraph you are doing a great job and pyqtgraph.examples helps to easily understand the functionality. I have a question about pyqtgraph.opengl.GLViewWidget.itemsAt. It takes the rectangular regions of interest and gives back the list of items which are currently inside. But how can I get the ID of a single face from the mesh item?
Let me shortly explain. I display tetrahedral mesh (vertices, faces) like a single item using pyqtgraph.openg.GLMeshItem. And I want to click at a single face and to get it’s ID in order to, let's say, change the face color and modify a numpy array which is linked to the face by the ID.
I tried to plot
faces like a separate items but it works slow and itemsAt returns all the faces
which are in the region of interest, while I need only the one which is closest
to the user.
Could you please give me advice how can I effectively plot a huge mesh and get access to a single face by mouse click? Maybe I have not managed to explain properly. Please have a look at java script example which almost does what I tried to in Python using PyQtGraph.
Thank and best regards,
Igor.