Re: Animation Control for Multiple Displays

Hi Doug,

> I have data like:  time -> ((x,y,z) -> v)
> 
> I have the data in two displays (3D and 2D) and would like to animate
> the data in both and control it with a single AnimationWidget. The
> problem: AnimationWidget needs the ScalarMap (Time -> Animation) but I
> can't add this ScalarMap to both Displays.
> 
> Am I missing something obvious or do I need to create my own animation
> widget? Any suggestions? 

Probably the easiest way to do this is to construct an
AnimationWidget for one display, then get the AnimationControl
of that display and add a ControlListener to it.  In the
controlChanged() method of the ControlListener, call the
getCurrent() method of the first control, and pass its
value to the setCurrent() method of the AnimationControl(s)
of the other display(s).  This approach should work for
two or more displays.  I haven't tried this, but suspect
that it may be hard to absolutely synchronize the
animations of two displays given that rendering can be
slow for complex scenes.

Please let me know if this answer isn't clear or if you
have problems.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html