I think we still need to clear some things up here.  First you said you
wanted to rotate an object to a known rotation value, so I showed you how
to use the setRotation method to set the object to an exact orientation
about the XYZ axises.  In this case, we just did a SET, we didn't care how
the object was originally orientated (rotation wise).

If you want to rotate an object by an additional amount then all you have
to do is to do a GET on the rotation and put that into a Matrix3d instead
of creating a Matrix3d and setting it to the identity matrix, you set it to
the existing rotation matrix of the object.  Next you create a new rotation
matrix3d and do the rotX, rotY and rotZ with the angles on this
matrix.  Finally you multiple the two matrices together and then to the
setRotation method with this resulting matrix.

This is how you would add a rotation to an object's current rotation.





At 09:41 PM 09/30/2001 -0400, you wrote:
>Well, the rotations that we had discussed before assume that you know the
>component angles for each coordinate.  In some cases, I know the endpoints
>of a cylinder.  Don't know the angle that this cylinder makes with any
>particular axis.  Just know the endpoints.  So how would I transform a
>pair of endpoints into angles that allow me to rotate that cylinder?
>
>-- John
>
>On Sun, 30 Sep 2001, Eric Reiss wrote:
>
> > Date: Sun, 30 Sep 2001 20:42:22 -0400
> > From: Eric Reiss <[EMAIL PROTECTED]>
> > Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA3D] How to rotate objects?
> >
> > I think you need to explain this a little more.  Getting a rotation from
> > points would require a little more explanation.
> >
> > At 08:37 PM 09/30/2001 -0400, you wrote:
> > >Thanks...
> > >
> > >I tried something similar to this but I instantiated the Transform3d with
> > >the rotation matrix as one of the constructor's parameters.  The API
> > >reference says you can do this but it didn't work.  I'll try your
> > >suggestion (using setRotation) and see if that does the trick.
> > >
> > >Oh, one more question... is there an easy way to create a rotation matrix
> > >based on a pair of Points or Vectors describing two endpoints?  I don't
> > >necessarily know the angle for rotations.  Sometimes I start with the
> > >endpoints.
> > >
> > >-- John
>
>--
>_____________________________________________________
>
>John T. Nelson
>President               |    Computation.com Inc
>mail:                   |    [EMAIL PROTECTED]
>company:                |    http://www.computation.com/
>journal of computation: |    http://www.computation.org/
>_____________________________________________________
>"Providing quality IT consulting services since 1992"
>
>===========================================================================
>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".

***********************************************************************
Eric N. Reiss
MEMS Manager
Swanson Center for Product Innovation
Department of Mechanical Engineering
School of Engineering  - University of Pittsburgh

3700 O'Hara Street
647 Benedum Hall
Pittsburgh, Pennsylvania 15261
Phone: 412-624-9696
FAX: 412-624-7701
Email: [EMAIL PROTECTED]
http://www.sigda.org/Eric/
***********************************************************************

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