Hi Janet,

with setEuler(vector) you can create a transform3D consisting of the same
orientation as vector. You can do your viewpoint navigation with a single
matrix. First you have to transform your viewpoint into the origin of the
coordinate system. Then apply all rotations. Transform back viewpoint into
its former position. Apply translation. You can muliply all matrices
successively and put the result into the transformGroup of your viewpoint.

Gernot
[EMAIL PROTECTED]
http://www.janet.de



                    Janet Song
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]
                    >                           cc:
                    Sent by: Discussion         Subject:     Re: [JAVA3D] rotX and rotY
                    list for Java 3D API
                    <JAVA3D-INTEREST@JAV
                    A.SUN.COM>


                    11.01.00 05:41
                    Please respond to
                    Discussion list for
                    Java 3D API






Hi

Martin, so if i use the Transform3D.setEuler, then i will be able to
combine all 3 rotations (x,y and z) into i matrix? this is important as i
would like to feed this matrix into the keyNavigator.. so far i only sent
in the translation, that's why i cannot turn and look at the onjects when i
am navigating in the scene..

Thanks....

-----Original Message-----
From:   Martijn Vastenburg [SMTP:[EMAIL PROTECTED]]
Sent:   Monday, January 10, 2000 11:57 PM
To:     [EMAIL PROTECTED]
Subject:        Re: [JAVA3D] rotX and rotY

If you multiply seperate rotations, the second rotation will use the
resulting object of the first rotation.
If however you want to do several rotations at once, e.g. roll/pitch/yaw
for
an aircraft, you should use the
Transform3D.setEuler(Vector3d) method.

Hope this helps,
Martijn Vastenburg

> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of Decker, Scott D
> Sent: vrijdag 7 januari 2000 17:47
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] rotX and rotY
>
>
> If you just did this
> Transform3D rotate = new Transform3D();
>
> rotate.rotY(Math.toRadians(90));
> rotate.rotX(Math.toRadians(90));
>
> only the rotation about x would take affect.  This is because
> when you use these
> rotate commands, it clobbers everything else in the matrix.
>
> as in the javadoc for these methods
> public void rotX(double angle)
>
>     Sets the value of this transform to a counter clockwise
> rotation about the x
> axis. All of the
>     non-rotational components are set as if this were an identity matrix.
>
> so, to do the double rotation, you could do this
>
> Transform3D rotateY = new Transform3D();
> Transform3D final_rotate = new Transform3D();
>
> rotateY.rotY(Math.toRadians(90));
> final_rotate.rotX(Math.toRadians(90));
>
> final_rotate.mul(rotateY);
>
> this will give you the double rotation.
>
> Scott
>
>
> Scott Decker
> Research Scientist
> Pacific Northwest National Labs
> [EMAIL PROTECTED]
> please feed the squirrels
>
> ==================================================================
> =========
> 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".

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