Hi,
How can I specify a translation in the local coordinate system?
Say, I have a RotPosPathInterpolator interp for the TransformGroup
trans. I want to translate the subgraph of trans by a vector v
relatively to the local coordinate system.
A possibility is, to multiply the vector v by the actual transform, add
it to the acual position and achive the translation from this actual
position to the transformed vector.
--------------------------------------------------
Vector3f actualPosition= new Vector3f();
Transform3D t3d= new Transform3D();
trans.getTransform(t3d);
t3d.transform(v);
t3d.get(actualPosition);
v.add(actualPosition);
interp.setPosition(0,new Point3f(actualPosition.x,
actualPosition.y,
actualPosition.z));
interp.setPosition(1,new Point3f(v.x, v.y, v.z));
//initialise alpha.
alpha.setStartTime(System.currentTimeMillis());
-----------------------------------------------------------------
Can the same thing be another way be achieved? I�m thinking of using the
method setAxisOfRotPos() of the interpolator to set the coordinate
system to the local one. I did it in this way, but it failed to work as
expected:
Transform3D t3d= new Transform3D();
trans.getTransform(t3d);
interp.setPosition(0,new Point3f(0.0f,0.0f,0.0f));
interp.setPosition(1,new Point3f(v.x, v.y, v.z));
interp.setAxisOfRotPos(t3d);
//initialise alpha.
alpha.setStartTime(System.currentTimeMillis());
Thank you for any proposition.
===========================================================================
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".