Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Global/Viewport Collision Detection #10436

Merged
merged 21 commits into from
Nov 17, 2017
Merged

Commits on Nov 17, 2017

  1. [core] Add CrossTileSymbolIndex.

    This class is responsible for tracking which symbols are "the same" between tiles at different zoom levels, so that symbol opacities (fade animations) can be copied smoothly between tiles.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    6c2bdad View commit details
    Browse the repository at this point in the history
  2. [core] Add circle geometries to GridIndex.

     - Adds early exiting "hitTest" query for fast collision detection
     - GridIndex now determines cell count separately for x and y axes based on grid dimensions.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    f1830ad View commit details
    Browse the repository at this point in the history
  3. [core] Add Placement class.

    Responsible for running global collision detection/symbol placement algorithm and updating symbol opacity buffers accordingly.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    6a27228 View commit details
    Browse the repository at this point in the history
  4. [core] Add global CollisionIndex to replace CollisionTile.

     - Switches from tile to viewport coordinates
     - Represents line labels with circle geometries
     - Projects line labels at collision detection time to improve accuracy
     - Adapts tile-based symbol queries to viewport coordinates
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    2f0f9c8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0e5dd48 View commit details
    Browse the repository at this point in the history
  6. [core] Switch from background to foreground placement

     - Background placement code now just generates static symbol buffers
     - Don't render GeometryTiles until their symbols are loaded. This is necessary for the CrossTileSymbolIndex to successfully prevent flicker.
     - SymbolInstances are transferred to SymbolBucket for use on foreground during collision detection
     - Symbols are sorted on foreground by sorting their index buffer but leaving vertex buffers intact (only works within one segment)
     - Vertical glyphs are generated at same time as horizontal glyphs. `reprojectLineLabels` chooses which one to use at render time and hides the other.
     - Icons are now always represented with a single collision box, even if they're placed along a line (this means their rotation alignment may be wrong, but the approach of representing them with multiple collision boxes wasn't very accurate either).
     - Generate vertices for new debug collision boxes and collision circles
     - Only add symbols within tile boundaries (reduces work, avoids double-draw)
     - Update symbol_projection.cpp to support line label projection calls from CollisionIndex.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    6f2b057 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e00f68a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    684254d View commit details
    Browse the repository at this point in the history
  9. [core] Use floats instead of ints for Shaping.

    Brings gl-native shaping closer to gl-js.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    735f2e6 View commit details
    Browse the repository at this point in the history
  10. [core] Remove dead code

     - CollisionTile
     - FrameHistory
     - PlacementConfig
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    90fc4c1 View commit details
    Browse the repository at this point in the history
  11. [core] Update unit tests for viewport collision.

    Add 'GridIndex' unit test.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    eea18bb View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    44bd873 View commit details
    Browse the repository at this point in the history
  13. [core] Added ignores for two query tests that return the same set of …

    …items but in a different order.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    7810b4b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3aab596 View commit details
    Browse the repository at this point in the history
  15. [core] Split MapMode::Still into Static and Tile

    `Tile` makes sure the symbols in the resulting tile are tileable while
    symbols in `Still` match rendering in `Continuous` mode.
    ansis authored and ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    cb36bc1 View commit details
    Browse the repository at this point in the history
  16. [core] Skip fade animation for placed symbols that are currently offs…

    …creen.
    
    Don't mark items that are outside the collision grid range as placed.
    Requires new ignore because GL JS issue #5654 allows insertion of symbols outside the CollisionIndex range, and those symbols can cascade in to affect items within the viewport.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    6505b20 View commit details
    Browse the repository at this point in the history
  17. [core] Sort child symbol tiles before parent symbol tiles

    This is necessary so that when there are mixed zoom levels, child symbols get placed before parent symbols.
    ansis authored and ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    2519b29 View commit details
    Browse the repository at this point in the history
  18. [core] Remove ignores for passing tests.

    Update ignore links to specific issues.
    Bump mapbox-gl-js version to get latest text-pitch-spacing test.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    af903a3 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    64b1668 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    b2b91bf View commit details
    Browse the repository at this point in the history
  21. [core] Symbol cross-fading.

     Hold onto tiles after they've been removed from the render tree long enough to run a fade animation on their symbols.
    ChrisLoer committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    40e7356 View commit details
    Browse the repository at this point in the history