Hello...
i am not able to understand the behaviour of my animation when using a
RotationInterpolator. My problem is the following:
When i use a RotationInterpolator whith max_angle=90*Math.PI/180 and
max_angle=60*Math.PI/180, i expect a certain geometry to rotate between 60
and 90 degrees ...
I have also an instance of Transform3D called "rotate". Here some code:
rotate.rotZ(alpha)
// Rotation fuer linken Oberarm setzen
rotateUpperLeftArm = new TransformGroup(rotate);
rotateUpperLeftArm.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
alpha=new Alpha(-1,3,0,0,1000,20,0,1000,400,0 );
rotip=new RotationInterpolator(alpha,rotateUpperLeftArm,rotate, (float
(60*Math.PI/180),(float)(80*Math.PI/180 ));
rotip.setSchedulingBounds(new BoundingSphere());
// "Rotationsinterpolator" an "Rotation LO" binden
rotateUpperLeftArm.addChild(rotip);
I noticed when i use
alpha = 0 : No rotation appears
alpha = 60*Math.PI/180: It rotates and somehow seems to work correctly ...
alpha = 10*Math.PI/180: It rotates with a very small angle ...
So can anybody give me an explanation ? How does rotate.rotZ(alpha)
influence the rotation in the animation which is handled by the
RotationInterpolator ?
bye
Dimitri
Wiseguy - 28 Nov 2004 10:45 GMT
> Hello...
>
[quoted text clipped - 9 lines]
>
> rotate.rotZ(alpha)
> So can anybody give me an explanation ? How does rotate.rotZ(alpha)
> influence the rotation in the animation which is handled by the
> RotationInterpolator ?
Don't do this.
rotate.rotZ() changes the real world coordinate system by rotating it
around the Z axis (once, without regard for the rotational
interpolator)...you probably don't want to do that. Carefully review
the sun sample programs.