Have a look at the IntersectTest demo in the demo/PickTest directory of the download. It shows that you can use the methods::
 
Point3d eyePos = pickCanvas.getStartPosition ();
PickIntersection pi = pickResult.getClosestIntersection (eyePos);
then one of:
 
Point3d intPtVW = pi.getPointCoordinatesVW();
Point3d intPt = pi.getPointCoordinates();
 
one warning, however.... I have used this with an IndexedGeometry and the the getPointCoordinates() method returns  and odd x value which causes large portions of the shape to not be pickable because the x value is outside of the shape. The getPointCoordinatesVW() seems to return a correct value. I've sent this to the people at Sun, who tell me a bug report has been filed. It seems to work OK on non-indexedGeometry.
 
 
Cheers,
 
B.

-----------------------------
Oceanic Consulting Corporation
P.O. Box 28009
St. John's, NF, Canada
A1B 4J8
(709) 722-9060/9064(fax)   http://www.oceaniccorp.com
-----------------------------


-----Original Message-----
From: Marina Santana [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 09, 2000 9:07 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Point Coordinates

Hi,
 
I want to get the coordinates of the mouse pointer when I click it.
How I can do this?
 
Thanks,
 
Marina Santana

Reply via email to