Re: Re: [JAVA3D] Live ObjectHi Jonathan and others on this thread,

there were too many "might be ..."s and "is'nt it that ..."s in
this thread, so, in short: RTFM.

In long: please (re)read the excellent Java3D tutorial chapter
4.6 Picking; it explains it very well. Specifically look at
Figure 4-12 and the surrounding text, to learn, that it somtimes
isn't that easy to determine the 'correct' parent TransformGroup.
Note the capability Node.ENABLE_PICK_REPORTING mentioned
(applicable only to Group nodes) and here is some text from it's
documentation:

| Specifies that this Node will be reported in the
| pick SceneGraphPath if a pick occurs.

Have a look at code fragment 4-9, adapt that to your needs and
off you go.


And yes, getParent() doesn't work on a live or compiled SceneGraph,
it's docs tell:

| Throws: RestrictedAccessException - if this object is part of
|         live or compiled scene graph


And no, there is no 'capability you can set on the shape to allow
getting the parent on a live node'!


And no, it isn't neccessary to abuse the user data, neither to
'do searches from the root when live' nor to get a TG of a
picked shape. For 'searches from the root when live' you can
use Group.getAllChildren() or Group.getChild(int index), which
work on live/compiled scene graphs (assumed, the correct
capabilities are set).

Hope this helps

Georg
 ___   ___
| + | |__    Georg Rehfeld      Woltmanstr. 12     20097 Hamburg
|_|_\ |___   [EMAIL PROTECTED]           +49 (40) 23 53 27 10

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