We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › selecting objects in a scene
Page Index Toggle Pages: 1
selecting objects in a scene (Read 670 times)
selecting objects in a scene
May 30th, 2008, 2:44pm
 
Hello there,
I am a beginner in processing and would like to know if I can
cast severals objects in a 3D scene and be able to get their coordinate and "select" them with a mouse event
Re: selecting objects in a scene
Reply #1 - May 30th, 2008, 6:15pm
 
There's no magic built in 3D->screen object translation thing to do it for you.

You can use screenX/screenY to find where about on screen a single point is, but you'd have to then work out some way of working out the bounds of the 3D objects to then decide whether one was selected or not.
Re: selecting objects in a scene
Reply #2 - May 31st, 2008, 10:23am
 
What you want is called picking.

I wrote something on processinghacks.com about that, but seems the article has disappeared since they moved in processing.org (!)

Maybe this can help you (there are some code and explanations in french) :
http://n.clavaud.free.fr/processing/picking/picktuto.htm
Re: selecting objects in a scene
Reply #3 - May 31st, 2008, 11:23am
 
ouch-ah, i'm sorry. the missing hacks-pages are my fault. updated just now:

http://processing.org/hacks/doku.php?id=hacks:picking

F
Re: selecting objects in a scene
Reply #4 - Jun 1st, 2008, 10:47am
 
thank you F :-)

@rkshukla > so here are the explanations in english :
http://processing.org/hacks/doku.php?id=hacks:picking_color_buffer
Re: selecting objects in a scene
Reply #5 - Jun 2nd, 2008, 10:28am
 
thank you!!!!
Page Index Toggle Pages: 1