> Hi Josh
>
> Not an expert on this but being as I have been doing a fair bit with
> picking lately I thought I mioght have a crack at helping you.  It is
> not possioble to get the parent of an object at runtime but I find two
> things are needed to solve you problem.  firstly if the scenegraph path
> objcet will only return objects that have the correct capability set
> (pick reporting I think!). Secondly carefully design the
> ".userData(Object obj)"  then user
> setUserData(obj);  and
> new oBj = getUserData()
>
> Then I use a string that I frmat and tokenise on reading it to get all
> the required data I need.  e.g Parents name, Translational vectors
> (needs casting back into double or floats after reading from the
> stringTokeniser()) and even if their are children attached.
>

Just a slight addition. It might be nicer (and more efficent) if you store
a specifically designed data object in the user data. Then you'd have all
your data readily available and typed as soon as you got your picked node,
instead of parsing the string.

> Hope this helps.
>
> C YA Phil :)
>
>
>
>>===== Original Message From Discussion list for Java 3D API
> <[EMAIL PROTECTED]> =====
>>Hi,
>>
>>I've been using the PickCanvas for some time now to pick 3D points in
>> my
> scene. Now I'd like to be able to distinguish which avatar was picked..
> not just the Shape3D. I had the "bright" idea to extend BranchGroup with
> a class that includes a reference to the avatar object thinking that I
> could chase this parent up from the leaf that is picked. Of course when
> I tried this I get the restricted access exception.
>>
>>Is there an easy way to do this?
>>
>>I looked at the result returned  by getSceneGraphPath but it always
>> claims to
> have 0 nodes! (nodeCount() == 0).
>>
>>josh
>>
>>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".
>
> Philip J Colbert
> Software Engineer
> RCID, Bruce Building
> University of Newcastle Upon Tyne
> NE1 7RU
> Phone 0191-2225306
> Fax 0191-2225833
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient(s). If
> you are not the intended recipient, please note that any circulation or
> copying of this e-mail is strictly prohibited. If you have received this
> e-mail in error please contact the sender by reply e-mail and delete all
> copies of this message.
>
> The RCID makes every effort to ensure that this e-mail and any
> attachments are sent virus free. However it is the responsibility of the
> recipient to perform any checks they deem necessary.
>
> ===========================================================================
> 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".


--
Jose UML - http://www.newdawnsoftware.com/jose
Pondering RPG - http://pondering.newdawnsoftware.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".

Reply via email to