Canvas3d has methods for doing this.

Try something like the following:
  Canvas3d c;

  c.getPixelLocationInImagePlate(x, y, position);
  c.getImagePlateToVworld(t);
  t.transform(position);

position will end up containing the 3-d world co-ordinates
of a point on the canvas (you got the x, y values from
a mouse event).

Note that there is a whole line of points in the virtual world
that map to that same point on the Canvas3d.

If instead you want to select an object in the virtual world
given a mouse location on the Canvas3D you should use
a PickCanvas

Hope this is helpful.

Robert
--
Robert McLaughlin
Medical Vision Lab
Department of Engineering Science
University of Oxford
Parks Road Oxford OX1 3PJ
England

On Wed, 3 May 2000, JayT wrote:

> Hi
> I would like to go through the Canvas3D scene and along the way display the world 
>and the local coordinates.  There are methods in Canvas3D (getVworldToImagePlate() 
>and getImagePlateToVworld() ) and Node (getLocalToVworld() ) but those all need a 
>TransformGroup.. what if it's just the mouse moving?  I realize I can place a 
>java.awt.MouseListener and implement it in a Canvas3D but is there a way in Java3D 
>that would allow me to get a reference point under the mouse pointer?
>
> Jay
>

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