I'm new to OpenGL. I have rendered a few 3d shapes on a glSurfaceView in Android. Now I want to find which object has clicked by the user when the user touches the screen. I have touch coordinate. How can I check whether the perpendicular ray, that goes through the screen coordinates is intersecting one of the shapes I rendered and how to find which one is that?
(additional: I'm doing this inside the Maxst ar SDK, instant tracker)
I have below data(Maxst SDK keep below data) of rendered objects and I have touch coordinates.
float[] localMvpMatrix = new float[16];
float [] projectionMatrix = new float[16];
float[] modelMatrix = new float[16];
float[] translation = new float[16];
float[] scale = new float[16];
float[] rotation = new float[16];
float[] transform = new float[16];
Edit: How to use GLU.gluUnProject() to achieve this in android? Can anyone please explain what are those parameters and how to use the output of this method (in Android)?