Should have said that this was in Java3D OpenGL Windows RELEASE 1.2.1
though the classes affected are platform independent.
Best Regards,
Peter Balmforth
-----Original Message-----
From: Peter Balmforth [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 15:58
To: [EMAIL PROTECTED]
Subject: [JAVA3D] AxisAngle.set(Matrix3d) incorrect for rotation of PI
AxisAngle4f.set(Matrix3d) sets the wrong values when the rotation
is PI about the Y axis. I think it will occur with some of the
similar combinations of classes as well.
The following bit of code demonstrates it. Because the
rotation is PI the method assumes it is an identity matrix
and defaults the axis angle to (0.0,1.0,0.0,0.0) when it should be
(0.0,1.0,0.0,3.1459).
import javax.vecmath.*;
public class TestAxisAngle
{
public static void main(String []args)
{
Matrix3d rotation = new Matrix3d();
rotation.rotY(Math.PI);
AxisAngle4f orientation = new AxisAngle4f();
orientation.set( rotation );
System.out.println( "Rotation=" + rotation.toString() );
System.out.println( "Orientation=" + orientation.toString() );
}
}
===========================================================================
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".