Talk About Network

Google





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

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

by "jbwest" <jbwest@[EMAIL PROTECTED] > Aug 18, 2008 at 08:02 PM

"Flark" <flarkino@[EMAIL PROTECTED]
> wrote in message 
news:20677af8-8703-4e79-a484-d9cbcb9733e9@[EMAIL PROTECTED]
> 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?
>
> Thanks.

The much-maligned OpenGL selection model also works fine for 10s of 
thousands of triangles.
Use the address of (or index of) some structure that identifies a triangle

as the opengl name.
Ray-triangle intersection is usually "preferred" by the experts here, but
it 
presupposes a couple of things about your app and data structures that
might 
not be true for you; if you can use it efficiently and cheaply, great. 
Otherwise, selection will work just fine. You can test the performance
very 
simply with a very trivial change in your app (worry about names later...)

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
localhost-V2008-12-19 Fri Jan 9 14:44:49 PST 2009.