From: "Fergus Murray" <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 6:06 AM
> I've been experimenting with animating a swarm of T's based on
a trig
> function, and most of the time it looks okay but sometimes the
trailing T
> jerks horribly, and sometimes the whole lot do. Is this
likely to be just
> because I'm not using behaviours to control the animation,
Yes. You've made your Frame Runnable, and you do your
scenegraph updates in its thread, clocked with a sleep(20).
This update schedule has no relationship to whatever the
renderer is using. There isn't any reason to expect you WON'T
get flicker.
The way I understand it, the only way we're guaranteed that the
rendering thread won't step on scene graph updates (or vice
versa) is for us to complete all the scene graph updates in the
processStimulus() method of an active Behavior.
If the answer to the corollary question ("Do we get the same
guarantee on scene graph changes performed by a Thread spawned
within a processStimulus() method?") has been discussed here, I
wasn't smart enough at the time to understand the answer. And I
haven't designed and run the experiments to find out either.
Note that this is the approach recommended here a few days ago
by Raffi Kasparian in "Controlling unpredictable motion" (giving
an active Behavior a Runnable member, and run()-ing it in the
Behavior's processStimulus() method.
Cheers,
Fred Klingener
Brock Engineering
===========================================================================
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".