Re: standard matrix with aspect ratios

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.


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