I'm pretty sure I've used this in the past...

// get the starting position of the pick
Point3d eyePos = pickCanvas.getStartPosition();
// the pickClosest returns a PickResult with the picks sorted by the
distance
// from the ViewPlatform to the intersection point.
PickResult pickResult = pickCanvas.pickClosest();
if ( pickResult != null ) {
  PickIntersection pi = pickResult.getClosestIntersection(eyePos);
  // do something interesting with the PickIntersection
}


Daniel


-----Original Message-----
From: Sean ... [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 3:41 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Using GeometryInfo objects


I was curious as to whether or not anyone knew of any fairly simple way to
derive a point via mouseclick of the location on the surface of a
"GeometryInfo" object. That is to say, given a rendered image of a cube, for
example, created with GeometryInfo used to specify the outline of the cube,
how could one derive the location on the surface of the cube via a
mouseclick on its front surface...? Since the cube would be shown in 3d, a
mouse click on the cube could actually be any point a the given x,y
location, with any possible z. So, in essence, is there a Java3D supported
way to derive the z value that coincides with the surface of the cube
closest to the viewer (ie the surface actually clicked on, not the one(s)
behind it)?

I think I may be overlooking something obvious, and any help would be
appreciated.

Later,
S

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

===========================================================================
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".

===========================================================================
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