Hello,
I'm trying to to have an object translated using a PositionInterpolator. But
for some reason I am unable to change the direction of the translation. Here
is the relevant piece of the code:
Transform3D translate = new Transform3D();
Vector3f translationVector = new Vector3f(-1.0f, 0.0f, 0.0f);
translate.setTranslation(translationVector); // not really useful, I know.
TransformGroup translateTG = new TransformGroup();
translateTG.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
PositionInterpolator mover = new PositionInterpolator(
new Alpha(-1, 4000),
translateTG,
translate,
0.0f, 3.0f);
Now, no matter what I initialize translationVector too, the object (the good
old ColorCube attached to the TransformGroup) gets translated in the
same direction.
According to the API docs for PositionInterpolator, the object
(TransformGroup that is) is translated along the x axis in the co-ordinate
system defined by the Transform3D given to the constructor.
What am I missing? Why doesn't changing the translation vector have any
effect? I am not just changing the magnitute. I can change it to
(1.0f, 2.0f, 3.0f) or (1.0f, 0f, 50f) - no change.
Also, what is the relationsip between the vector and the co-ordinate system?
For example, when defining a plane, one typically uses a normalized vector
perpendicular to the plane. What is the equivalent relationship in defining
a co-ordinate system?
Thank you,
--
/ Peter Schuller, InfiDyne Technologies HB
PGP userID: 0x5584BD98 or 'Peter Schuller <[EMAIL PROTECTED]>'
Key retrival: Send an E-Mail to [EMAIL PROTECTED]
E-Mail: [EMAIL PROTECTED] Web: http://scode.infidyne.com
===========================================================================
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".