Questions tagged [picking]

147 questions
33
votes
6 answers

Implementing Ray Picking

I have a renderer using directx and openGL, and a 3d scene. The viewport and the window are of the same dimensions. How do I implement picking given mouse coordinates x and y in a platform independent way?
Tom J Nowell
  • 8,415
  • 16
  • 57
  • 88
20
votes
3 answers

Threejs: assign different colors to each vertex in a geometry

I want to do picking via IdMapping in Three.js Because of performance issues I only have one huge geometry, computed like this: for (var i = 0; i < numberOfVertices; i += 9) { p1 = new THREE.Vector3(graphData.triangles.vertices[i+0],…
Stefan Ramson
  • 499
  • 1
  • 6
  • 16
12
votes
2 answers

OpenGL ES 2.0 Object Picking on iOS

What is the best method to select objects that have been drawn in OpenGL ES 2.0 (iOS)? I am drawing points.
ExtremeCoder
  • 4,069
  • 4
  • 38
  • 55
12
votes
7 answers

OpenGL GL_SELECT or manual collision detection?

As seen in the image I draw set of contours (polygons) as GL_LINE_STRIP. Now I want to select curve(polygon) under the mouse to delete,move..etc in 3D . I am wondering which method to use: 1.use OpenGL picking and selection. (…
Ashika Umanga Umagiliya
  • 7,998
  • 19
  • 86
  • 167
9
votes
3 answers

Remove Contact select option form file select options

I am opening file pick Intent with, Bellow code Intent intent_upload = new Intent(); intent_upload.setType("*/*"); intent_upload.setAction(Intent.ACTION_GET_CONTENT); activity.startActivityForResult(intent_upload,…
Jogendra Gouda
  • 635
  • 4
  • 18
7
votes
1 answer

iOS 5 + GLKView: How to access pixel RGB data for colour-based vertex picking?

I've been converting my own personal OGLES 2.0 framework to take advantage of the functionality added by the new iOS 5 framework GLKit. After pleasing results, I now wish to implement the colour-based picking mechanism described here. For this, you…
KomodoDave
  • 6,829
  • 8
  • 54
  • 88
6
votes
1 answer

Android OpenGL 3D picking

I'm on Android OpenGL-ES 2.0 and after all the limitations that come with it, I can't figure out how to take 2D screen touches to the 3D points I have. I can't get the right results. I'm trying to implement shooting a ray into the point cloud, which…
RedLeader
  • 647
  • 1
  • 15
  • 28
6
votes
3 answers

Best box selection method for a Minecraft clone

I'm making a Minecraft clone as my very first OpenGL project and am stuck at the box selection part. What would be the best method to make a reliable box selection? I've been going through some AABB algorithms, but none of them explain well enough…
Solenoid
  • 2,261
  • 4
  • 27
  • 47
5
votes
4 answers

Got stuck implementing openGL picking

I'm already able to find the world coordinates of the place i clicked, and it also checks this with the depth buffer. For this is used the following code : GLint viewport[4]; GLdouble modelview[16]; GLdouble projection[16]; GLfloat…
Joseph
  • 51
  • 1
  • 3
5
votes
1 answer

Generic picking solution for 3D scenes with vertex-shader-based geometry deformation applied

I'm trying to implement a navigation technique for 3D scenes (in OpenSceneGraph with OpenGL). Among other things the user should be able to click on an scene object on the screen to move towards it. The navigation technique should be integrated into…
Frank Schlegel
  • 6,476
  • 23
  • 43
4
votes
4 answers

picking without replacement in java

I often* find myself in need of a data structure which has the following properties: can be initialized with an array of n objects in O(n). one can obtain a random element in O(1), after this operation the picked element is removed from the…
4
votes
1 answer

reverse perspective projection

I'm using worldview_inverse * (projection_inverse * vector) to transform screen space coordinates into world space coordinates. I assumed that (x,y,1,1) would transform to a point on the far plane, while (x,y,-1,1) transforms to a point on the…
heeen
  • 4,321
  • 2
  • 19
  • 23
4
votes
3 answers

Given a 4x4 homogeneous matrix, how can i get 3D world coords?

So i have an object which is getting rotated then translated and rotated again. I am storing a matrix of these translations as an object member. Now when i come to object picking i need to know the 3D world coords of this object. Currently i have…
Stoff81
  • 589
  • 4
  • 14
4
votes
4 answers

iPhone : OpenGL ES : Detecting if you have tapped a object (cube) on screen

I asked a similar question already which got me to where I am now but I really need some help on this one. Its the last thing in my way to completing something cool (in my eyes lol) I have a 3d world where I can move around and in this world are…
Burf2000
  • 4,438
  • 11
  • 47
  • 100
4
votes
2 answers

Color picking on android - glReadPixels rounding errors

I am using color picking in opengl es on android and i am calculating a color key to compare it to the values i get from glReadPixels: ByteBuffer PixelBuffer =…
Simon
  • 12,485
  • 14
  • 63
  • 84
1
2 3
9 10