Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / November 2004

Tip: Looking for answers? Try searching our database.

Wanna understand the correct use of RotationInterPolator

Thread view: 
Dimitri Papoutsis - 20 Nov 2004 21:17 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.