Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > Re: Identifying...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 13 Topic 4872 of 5041
Post > Topic >>

Re: Identifying just the one triangle that the user clicked on?

by "jbwest" <jbwest@[EMAIL PROTECTED] > Aug 19, 2008 at 05:07 PM

"fungus" <openglMYSOCKS@[EMAIL PROTECTED]
> wrote in message 
news:a1f02041-1b3f-4001-ad66-7887bd3f205d@[EMAIL PROTECTED]
 Aug 18, 3:38 pm, Flark <flark...@[EMAIL PROTECTED]
> wrote:
> Hi,
>
> I'm drawing tens of 1000s of triangles and the user is going to
> click on the screen. I want to identify just the one that the
> user has clicked on. I figure select mode would be overkill
> since I'd have to establish tens of 1000s of names, one per
> triangle. Can anyone tell me of an efficient way to do this?
>

If you want efficiency then at the end of the day you're
going to have to do the math on the main CPU. Passing
individual vertices to OpenGL is never going to be as fast
as working with data in main RAM using code which a
compiler can optimize.

Google for "ray-triangle intersection"

--
<\___/>
/ O O \
\_____/  FTB.

Need 3D editing software?  Try http://www.topaz3d.com/


That assumes that you *have* the vertex data laying around. Some folks 
don't, in which case it gets a lot harder.
And, you don't have to pass individual vertices to OpenGL to pick.

jbw
 




 13 Posts in Topic:
Identifying just the one triangle that the user clicked on?
Flark <flarkino@[EMAIL  2008-08-18 06:38:43 
Re: Identifying just the one triangle that the user clicked on?
Wolfgang Draxinger <wd  2008-08-18 16:56:44 
Re: Identifying just the one triangle that the user clicked on?
"Gernot Frisch"  2008-08-19 10:03:58 
Re: Identifying just the one triangle that the user clicked on?
Wolfgang Draxinger <wd  2008-08-19 12:15:08 
Re: Identifying just the one triangle that the user clicked on?
"Gernot Frisch"  2008-08-19 14:09:41 
Re: Identifying just the one triangle that the user clicked on?
Wolfgang Draxinger <wd  2008-08-19 14:12:19 
Re: Identifying just the one triangle that the user clicked on?
"jbwest" <jb  2008-08-19 08:08:17 
Re: Identifying just the one triangle that the user clicked on?
"jbwest" <jb  2008-08-18 20:02:19 
Re: Identifying just the one triangle that the user clicked on?
fungus <openglMYSOCKS@  2008-08-19 08:42:36 
Re: Identifying just the one triangle that the user clicked on?
fungus <openglMYSOCKS@  2008-08-19 14:05:03 
Re: Identifying just the one triangle that the user clicked on?
"jbwest" <jb  2008-08-19 17:07:58 
Re: Identifying just the one triangle that the user clicked on?
Flark <flarkino@[EMAIL  2008-08-20 05:57:19 
Re: Identifying just the one triangle that the user clicked on?
"jbwest" <jb  2008-08-20 08:05:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 0:02:28 CST 2008.