Re: immersive flythrough

Thanks Bill,

I figured out the transformation matrix and was able to rotate,
translate, and scale the matrix and reposition the display by applying
ProjectionControl.setMatrix(matrix). 
But I am having no luck doing additional transformations. 

How can I get it do do a seemless series of transformations as I get
with the mouse control?

If I multiply the current matrix by a rotation matrix and call setMatrix
multiple times (expecting an animation), it seems that the display
rendering isn't happening fast enough. I've been playing around with
threads trying to get it to sleep or wait. Is there something I need to
do in addition to setMatrix? reDisplayAll didn't seem to help. If
dragging the mouse can produce a smooth rotation, I ought to be able to
do it with function calls.

Thanks,
Doug

"William L. Hibbard" wrote:
> 
> Hi Doug,
> 
> For a DisplayImplJ3D, double[] matrix has 16 elements and
> is organized as the argument to:
> 
>   javax.media.j3d.Transform3D(double[] matrix)
> 
> We have recently seen the behavior you describe, where the
> projection snaps back when you click the mouse.  It is caused
> by:
> 
>   ProjectionControlJ3D pc = new ProjectionControlJ3D(display);
> 
> Try this instead:
> 
>   ProjectionControlJ3D pc = display.getProjectionControl();
> 
> The next update of VisAD will test for the former and throw an
> Exception (basically, you've got a DisplayImplJ3D with two
> ProjectionControlJ3Ds, one for the mouse and one you control).
> 
> Good luck,
> Bill\
> ----------------------------------------------------------
> Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
> whibbard@xxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
> http://www.ssec.wisc.edu/~billh/vis.html
> 

-- 
*----------------------------------------------------------------------*
| Doug Lindholm, Software Engineer          |  E-mail: lind@xxxxxxxx   |
| Research Applications Program             |   Phone: 303-497-8374    |
| National Center for Atmospheric Research  |                          |
| P.O. Box 3000                             |     There's no place     |
| Boulder, Colorado 80307-3000              |        like $HOME        |
*----------------------------------------------------------------------*

  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: