Hi Kenji,

Yeah, I am working on something like what you suggested.

Two things:

1) rotX,Y,Z() are methods on Transform3D().

2) mul(rx,ry) is not equal to mul(ry,rx)...I think.  Can anyone set me straight on
this?

So the composition of the final transform is not clear to me.  There has to be
a more direct way.

But thanks for the input.  I'm going to sleep on this problem and dream my solution
:-)

Ken Warner

Kenji Hiranabe wrote:

> On Wed, 24 Feb 1999 17:18:42 -0600,
> Ken Warner <[EMAIL PROTECTED]> said:
>
>  > Hi,
>  > Is the source code to javax.media.j3d.Transform3D available somewhere;
>  > somehow??
>
>  > I'd like to add a few methods to it to enable setting the rotation elements
>  > of the transform
>  > without messing up the rest of the transform elements.  For example rotX,Y,Z
>  > futz the scale
>  > and translation elements.  What I want is a rotXYZ(double x, y, z) that
>  > leaves the rest of the
>  > transform elements alone.  The reason I'd like to see the source is to more
>  > or less copy what
>  > rotX,Y,Z does with less damage to the rest of the transform elements.
>
> Use Transform3D.setRotation(Matrix3d) which doesn't change
> other factors(scale and translation).
>
> It's going to something like..
>
> void rotXYZ(Transform3D t3d, double rx, double ry, double rz) {
>    Matrix3d rot = new Matrix3d();
>    Matrix3d tmp = new Matrix3d();
>    rot.rotX(rx);
>    tmp.rotY(ry);
>    rot.mul(tmp);
>    tmp.rotZ(rz);
>    rot.mul(tmp);
>    t3d.setRotation(rot);
> }
>
> You can also use eulerAngle, Quaternion, AxisAngle for rotating.
>
> Transform3D depends on javax.vecmath.Matrix[34]d and an
> unofficial source code for vecmath package is available from;
>
>   http://www.esm.co.jp/divisions/open-sys/java/vecmath/
>
> ---
>   Eiwa System Management, Inc.             http://www.esm.co.jp/
>   Kenji Hiranabe                           E-Mail: [EMAIL PROTECTED]
>
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to