Hi Gernot,

maybe you have a sample code for this ?

thanx

-Juergen.

[EMAIL PROTECTED] schrieb:

> Hi Clara,
>
> the problem is, that rtotation takes affect in the local coordinate system.
> For example you take a coordinate system with positive x to the right, pos.
> y up and pos. z coming out from the screen. Apply rotation counterclockwise
> around the y axis. Now, the z axis has the same direction as the former x
> axis. If you now apply a rotation around your z axis, it looks like a
> rotation around the "old" x axis.
> If want to let rotate an object around a coordinate axis and you don't want
> to care about its current orientation, you first have to apply its inverse
> transformation to set the object into its "initial" orientation. Then apply
> your rotiation and transform it back.
>
> Gernot
> [EMAIL PROTECTED]
> http://www.janet.de
>
>                     Clara Dinh
>                     <[EMAIL PROTECTED]>        To:     [EMAIL PROTECTED]
>                     Sent by: Discussion         cc:
>                     list for Java 3D API        Subject:     [JAVA3D] x,y,z rotation 
>and angles
>                     <JAVA3D-INTEREST@JAV
>                     A.SUN.COM>
>
>                     07.02.00 19:50
>                     Please respond to
>                     Discussion list for
>                     Java 3D API
>
> 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".

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