Hi Tobias,
DISCLAIMER: I'm no guru. I'm trying to answer questions like yours to help
myself learn the subject matter.
Here's a quote from the documentation:
axisOfRotation - the transform that defines the local coordinate system in
which this
interpolator operates. The rotation is done about the Y-axis of
this local coordinate
system.
The way I interpret this, you are not really specifying an axis with your
Transform3D;
rather, you are telling the API how a universe would need to be tilted in
order that
spinning your object around that universe's Y axis would spin it in the
direction you
want.
Simplest case: You want to spin your object around its Y axis. In real life
terms, this
is the direction you see revolving doors in malls and hotels rotate. Since
the Y axis
of the universe is already pointing up by default, just construct a
Transform3D(),
which gives you the identity transform, and you're finished!
Another easy one: You want to spin your object around the Z axis. That's
the direction
your laundry spins in most washing mashines; I observed this because my TV
broke
down one evening. Ask yourself: How would I need to tilt the universe so
that its Y
axis ends up where the Z axis is now? Answer: You would need to tilt it 90
degrees
toward you around the X axis. To continue my silly analogies, that's the
axis around
which both the arm and the three drums in a one-armed bandit rotate. So
again construct a
Transform3D(), then do a rotX(Math.toRadians(90)) on it. That's the
transform required
to tilt the universe about the X axis so its Y axis is colinear with
everybody else's Z axis.
That's the transform you'll want to use as an argument in this case.
Other axes work the same way, but become increasingly harder to explain. I
hope I got
the message across with these 2 examples.
I've never tried this; if it fails spectacularly, you may try using
invert() on your transform
before using it. If that also fails, you need a better advisor than me.
At 21:27 27.07.00 +0200, you wrote:
>The method setAxisOfRotation() of rotationInterpolator
>requires a Transform3D object, ie a 4x4 matrix.
>
>How do you represent an axis with a 4x4 matrix?
===========================================================================
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".