** High Priority **

First get the camera matrix and set the translation so that the center of the line is 
at the origin.  To do this camera.x = camera.x - line.x.  But this must be done to the 
matrix using the setTranslation method.  Then do your rotation by multipling a 
rotation matrix to the camera matrix.  Now translate the camera back.  There is your 
rotation about the center of the line.

I have attached a behavior which will do what you want.  However, there is no 
documentation in there.  You must use the behavior as normal but the transformGroup 
for the line must be set to the behavior otherwise it will rotate about the origin 
again.

>>> Shawn Sommer <[EMAIL PROTECTED]> 08/07/99 01:00PM >>>
Hi all-
  I am new to the group and I am currently writing a geometric
viewer to help me debug my java application.  I have drawn a
line from (45,143,30) to (48,139,35) and displayed it by moving
the viewpoint to the center of this line.  Now when I rotate the line,
it revolves around 0,0,0 and disappears off the screen.
I do not wish to map these coordinates to 0,0,0.  So how do I
rotate about the center point of this line.

            Thanks in advance, Shawn

[EMAIL PROTECTED]

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

RotationBehavior.java

Reply via email to