Pick vertex/facet/cell under the cursor #88
-
Hello, I try to find a replacement for libigl's unproject_onto_mesh() (unproject a screen location to pick a facet). None of Geogram's examples seems to use this kind of functionality ( While looking into Graphite, I dug under the "probe attributes" tool, which find the facet under the cursor to display attributes. I discovered Is this functionality available in Geogram ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Graphite's picking works as follows (and all basic functionalities are implemented in Geogram, I confirm):
For 1), For 2), it is something like:
For 3), the For a reference, see:
|
Beta Was this translation helpful? Give feedback.
Graphite's picking works as follows (and all basic functionalities are implemented in Geogram, I confirm):
For 1),
MeshGfx
ingeogram_gfx/mesh/mesh_gfx.h
has aset_picking_mode
function (to draw an image with element IDs instead of standard rendering), and you can chose the type of elements you want to pick. Just do that in the back buffer without callingSwapBuffers
(…