Andreas,

I'm a newbie to j3d, but since there have been no answers I'll give it a
shot. I ran into the same problem and found all I had to do was restart
the associated Alpha to (re)initiate the interpolator. I believe the
interpolator is still active and testing alpha.finished(). Arguably this
does leave a bunch of interpolators active all waking up every frame,
but I could find no other solution (I was writing a Rubik's Cube program
as a self-teaching exercise, and reusing interpolators for the various
cube rotations. I am also resetting each interpolator's Target
transform.)

I had the same notion of using WakeOnBehaviorPost, but not having
sources to any of the Behavior classes, e.g. TransformBehavior, I
couldn't figure out how to correctly override processStimulus without
causing other problems.

Jack

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]] On Behalf Of Andreas Bauer
Sent: Wednesday, September 04, 2002 2:54 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] reusing interpolators


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am using an PositionPathInterpolator to move a unit around. Is there
an easy
way to use reuse the interpolator after he has once finished?
The problem I see is that the interpolator isn't wakedup anymore after
the
alpha object has finished. Unfortunatly, the wakeup criterion can only
be set
from processSitimuli and initialize.
Simply calling initialize doesn't work, and letting the Alpha stay at 1
for
ever, so the interpolator doesn't end is I think a little bit
inperformant.

The idea I have is to subclass the interpolator and add a
WakeUpOnBehaviourPost of another behavior. When the interpolator must be
reused, the secound Behavior would post the event, the interpolator
would
wake up. Would this work or is there a simpler solution. I
It would be nice to have a reinitialze method in behavior.

Greeting,

- --
Andreas Bauer
[EMAIL PROTECTED]

May the penguin be with you!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9dlbnaHjQVZOZP3YRAiYTAKCzS8mZFzL7j/7IDQ5X/9Hywh+4xgCgmsPd
axu2iHDRHfqMEF93Nlrto1k=
=x6rO
-----END PGP SIGNATURE-----

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