I don't have the answer the way you would want it but I am personally
interested if you do find the solution.

I too want to look at a 3D object and either rotate it or transform around
it so that it stays in the center of the screen while I look at its top,
bottom or whatever angle I prefer.  I found I had to put th object inside a
transform group to center it on the origin, get the view to look at the
origin and use another transform group to rotate the object about the
origin.

Let me know how you do it when you do get a solution!
John

-----Original Message-----
From: Dvorak, Daniel J. [mailto:[EMAIL PROTECTED]]
Sent: January 25, 2000 2:11 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Moving the view around on a sphere


I'm trying to write a MovementBehavior class that moves (translates/rotates)
the view in a way that looks like the object is rotating instead of the
view.   I want to use keystrokes to increase and decrease the angle in each
plane that the object appears to be rotated through.  In reality, my view is
moving around on a sphere, always pointing at (0,0,0).

I've thought of using the lookAt method of Transform3D, but would still have
trouble defining which direction is "up", so I'm just creating rotation
matrices and multiplying them by my Transform matrix successively to get the
final transform.  My angle calculations are not quite right, so the object
in my view appears to translate around the screen as I "rotate" it.

Is there an algorithm for manipulating a transform matrix to make the
illusion that the object in the view is rotating through arbitrary angles on
the 3 planes?

Daniel

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

Reply via email to