Hi,
See Transform3D:
/**
* Places the quaternion equivalent of the normalized rotational
* component of this transform into the quaternion parameter;
* places the translational component into the Vector parameter.
* @param q1 the quaternion representing the rotation
* @param t1 the translation component
* @return the scale component of this transform
*/
public final double get(Quat4d q1, Vector3d t1)
/**
* Gets the possibly non-uniform scale components of the current
* transform and places them into the scale vector.
* @param scale the vector into which the x,y,z scale values will be placed
*/
public final void getScale(Vector3d scale)
and
vecmath.AxisAngle4d
/**
* Sets the value of this axis-angle to the rotational equivalent
* of the passed quaternion.
* If the specified quaternion has no rotational component, the value
* of this AxisAngle4d is set to an angle of 0 about an axis of (0,1,0).
* @param q1 the Quat4f
*/
public final void set(Quat4d q1)
- Kelvin
>MIME-Version: 1.0
>Date: Thu, 11 Jan 2001 11:28:42 +0100
>From: Thijs Maenhout <[EMAIL PROTECTED]>
>Subject: [JAVA3D] extracting scale,translation, rotation vectors from a transform m
>atrix
>To: [EMAIL PROTECTED]
>
>Hi there,
>
>I am wroking on project to write the scenegraph to disk but ( You can guess
>it) I'am having a problem right here. The filestructure i write to is the
>VRML format. I write geometry and appearance of a shape3d to disk but when
>I try to write a transform3d I get stuck. The problem is that i can only
>get the transformation-matrix. Now is my question: How do I extract the
>scale, translation and rotation vector from this matrix?
>
>this is what I get with the Transform3d.get(Matrix4d) method :
>
>[[ m00 m01 m02 m03 ]
>[ m10 m11 m12 m13 ]
>[ m20 m21 m22 m23 ]
>[ m30 m31 m32 m33 ]
>
>and this is what I want to obtain:
>Vector3d trans // (t1,t2,t3)
>Vector3d scale // (s1,s2,s3)
>Vector3d rotate // (r1,r2,r3)
>double rotangle // rotationangle
>
>Any help is welcome. If you got a code snippet please help me.
>
>Thanks a lot!
>
>
>mailto:[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".