Well I don't think thats likely to work.  Because it is in a AWT event and
not in a behavior for one thing.  What I would expect to happen is you push
the button and it will do the 100 transforms in under one frame, thus the
next frame will jump the object to the end destination.  I do the vast
majority of all my transformations without using interpolator behaviors, but
you need to calculate the transformation icnrement on each frame or there is
no animation.

Dave Yazel

-----Original Message-----
From: John Wright [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 8:39 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] How do I move an object without interpolators?


Michael,

That code looks like it should work. Assuming of course the
TransformGroup and it's object are in the scene with appropriate
capability bits set.

- John Wright
Starfire Research

"Michael P. McCutcheon" wrote:
>
> I am used to programming in VRML.  With it, you would have a
> TimeSensor...you would route the timesensor to a particular object, on
which
> you would have a method that was called after each frame.  In this method
> you would update the position of your objects, then when the method
> completed, VRML did it's rendering, and the time sensor would then do it
all
> over again.
>
> What I'm wondering, if I want to move a simple object around from 0 to
-500,
> say in 1 increments, (without using an interpolator, I want to explictly
set
> it my self), how would I do this?  I ran some code like this but it simply
> does not seem to work:
>
> I have this in an event handler of a AWT button:
>
>   for(int counter=0; counter<100; counter++) {
>    z=z-0.2f;
>    translation.set(0,0,z);
>    transform3D.setTranslation(translation);
>    transformGroup.setTransform(transform3D);
>   }
>
> Any tips on what classes I should be looking at to do such a thing the
right
> way?
>
> Thanks for any info...
>
> Mike
>
>
===========================================================================
> 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".

===========================================================================
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".

===========================================================================
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".

Reply via email to