I guess this is the spected result, if you do not set
a value to userData before...
--- Carlos Vieira <[EMAIL PROTECTED]> escreveu:
> Hi all of you, and thanks for your precious help :)
>
> I tried to make the identification by doing this:
>
> public void mouseClicked(MouseEvent e){
> System.out.println("*** Mouse Click
> ***");
>
> pickCanvas.setShapeLocation(e);
> PickResult results =
> pickCanvas.pickClosest();
> //Node node = results.getObject();
>
> if (results != null)
> {
> System.out.println(results);
>
> System.out.println("-----------------------------");
>
> //System.out.println(node.getUserData());
> }
> }
>
> This works very well with the commented lines and
> print the results
> variable like this,
> where cuboGeloID is the text that i gave to the box
> with setUserData. So i
> think that
> the box has an identifier and it was picked
> sucessfully:
>
> Print of the results variable after picking:
>
> *** Mouse Click ***
> PickResult: sgp:[EMAIL PROTECTED] :
> javax.media.j3d.TransformGroup
> : com.sun.j3d.utils.geometry.Box, cuboGeloID :
> javax.media.j3d.Shape3Djavax.medi
> [EMAIL PROTECTED]
> LocalToVworld Transform:
> 1.0, 0.0, 0.0, -8.0
> 0.0, 1.0, 0.0, 4.6
> 0.0, 0.0, 1.0, -14.5
> 0.0, 0.0, 0.0, 1.0
>
> node:[EMAIL PROTECTED]
> PickIntersection: geomIndex = 0
> dist:57.28777659701104
> ptVW:(-9.174001979439316, 5.659693372592018,
> -16.5)
>
> PickIntersection: geomIndex = 0
> dist:57.27620679949459
> ptVW:(-9.116157611954812, 5.71615761195481, -16.5)
>
> -----------------------------
>
> But if i uncomment the lines in my code to use the
> getUserData
> i get the null from the getUserData :(
>
> Am i doing anything wrong? Can anyone help.
>
> Thanks again
>
> Carlos
_______________________________________________________________________
Desafio AntiZona: participe do jogo de perguntas e respostas que vai
dar um Renault Clio, computadores, c�meras digitais, videogames e muito
mais! www.cade.com.br/antizona
===========================================================================
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".