John,

  You can set (transform) the camera to be at any location with these lines,
assuming you're using SimpleUniverse:

    TransformGroup vtg =
simpleUniverse.getViewingPlatform().getViewPlatformTransform();
    Transform3D moveto= new Transform3D();
    moveto.setTranslation(new Vector3f(0.0f, 0.0f, 100.0f));
    vtg.setTransform(moveto);

  I'm assuming you'd also like the camera to automatically orient itself on
your object, or the origin (0, 0, 0).  I'm not exactly sure how to do that,
but it's something like getting the inverse value of 'moveto' and assigning
that as your directional vector.

-Cory



----- Original Message -----
From: "John G. Donetti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 12:07 PM
Subject: [JAVA3D] How to determine transformation


> I have recently began using the Java 3D API. I have done the tutorials
successfully.
> I know that latitude, longitude, and altitude(Height above sea level) of a
building which is
> modeled by a simple square. I want this building to be the center of my
virtual world.
> I then want to be able to accept a new location (latitude, longitude,
altitude) and look back
> at the building from this location.
>
> I have not been able to find any examples of how to set up the
transformations to perform this
> task. It anyone can give me either an example or point me to a reference
where I can find this
> information, I would be very appreciative.
>
> Thank You in advance.
>
>
===========================================================================
> 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".


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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