To get the distance to the view:
1. Get the transform which is translating the object and get the translation
vector. This only works if the shape itself is built around the origin and
then translated, as most are.
2. get the view transform, gets its translation vector.
3. calculate the distance between the two. You can use vector math or
convert them to points and use the distance() method.
Dave Yazel
> ----------
> From: Zak[SMTP:[EMAIL PROTECTED]]
> Reply To: Discussion list for Java 3D API
> Sent: Thursday, January 18, 2001 3:50 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] Checking for movement
>
> I am using the Muse Behavoirs to manipulate the object. I need to get the
> positon the object is at and the distance from the View...
>
> Zak
> ----- Original Message -----
> From: "Yazel, David J." <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 18, 2001 2:41 PM
> Subject: Re: [JAVA3D] Checking for movement
>
>
> > Is the object moving through a behavior? Objects don't move by
> themselves.
> > The same behavior that moves the object of course "knows" its being
> moved.
> > The location relative to the screen could mean several things. Do you
> mean
> > in relation to the view? Do you need the distance from the view to the
> > object? Or do you mean you want the mapping of the 3d object
> coordinates
> to
> > the 2d image plate coordinates?
> >
> > Dave Yazel
> >
> > > ----------
> > > From: Zak[SMTP:[EMAIL PROTECTED]]
> > > Reply To: Discussion list for Java 3D API
> > > Sent: Thursday, January 18, 2001 2:46 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [JAVA3D] Checking for movement
> > >
> > > I am trying to set up a routine that will check for movement of an
> object.
> > > I want to be able to tell the location(coordinates of an object)
> relative
> > > to the screen.
> > >
> > > How can I make it check all the time for changes in the object?
> > >
> > > Zak
> > >
> >
> >
> ==========================================================================
> =
> > 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".
>
===========================================================================
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".