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

WIP: Viewport collision detection port #10103

Closed
wants to merge 101 commits into from
Closed

WIP: Viewport collision detection port #10103

wants to merge 101 commits into from

Conversation

ChrisLoer
Copy link
Contributor

Port of mapbox/mapbox-gl-js#5150.

Current plan is to do chunks of porting work as PRs into this branch, with the expectation that test won't pass for a while.

/cc @ansis @mollymerp @nickidlugash

ChrisLoer and others added 24 commits October 31, 2017 10:25
 - Adds "placeFirstAndLastGlyph" which can be called from CollisionIndex
 - Doesn't add JS-specific projection/glyph hiding optimizations
 - Only testing is a brief exercise of the previously existing line projection logic -- this still needs to be hooked up to more code to actually be useful.
…ement for `CollisionTile`.

No support for line-labels/circles yet.
Compiles but not tested.
[skip ci]
Boxes are still used instead of circles, but it would be pretty easy (if not necessarily most performant) to add a circle geometry refinement to the tree-querying logic.
Compiles but not tested.
[skip ci]
 - Dynamic buffers not hooked up yet
 - Circles not hooked up yet
- Stops crash on inserting line labels
- Breaks queryRenderedSymbols for now.
[skip ci]
 - Naive copy-pasting of collision box code: should factor out more of the commonalities
 - "Used circle" logic seems to be working correctly
 - Rendering seems to break if there are too many circles (probably something to do with segment logic?)
[skip ci]
and make `Placement.commit(...)` return whether anything changed.
Move 'circle' type from `mapbox::geometry` to `mbgl::geometry` since it's not a GeoJSON type.
… use in FeatureIndex (which could use ints instead of floats and could use a smaller version of IndexedSubfeature).

Add explicit constructors for IndexedSubfeatures to keep the symbol vs. non symbol use case clear.
…nsferred collision data from the background to the foreground, and that pathway has been removed.
Use mapbox::geometry::envelope to calculate query box instead of rolling our own.
…redSymbols.

This is necessary for handling the case where the feature is not projected onto the screen for the tile with wrap 0, but is onscreen for a tile with a different wrap.
We may want to address these before merging, but I want to get CI passing so we can start catching regressions.
@ChrisLoer
Copy link
Contributor Author

WIP branch closed, final changes are in PR #10436.

@ChrisLoer ChrisLoer closed this Nov 16, 2017
@jfirebaugh jfirebaugh deleted the start-collision branch July 27, 2018 22:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants