If your stars are represented as spheres and the user can select them, you
want the camera to point at the center of the sphere.  When the user selects
a star, attach a callback object that activates when the position changes
(which I assume is being driven by some Behaviour object that is driving
stellar position based on some star motion simulation routine).  Find out
what the modified position is and then use that to retarget the camera
direction.  The camera direction should be the normalized vector from the
camera's position to the star's centre.  I would provide specifics but I am
just about to start looking over the specs in detail.

Roberto Speranza
President, Dot Internet Solutions Inc.
mailto:[EMAIL PROTECTED]
http://www.dotinc.net/
----- Original Message -----
From: Randy Stiles <[EMAIL PROTECTED]>
To: David A Thomson <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: April 29, 1999 12:50 PM
Subject: Re: [java3d] Star Map in Java3D


> David A Thomson wrote:
> >
> > My project is to build a fully rotatable 3D star map in Java. I
currently
> > have about 3000 sphere transforms in a contentBranchGroup which is
running
> > incredibly slowly (but that's for another mail). My problem is that I
> > should be able to select a star and move the camera to point directly at
> > it. However, because the stars are rotatable, the star positions (x,
> > y, z coordinates) change all the time. How can I keep track of their
> > coordinates?
>
> You may want to consider modeling the stars as points, on the inside of
> one large transparent sphere.  Then when people select a star point,
> they are really selecting the sphere wall .  This deals with slowness,
> and deals with getting star location to use in a pointAt routine.
>
> Often star coordinates are given as a kind of polar coordinates in the
> earth's sky, so you can take these and map them as points onto a sphere
> easily.  Then you take geometry for a large sphere, turn backface
> culling off or invert the geometry, make it transparent, and make it a
> little larger than the abstract sphere where your star points are
> located.
>
>
> --
> // Randy Stiles mailto:[EMAIL PROTECTED] O/L922 B/255
> // Lockheed Martin Advanced Technology Center  3251 Hanover Street
> // office: 650.354.5256  fax: 650.354.5235     Palo Alto, CA 94304-1192
> // http://vet.parl.com/~vet/
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to