Re: standard matrix with aspect ratios

Thanks, Bill.  I'll let you know if I have more questions.

Bill Hibbard wrote:
Can do this without undo the aspect ratios of the actual
Display: first call getMatrix to get m1, then use you
mimic of ProjectionControlJ3D.setAspect() to undo the
aspect ratios of m1, then carry on with step 4.


1. Undo the aspect ratios by calling setAspect() again
with the numerical inverses of the aspect ratios (i.e.,
1.0/aspect(0), 1.0/aspect(11), 1.0/aspect(2)).
2. Call getMatrix() to get the matrix = m1.
3. Call setAspect() again to reset the aspect ratios.
4. Call
 MouseBehaviorJ3D.unmake_matrix(rot, scale, translate, m1)
to get the rotation angles, scale, and translations of the
matrix.
5. Call MouseBehaviorJ3D.make_matrix() to make a matrix m2
with the same scale and translations of m1, but with the
rotations for an overhead view.
6. Use MouseBehaviorJ3D.multiply_matrix() to mimic the
code in ProjectionControlJ3D.setAspect() to apply your
aspect ratios to m2.
Something like that.

--
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
        "Time makes everyone interesting, even YOU!"
*************************************************************



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