Results 1 to 3 of 3

Thread: ViewIteration BasicOrbitView

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    1

    Default ViewIteration BasicOrbitView

    I've been working with the ViewIteration example file. I modified the starting position with:
    BasicOrbitView view = (BasicOrbitView) wwjPanel.getWwd().getView();
    WorldWindowGLCanvas wwjCanvas = wwjPanel.getWwd();
    Position p = new Position(Position.ZERO,1000e5);
    view.addEyePositionAnimator(100, view.getEyePosition(), p);
    wwjCanvas.redrawNow();
    and modified the FollowPath class
    ArrayList<Position> path = new ArrayList<Position>();
    for( double deg=0;deg<360;deg+=60)
    {
    path.add(Position.fromDegrees(0, deg, 1e5));
    }

    But it appears that I only get 1 position animation. I've tried playing with Thread.sleep with limited success. Can anybody help with just a simple animated spin of the earth?

  2. #2
    WWJ Consultant patmurris's Avatar
    Join Date
    Jun 2005
    Location
    Saint-Paul de Vence, Alpes Maritimes, France
    Posts
    3,383

    Default

    The view interface and implementation is being worked on right now. Try to update to the latest build. Sorry for the trouble.

    I'm not yet very familiar with the new view animation api, but from the ViewIteration example, it seems you need to stack several position animators to follow a path:
    Code:
    // From FollowPath inner class
    final BasicOrbitView view = (BasicOrbitView) wwjPanel.getWwd().getView();
    for (Position p : path)
    {
       view.addEyePositionAnimator(4000, view.getEyePosition(), 
                   new Position(p, view.getEyePosition().getElevation()));
    }
    Last edited by patmurris; 09-08-2009 at 10:35 PM.
    My World Wind Java Blog & WW.net Plugins page

  3. #3
    Junior Member
    Join Date
    Dec 2009
    Posts
    28

    Default

    I also got only 1 position animation when I ran the ViewIteration example。I think there is a bug!
    Quote Originally Posted by patmurris View Post
    The view interface and implementation is being worked on right now. Try to update to the latest build. Sorry for the trouble.

    I'm not yet very familiar with the new view animation api, but from the ViewIteration example, it seems you need to stack several position animators to follow a path:
    Code:
    // From FollowPath inner class
    final BasicOrbitView view = (BasicOrbitView) wwjPanel.getWwd().getView();
    for (Position p : path)
    {
       view.addEyePositionAnimator(4000, view.getEyePosition(), 
                   new Position(p, view.getEyePosition().getElevation()));
    }
    Last edited by vrnew; 03-02-2010 at 02:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New BasicOrbitView Questions
    By shawngano in forum Development Help
    Replies: 23
    Last Post: 07-31-2008, 02:00 AM
  2. Replies: 3
    Last Post: 03-21-2008, 05:47 PM
  3. BasicOrbitView bug
    By NewDayRising in forum Development Help
    Replies: 2
    Last Post: 10-22-2007, 06:15 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
  •