It is obvious that in your program, when the two shapes are in front of
each other, both shapes are selected. So, you have to build in some code
to tell the system which of the shapes you want. In my applications I
used

Point3d eyePos=pickCanvas.getStartPosition();
PickIntersection pi=pickResult[0].getClosestIntersection(eyePos);
etc.

Then you have at least geometric info to separate these two. I advise
you to take a look into IntersectInfoBehavior.java which you can
find in \j2sdk1..........\demo\java3d\PickTest

This file contains all the info you need. Try it out and take whatever
logic you can use in your application from it. Other ways maybe to
use strings when creating those shapes and test for the right string when
selecting, eg:

String str=path.getObject().toString();

First of all, try out pickCanvas.pickClosest(pickShape) by slightly
altering some code in the above file.

success,

Dirk

----- Original Message -----
From: "nagehan pala" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 1:21 PM
Subject: [JAVA3D] Front Shape problem


> hi all,
>
> i have two different shapes in my program and when you click on one of
them,
> a menu is opened and also they have different menues.
>
> when one of the shapes is front of the other and you click on the front
> shape two different menues are opened!!!
>
> the problem is that...
>
> does anyone tell me what I should do?
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to