Results 1 to 11 of 11

Thread: Infinite (circular) QGraphics Scene

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: Infinite (circular) QGraphics Scene

    Quote Originally Posted by oxygen77 View Post
    We have already coded this part. We have a system that handle a double cache: one on the disk for already genereated tiles, another one in memory for the recently drawn tiles. For missing tiles we generate them using a multi-threaded system.

    We are drawing other info on the map like wind, Point Of Interest, ...

    Our current problem is to use the scene/view system in a way we can have a circular map
    I understand that. Consider the simple case, where the view is only a small portion of the entire (world) map; simplify further and consider that the tiles consist only of a single row, instead of the two dimensional array that would really be used, and that there are only ten tiles, numbered 0-9. The view determines where it is centered and the extent of the view and sends that information off the the tile server. The server determines which tiles are needed to fill that particular view, and their arrangement. Let's say the server determines that tiles 4, 5 and 6 are required; it sends those tiles, along with some information about how they should be displayed, in this case simple ordering will do: 4 5 6. Now, if there are only ten tiles that span the entire map, let's look at the case where things need to "wrap around": the server determines that tiles 8, 9 and 0 are needed, and that they should be displayed in that order: 8 9 0. Or it determines that tiles 9, 0 and one are needed in the order 9 0 1. The wrapping problem is solved, and only the portions of the map needed (plus a small amount that slops over the view edges) are required.

    This is how GIS handle such things.

    If you are trying to visualize the entire span of the map, the same approach works, but your single tile is the size of the map. You can make the client smart enough to reuse that single tile without too much trouble.

  2. #2
    Join Date
    Feb 2011
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Infinite (circular) QGraphics Scene

    I suspect that what is blocking us for now is that we use the scene/view mechanisms to handle part of the pan and zoom process. This way we need an almost infinite scene

Similar Threads

  1. QGraphics View Scene performance with polylines
    By iampowerslave in forum Qt Programming
    Replies: 0
    Last Post: 15th November 2010, 18:03
  2. MouseEvent in QGraphics Scene?
    By fanatos in forum Newbie
    Replies: 1
    Last Post: 9th September 2010, 18:39
  3. infinite loop
    By zakis in forum Qt Programming
    Replies: 1
    Last Post: 4th November 2009, 18:52
  4. Circular scale
    By fruzzo in forum Qwt
    Replies: 1
    Last Post: 6th March 2008, 08:20
  5. Is there a circular reference here?
    By rh in forum General Programming
    Replies: 3
    Last Post: 22nd January 2006, 22:51

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.