The problem, I would guess here, is that you want to know which object from your
vrml file you picked?
With that assumption, you don't have to do a whole lot

When you first create your vrml scene, get the named objects
in this case it is Box,Cone, and ViewBox(I think that 3rd one is right)

then, set the user data of their transforms, or their shapes, or their branch
groups, whichever you are going to be doing the picking on
So, if you got the Box transform
BoxNode.getChild(0).setUserData(new String("BOX_SHAPE"));

So, now, for each of these objects you have user data assigned to them

Now, in your picking code, you pick into the scene looking for the closest node
So, let us say that when you loaded your vrml scene, and set the user datas of
the objects, you set that user data in their transformgroups

So, you do the pick, you get the closest transformgroup
you then get the user data of that transform group
see what it says
if it is "BOX_SHAPE" well, you know what node it is

from your vrml scene you could have generated your own hashtable with the keys
being the user data and the transformgroups being
the element

So, the next thing is, what happens if I pick into the scene, get a transform
group and the user data object is null
that means you didn't pick an object

Or, if you don't want to do any of the picking your self
Use a PickRotate, PickZoom, PickTranslate  behavior on the scene
it will shoot into the scene, pick an object's transform and then you can
rotate, zoom, and translate it

Hope that helps
Scott


Scott Decker
Research Scientist
Pacific Northwest National Labs
[EMAIL PROTECTED]

===========================================================================
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