On Mon, 19 Mar 2001, Geoff Morris wrote:

> I found it amazing that, XYZ world coordinates rotation is equivalent to ZYX
> local coordinates rotation. In code something like this?
>         Matrix3d rotationMatrixX = new Matrix3d();
>         Matrix3d rotationMatrixY = new Matrix3d();
>         Matrix3d rotationMatrixZ = new Matrix3d();
>         rotationMatrixX.rotX(rotateX);
>         rotationMatrixY.rotY(rotateY);
>         rotationMatrixZ.rotZ(rotateZ);
>         rotationMatrixZ.mul(rotationMatrixY);
>         rotationMatrixZ.mul(rotationMatrixX);
>         transform.setRotation(rotationMatrixZ);

I guess the method "Transform3D.setEuler(Vector3d angles)" can help saving
a couple of multiplications and temporary matrix.

the previous code would be equivalent to:

  Vector3d tmpvect = new Vector3d(rotateX, rotateY, rotateZ) ;
  transform.setEuler(tmpvect) ;


please, correct me if I'm wrong.

regards,
Fabrizio Nunnari

--
http://digilander.iol.it/fnunnari

   Fabrizio Nunnari <[EMAIL PROTECTED]>
 -Student at Computer Science Department of Turin (Italy)-
Voodoo Chile of DeGeNeRaTiOn  for the Amiga scene --> Coder

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