Nikolai,

See if the following modifications are what you're looking for:

  .....
  t.getRotationScale(rotationScale);

  // begin mods:
  double tscale = t.getScale();
  rotationScale.mul( 1.0 / tscale );
  // end mods:
  .....

Your test results should now be identical.

AxisAngle4d.set( Matrix3d ) probably needs a pure rotation matrix.
Specifically, can it handle embedded nonuniform scale factors ? May be Chien
can verify this.

Vaidya

>On Wed, 28 Apr 2004 16:12:41 +0200, Nikolai V. Chr. <[EMAIL PROTECTED]> wrote:

>Thy the code below. You will see that setting a translation makes the
>rotation values wrong. Translation values are not even present in a
>Matrix3d, so how can this be??
>
>Try comment the "t.set(new Vector3d(10,0,10));" line out, and observe
>the different result.
>
>import javax.media.j3d.*;
>import javax.vecmath.*;
>
>public class RotationTest {
>
> public RotationTest() {
> }
>
> public static void main(String[] args) {
>  Transform3D t= new Transform3D();
>  Matrix3d rotationScale = new Matrix3d();
>  AxisAngle4d rotation = new AxisAngle4d(0, -1, 0, Math.PI/2);
>  System.out.println(rotation);
>  t.set(new Vector3d(10,0,10));
>  t.setRotation(rotation);
>  t.setScale(0.5d);
>  t.getRotationScale(rotationScale);
>  rotation.set(rotationScale);
>  System.out.println(rotation);
> }
>}
>
>Test result:
>(0.0, -1.0, 0.0, 1.5707963267948966)
>(0.0, -1.0, 0.0, 2.0344438552856445)
>
>
>Any workaround will be appreciated
>
>Regards
>Nikolai
>
>----------------------------------------------
>Nikolai V. Christensen, Computer Engineer,
>Simulation and Training department
>IFAD, Forskerparken 10A, DK-5230 Odense M
>Denmark, EU
>Phone: +45 63 15 71 31 Fax: +45 65 93 29 99
>WWWeb: http://www.ifad.dk
>e-mail: [EMAIL PROTECTED]
>----------------------------------------------
>
> ==========================================================================
>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