Hi,
  I did something similar in a C++ program a while back.  You may need to
decouple the text from the axis themselves.  Try generating three points, one at
the ends of each axis.  Rotate those three using the same transforms as the
display.  After the rotation, read the coordianates of the three endpoints and
use that as the reference draw postition for the text.  If you always align the
text perpendicular to the viewers line of sight the text will appear to be
anchored to the axis yet always remain readable.
        An idea - Gary

Clara Dinh wrote:

> I've looked through the archives for Java3D and have read the
> messages dealing with obtaining rotation angles and quaternions and
> matrices, etc. However, from all of that information, I still
> haven't been able to fix my problem.
>
> I have a 3D graph, with the standard x,y,z axes and labels.
> When I rotate the graph, the labels rotate with it, as they should.
> However, depending on the direction of rotation, sometimes the labels
> will appear upside down. And I'm trying to resolve this by having
> "moving" labels that will always appear in the front and left sides
> of the graph (labels will flip accordingly as the graph/cube is
> rotated). To do this, I have used various methods to read the rotation
> angles to determine which location to move a label to. I can get the
> x and y angles of rotation fine but am having difficulty getting the
> z rotation angle. For example, if I start off with the standard orientations
> of Y being positive in the up direction, X being positive in the right
> direction, and Z being positive coming out of the screen towards the viewer,
> rotating Y by 90 degrees will have me looking at the Z axis on the
> horizontal. Now, if I try to rotate in the + or - z directions, it
> is the X rotation angle that changes. I got it to work as long as the
> X axis remains horizontal but when X goes vertical, it can't tell
> the difference between X and Z.
>
> Any suggestions would be greatly appreciated.
> Thank you in advance.
> -Clara
>
> ===========================================================================
> 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