Hello,
I am fairly new to OpenGL and currently developing on a modelling platform which has OpenGL integrated. My current task is to implement a selection for different usecases (rectangular, curcular, planar, etc.).
So far I create an 3D object and place it in position for all points (nodes) that should be included. Then the points are checked, based on their position in x, y & z if they have a shorter distance from the middle point of a sphere to its radius, or on which side of the plane it is positioned based on the normal vector - analog for a cube.
However, my supervisor is not pleased with the approach. So I have been searching through the api, this forum and google for any hint or a functional that checks if a point is in ‘hitbox’ or volume. So far I have only found the following thread: “How to know if point is inside a volume?”
I wonder what it means to ’ test each vertex in all 6 directions’, but that is what i am actually doing with the radius for a sphere or 6 planes of a cube. And how the reduction to an convex shape would be helpful? Are there more keywords I can look for? Otherwise, if one has a direct explanation or link, that would really help me out!