A more general approach is to use the platform's getLocalToVworld()
method which returns a Transform3D telling you where the platform is
in the world space and how it is oriented no matter how many
transforms are used to manipulate it.
As for getting the 3D position of a mouse click there isn't a
one-to-one mapping since the mouse lives in 2D display space not 3D
world space. Often what is done is the mouse position is projected
into the scene and the position on the closest underlying object is
considered the mouse's "3D" position. This is referred to as
"picking", which has been discussed at great length on this list.
Check the FAQ, etc. for references and code samples.
--jon
> Date: Fri, 22 Oct 1999 09:55:21 +0400
> From: Vladimir Olenin <[EMAIL PROTECTED]>
> Subject: Re: Position in Virtual Universe
>
> Usually u would like to attach ViewPlatform to TrasformGroup, so that
> viewpoint could be moved around the scene. The rest is quite simple.
> As soon as u like to know where the platform is u just call
> getTransform(Transform3D t3d) function on that TransformGroup. In t3d
> class there would be information either about your current possition
> and rotation.
>
> vladimir
> -=V=-
> >-------<=============>-------<
> Join in Java community now!
> http://JavaCafe.VirtualAve.net/
> >-------<=============>-------<
>
> In your previous letter u wrote:
> --------------------------------
> SG> Hello,
>
> SG> Is there an implementation built into Java3D that will return either the
> current position of the ViewPlatoform in the VirtualUniverse (x, y, z), or that
> will return the position of a mouse click
> SG> in the VirtualUniverse? Any suggestions would be appreciated.
>
--
____________________ Peculiar Technologies ____________________
Jon Barrilleaux 3800 Lake Shore Ave. Purveyors of
[EMAIL PROTECTED] Oakland, CA 94610 Alternate Reality
510.444.4370 voc Augmented Simulation
510.444.0231 fax www.augsim.com and 3D Solutions
===========================================================================
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".