Hi,
I am note quite sure I understand you question but I will attempt an answer anyway.
1) You can distinguish between too spherses based on there position as you said. If
you want to add your own information about
how each sphere is dfferent you can user the user data member of the Node class.
is When ytou create your sphere as say, an oxygen atom, you can add the text "Oxygen
Atom" as user data to the Shape3D node. You
cn then red the user data from the pick result.
2) The most simple way to achieve this is to add a single Behavior to your scene which
listens for all mouse events. You then
process the mouse event/s, decide what operations are necessary, and do each one.
eg
//this is just simple pseudo code
public void processStimulus() {
if mouse event is a click {
do a pick
if picked object contains user data {
show a popup.
}
}
}
Hope that is of some help.
Cheers,
Brad
Ashish Aggarwal wrote:
>
> Hello All,
>
> I have few questions regarding Java3D:
>
> 1. How can one identify multiple shapessay cones of
> same size in a canvas3D (Considering all of them are
> under same TG node)? I can pick and identify them as
> Spheres (like some messsage that you have picked a
> Cone) but how to say one sphere is different from
> another sphere. Is it based on there position on the
> canvas3D?
>
> 2. I am able to pick objects and able to use
> JPopupMenu seperately on a canvas3D. How can I
> implement both things together say if I use
> Mouse_Click event on a cone, I should be able to pick
> it up as well as pop up a menu giving some information
> about this cone.
>
> Has anyone faced these type of requirements? Please
> take out some time to provide some tips/information.
>
> Thanks
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> ===========================================================================
> 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".
----------------------------------------------------------------------------
This Email may contain confidential and/or privileged information and is
intended solely for the addressee(s) named. If you have received this
information in error, or are advised that you have been posted this Email by
accident, please notify the sender by return Email, do not redistribute it,
delete the Email and keep no copies.
----------------------------------------------------------------------------
===========================================================================
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".