G
G
gibsonen2018-04-05 10:00:16
Java
gibsonen, 2018-04-05 10:00:16

Select polygons LWJGL OPEN GL?

Hello, this is the question. There is a scene, on the scene obj model. It is required to select the polygons of the model.
The right mouse button is pressed, then a rectangle is drawn around the pressed point, selective rays are drawn at the corners of the rectangle. And you need to select (paint over with color) those triangles from the obj model that fall into this area.
I use LWJGL and JOML library. I found such functions as: unproject , which translates from screen coordinates to world coordinates and intersectRayPlane - whether the ray intersects the polygon.
Is there an example of how to do this or tell me in words, preferably with formulas. I can't find anything on the Internet.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question