Results 1 to 3 of 3

Thread: View.setAltitude issues?

  1. #1
    Senior Member
    Join Date
    Jun 2007

    Default View.setAltitude issues?

    Hi all,
    I was trying to figure out what the issues are that causes that method to not be implemented and discovered that a very simple implementation seems to basically work the way I expect it to, so I wondered what the hidden complications were that I was missing.

    I know I'm not normalizing or preventing collisions with the globe or clipping plane, but works as a workaround for now.

    public void setAltitude(double newAltitude)
    this.altitude = newAltitude;
    this.eyeDist = altitude;

  2. #2
    WWJ Consultant patmurris's Avatar
    Join Date
    Jun 2005
    Saint-Paul de Vence, Alpes Maritimes, France
    Go To My Homepage: Go to patmurris's homepage


    You can probably just use the setZoom() of the BasicOrbitView to the same effect.
    My World Wind Java Blog & Plugins page

  3. #3
    Senior Member
    Join Date
    Jun 2007


    Actually, no.

    setZoom sets eyeDist but not altitude, so depending on when I try to set the initial zoom of my display it gets reinitialized back to the default altitude which is way out in space.

    To be a little more clear, I create my WorldWindow in a tab that isn't visible until clicked on. The View doesn't end up getting initialized until the first time it's painted and BasicOrbitView.initializeAttributes will set eyeDist to whatever getInitialAltitude returns. setZoom would probably work fine if the WorldWindow was visible when it is created because the timing would work right. As is, I'd have to do a FocusListener or something to reset the zoom once the window become visible. I think setAltitude makes more sense though.

    Last edited by remleduff; 07-10-2007 at 06:04 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts