How to get 3d coordinated by clicking on the universe?

Hi!
I've realized a simple java3d program generates a 3d graph from an XML file.
Once created the 3d universe, I need to get the coordinates (x,y,z) of the objects on which I click with the mouse.
Currently my class can only recognize what kind is the object on which I click.
Here is the source of class:
     public void mouseClicked(MouseEvent e)
     pickCanvas.setShapeLocation(e);
     PickResult result = pickCanvas.pickClosest();
     if (result == null) {
     System.out.println("Nothing picked");
     } else {
     Primitive p = (Primitive)result.getNode(PickResult.PRIMITIVE);
     Shape3D s = (Shape3D)result.getNode(PickResult.SHAPE3D);
     if (p != null) {
     System.out.println(p.getClass().getName());
     } else if (s != null) {
     System.out.println(s.getClass().getName());
     } else{
     System.out.println("null");
I'm new in the 3d programming and probably the code is not perfect ..
Can someone kindly help me?
Thanks in advance!
Jacopo

Hi,
in the code below v gets the position of the Node (Shape and Primitive are both Nodes).
Node n = result.getNode();
Transform3D t = new Transform3D();
Vector3d v = new Vector3d();
n.getLocalToVworld( t );
t.get( v);Edited by: leha23 on Oct 2, 2008 7:47 AM

Similar Messages

  • How to get another jsp by clicking a h:commandLink in jsf page

    Hi,
    I am new to JSF. pls send sample code me how to get another jsp by clicking a commandLink in jsf.
    SUB: TO go to the page "report7.jsp"
    -->By getting help from samples i wrote for above in 2 ways.
    1)
    <td><h:commandLink id="RO0007" action="r7" >Sharing of Information from Foreign FIU</h:commandLink></td>
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    2) Sending request through bean method
    <td><h:commandLink id="RO0007" action="#{RBean.report7()}" >Sharing of Information from Foreign FIU</h:commandLink></td>
    in RBean the method form is
    public String report7(){          
         return "r7";
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    Some problem in both i think as it is not going to next page. i need to go to th next page by calling Bean Method.
    please get me out of this problem. It is very urgent. Thank you.
    **************************************************************

    What error is it throwing? If it is throwing a Page not found, then maybe you should try mapping to "report7.faces" instead of "report7.jsp"
    Can you post your faces-config please

  • Can anyone explain to how to get rid off restore session on the mozilla firefox it keeps coming up every time i click on mozilla firefox it comes up restore session why is this it is driving me nuts

    can anyone explain to me how to get rid off restore session on the mozilla firefox it keeps coming up every time i click on mozilla firefox it comes up restore session why is this i want to get rid of it it is driving me nuts

    What do you have checked in Firefox Preferences>General?
    Ciao.

  • How to get online apps to work with the Verizon DSL modem firewall set at "Medium" level, not "Low?"

    How to get online apps to work with the Verizon DSL modem firewall set at “Medium” level? Xbox 360 Live, FTP, and the Windows sntp Time checker native to Windows XP WON’T WORK unless the Verizon firewall is first reset down to “Low.” Then all works well, but I then risk low firewall protection. Setup: · Westell 6100 DSL modem (Software Version: VER:4.04.03.00 Transceiver Revision: 7.2.3.0 Model Name: C90-610015-06), · D-Link DIR-655 wireless router (Hardware Version: A3, Firmware Version: 1.21), For Xbox 360 Live the “canned” port forwarding rule for provided in Verizon’s drop-down list for the Westell 6100 modem forwards ports 88 and 3074 for both TCP and UDP. This does not meet Microsoft’s forwarding recommendations for Xbox 360 Live stated at http://support.microsoft.com/kb/908874. Instead, for the Verizon modem (Westell) I made a new port forwarding rule to comply with those Microsoft instructions. It forwards ports 53, 80 and 3074 for TCP and ports 53, 88 and 3074 for UDP. These same ports are also forwarded in the D-Link router configuration. For FTP, port 21 is also forwarded for TCP and UDP in both modem and router. But they don’t work until I first cripple the Verizon firewall down to “Low.” How to get them to work with the Verizon firewall up to Medium?

    While I do not know the answer to your question, BUT since you have this modem and another router - you could just follow.
    http://www.dslreports.com/faq/13600
    ^^
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

  • How to get my macbook to connect to the Apple TV?

    How to get my macbook to connect to the Apple TV in a strange apartment? I am housesitting for someone for a few months. They mentioned that i would be able to use their Apple TV to play stuff from my macbook. I am using their basic wifi in the apt, which works fine on my macbook and iphone, but see no Apple TV icon appearing on macbook screen, nor any connection happening. (nor is there anything connection w my iPhone). What gives? How can I establish a connection?

    See
    http://support.apple.com/kb/ts4215

  • How to get latest record on top of the result list

    Hi Gurus,
    How to get latest record on top of the result list when you open the record.
    saved data method in BT120H_CPL of OverView page and result list in ICCMP_INBOX.
    Regards,
    Ravi

    Hi
    Try sort descending by on fileld "changed at ".
    manipulate the sort depends on your requirement
    Regards
    Logu

  • In VIEWING (to print) my iTunes music (in finder), how can i view subfolders without clicking on the  triangle of each main folder?

    In VIEWING (to print) my iTunes music (in finder), how can i view subfolders without clicking on the  triangle of each main folder?
    I am trying to print a list of all my music. For example, main folder is BEATLES.  Subfolders are Magical Mystery Tour, Yellow Submarine, Abbey Road, etc...
    and I want to view and print all the subfolders. This is a recovery project after my hard drive failed. I know this is truly a "finder" question and will double post there.
    Thanks.
    Amy

    amy lynn wrote:
    way too much ink.
    Don't know what this means but okay.

  • Hi, I am trying to link my Ipad to my email account, and keep getting a message to click on the link to verify the email account is my own, however I am not seeing a link to click on.  Please help.

    Hi, I am trying to link my Ipad to my email address, but I keep getting a message to click on the link to verify the email account is my own, however I am not seeing a link to click on to. Can someone please help me?

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Using a POP account with multiple devices
    http://support.apple.com/kb/ht3228
    iOS: Adding an email account
    http://support.apple.com/kb/HT4810
    iOS: Setting up an Outlook.com, Hotmail, Live, or MSN email account
    http://support.apple.com/kb/ht1694
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    The iPad's Mail app has no provisions for creating groups. However, you can use a third party app that many users recommend.
    MailShot -  https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
    Group Email  -  https://itunes.apple.com/us/app/group-email!-mail-client-attachments/id380690305 ?mt=8
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • I loos my APPLE ID, I have a new one, how can get access to data stored in the old one?

    I loos my APPLE ID, Now I have a new one, how can get access to data stored in the old one?

    Do you have the email & password of the old Apple ID?

  • How to get relationship between two  views in the  reports

    How to get relationship between two  views in the  reports, I am doing a deletion program , it is fully relates to views , how to get relationship between them in the reports

    Hi,
    Please explain your question in detail...what do you want to read ?
    If you want to know about the navigation links between the views then you can use APIs  like
    wdComponentAPI.getComponentInfo().findInWindows("windowName").getViewUsageByID("Name").getNavigationLinks();
    Iterate through the navigationLinkInfo from above collection and can read the other properties .
    I haven't tried the above , but it should work !!!
    Regards,Anilkumar

  • How to get system temp dir. path on the fly ,system may be XP or Linux ??

    How to get system temp dir. path on the fly ,system may be XP or Linux ??
    please suggest solution

    The default temporary-file directory can be retrieved
    using:
    System.getProperty("java.io.tmpdir")
    Thanks a lot for u r reply this one works !!!!

  • How to get customer number and name from the SD document

    Hi All,
    Can you please let me know how to get Customer Number and Name from the SD Document?
    Thanks a lot....
    Anil

    Hi,
    It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
    regards,
    radhika
    Edited by: kolipara radhika on Jul 10, 2009 5:32 AM

  • HT4792 how to get imovie to show up in the apps on iTunes?

    i tried to follow the steps on how to get imovie projects to ipone but the imovie app doesnt show up in the apps on itunes.

    So, when you go in to System Preferences > Print & Fax > Set Up fax Modem ..., Internal Modem is NOT showing up in Fax List?
    Does Internal Modem.app exist in /Users/{shortUserName}/Library/Printers/?

  • Have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for

    have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for her iphone. we need to save her photos, music, etc to ? icloud and the phone stuff to verizon cloud? so when she gets her new Iphone6 she can have all her "stuff" back on the new phone. hope this makes sense. please offer suggestions here or at [email protected] thanks for your help!

    Oh no! I'm sorry to see there's a lot of confusion here and data shared, x-rayDon. We can definitely work to fix. This happens when two devices share the same Apple ID, so she will need to reset hers. She can do so by assessing this link Apple - My Apple ID. You will need to decide who will keep the account if want separate Apple IDs since purchases cannot be shared unless you do Family Sharing.
    RobinD_VZW
    Follow us on twitter @VZWSupport

  • Does anyone know how to get a movie to play on the apply TV that you rented?

    Does anyone out there know how to get a movie to play on the Apple TV that was rented through Apple TV?

    It's not going to show under purchases because it's a rental. You have to go into settings - iTunes - check for rental.
    Note: a rental will disappear once it's expired (after 24hrs or 48 hrs depending on location)

Maybe you are looking for

  • Multiple Databases per volume ??

    hi all,  i do not understand this point :  "Multiple Databases per volume let you have both active and passive databases on the same volume " ok right it was also possible in Exchange 2010 in jbod configuration... in place in our orga 2010. 2 dag mem

  • Dynamic Drop down list

    Hi Friends, I am working on a Drop down list in Adobe Interactive Form. I have a internal table contaning some values, i have binded my dropdown element wiht the field of the table containing the values. Thatu2019s working fine an I can select on val

  • Wrong characters in KeyEvents generated from input of barcode scanner

    Hi everybody, :-) I have a problem with KeyEvents coming from a barcode scanner. The issue seems to have creeped in somewhere between JSE 6u3 and 6u10, as in the former it works as expected and in the latter it does not. The problem persists still, w

  • SVG to PDF: how?

    Hi, I designed my own company logo in Inkscape and want to give it as a vector to a publisher to make f.e. my business cards, but as it consists of several objects with gradients, these objects simply are not saved in a PDF, (E)PS or AI. I read on se

  • Import matching RAW does not include all photos

    Hello to you all, When I want to import matching RAW files, Aperture only recognizes a couple of photos inside the projects. I'm using the 'include current filter' as I have made a selection of pictures inside the project based on a rating. But even