hi there to all,
I'm wondering how do you get a certain point (using the mouse) on
the face of a box. I have tried to create a PickShape from the mouse to the
canvas to get the intersection point of this PickShape (a PickRay, to be
precise) with that of the face of a primitive (box, sphere, etc). I tried
using the following code:
PickCanvas pickCanvas = new PickCanvas(canvas, branchgroup);
pickCanvas.setMode(PickTool.GEOMETRY_INTERSECT_INFO);
pickCanvas.setTolerance(0.0f);
PickResult result = pickCanvas.pickClosest();
PickIntersection =
result.getClosestIntersection(pickCanvas.getStartPoint());
Point3d intesectionPoint = intersection.getPointCoordinatesVW();
I have set the GEOMETRY capability of my geometry. I got what I want
at first when the view is parallel. But when I rotate the scene, (say using
MouseRotate) and the view becomes perspective, I can't get the point in the
surface i have created. I have created it using QuadArray as its geometry. I
only got a certain point at a certain height from the surface.
any help is appreciated.
thanks,
daniel
===========================================================================
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".