summaryrefslogtreecommitdiff
path: root/src/mbgl/map/transform_state.hpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Add min and max pitch optionsJuha Alanen2020-02-201-0/+8
|
* [core] Simplify Placement::addLayer()Mikhail Pozdnyakov2020-01-221-1/+2
|
* [core] Refactoring transform state (#15956)zmiao2019-12-051-15/+137
| | | | | | | | | | * [core] Refactoring transform state class * [core] update matrix in transform, Fix precision * [core] Make matrix mutable so that we only update them when needed * [core] Add getters for matrices
* [core] make padding optional when camera position is requested.Łukasz Paczos2019-08-291-1/+1
| | | | When padding is not provided, the current one that's cached in the TransformState is going to be returned.
* [core] Fix tileCover / TileCoordinate fromScreenCoordinate(#15442)Aleksandar Stojiljkovic2019-08-231-0/+3
| | | | | | | Remove unecessary tile coordinate unproject -> project step. Unproject+project isn't always a noop and this was the issue leading to wrong cover calculation in high pitch values. Fixes: https://github.com/mapbox/mapbox-gl-native/issues/15442
* [core] Fix collision with content insetsAleksandar Stojiljkovic2019-07-171-4/+4
| | | | | | | | | | | | | | | Viewport center offset usage was wrongly submitted in #14664. It was part of alternative approach that used enlarged viewport. Existing and added tests were not sufficient to spot the regression, since the collision check padding is usually larger than the center offset x and y. Annotation picking has tolerance of only 10 pixels but no annotation integration test was using content insets. Usage of offset is not needed because `posMatrix` in e.g. `CollisionIndex::projectPoint(const mat4& posMatrix, const Point<float>& point)` already incorporates center offset (projection matrix) and the code in current master was just offsetting all by the value. Modified [ios] MGLAnnotationViewIntegrationTests.testSelectingAnnotationWithCenterOffset to use different insets. It verifies the fix. Fixes [iOS] Annotations are not selectable (added via iosapp menu) #15106: In case of #15106, view's original content insets is {top:88, bottom:34}, causing that center offset is {x:0, y:27} and selection with tolerance of 10 wouldn't select annotation. After tapping the view, so that the header gets removed, view's content insets get changed to {top:44, bottom:34}, center offset is {x:0, y:5} and annotation selection would work, as described in #15106. Fixes: #15106
* [core] TilePyramind uses TransformState::getScale()Mikhail Pozdnyakov2019-06-101-0/+3
|
* [core] Offset viewport center when edge insets are specifiedAleksandar Stojiljkovic2019-05-281-0/+6
| | | | | | | | | | | | | | | | | | | | | The change is implemented in TransformState::getProjMatrix, the rest of the code is making sure that existing API contracts stay and there are tests verifyingrendering and render query processing only items within screen and given tolerance around screen edges. MapView: don't bake edge insets into relalculated camera center. Keep edge insets as property of camera in TransformState (similar to pitch, zoom, bearing) independent from specified camera center. Interpolate edge insets in animation. iOS Demo app: "Turn On/Off Content Insets" pitch the camera and navigate to convenient location in Denver, where streets are parallel to cardinal directions, to illustrate viewport center offset when edge insets are set. Tests: ViewFrustumCulling: although Annotations are deprecated, queryRenderedFeatures related tests in Annotations would need to get ported and decided to add the edge insets related query tests next to them. Verify frustum culling (render+queryRenderedFeatures) With different camera and edge insets setups. TODO: port Annotations tests. Transform.Padding: Verify that coordinates take proper place on screen after applying edge insets. LocalGlyphRasterizer: verify text rendering when applying padding. Related to #11882: both use projection matrix elements [8] and [9]. Alternative approach to this was to increase and offset map origin so that the screen would be a sub-rectangle in larger map viewport. This approach has a drawback of unecessary processing the items that are outside screen area. Fixes #12107, #12728, navigation-sdks/issues/120
* Refactor: coordinatePointMatrix skip recomputation (#14507)Aleksandar Stojiljkovic2019-05-131-1/+1
| | | | | | | | coordinatePointMatrix is always used with getZoom(): Projection::worldSize(scale) / std::pow(2, z) is computed as scale * util::tileSize / std::pow(2, z) scale is equal to std::pow(2, z). ____________________________________=> Projection::worldSize(scale) / std::pow(2, z) => util::tileSize.
* [core] Remove optional from Map::setLatLngBounds()Ander Conselvan de Oliveira2019-03-141-3/+3
| | | | | | | | This is a first step into grouping together bounds related Map methods into one that takes a "BoundOptions" object. LatLngBounds::unbounded() replaces an undefined optional<LatLngBounds>. v2: Document LatLngBounds::unbounded()
* [core] Remove support for setting minimum and maximum pitchAnder Conselvan de Oliveira2019-03-141-6/+0
| | | | | | | | | Support for limiting pitch was introduced in commit c4fc89977bcb ([core] Added {set,get}{Min,Max}Pitch) in 2017 but was never exposed by the platform SDKs. Simplify the Map interface by removing this unused feature. v2: Add util::PITCH_MIN
* [core] Transform{State}: s/angle/bearing/Bruno de Oliveira Abinader2019-03-041-2/+2
|
* [core] Introduce mbgl::RendererStateBruno de Oliveira Abinader2018-10-191-0/+1
|
* [core] Add TransformState::getCameraOptions()Bruno de Oliveira Abinader2018-10-191-0/+3
|
* [core] fix circle querying for scale and alignmentChris Loer2018-04-261-0/+1
| | | | | | | This fixes circle querying for cases where either circle-pitch-alignment=map or circle-pitch-scaling=viewport
* [core] align raster imagery rendering to pixel rid to avoid blurrinessKonstantin Käfer2018-01-241-1/+1
|
* [core, node] Support axonometric renderingLauren Budorick2017-10-141-0/+3
|
* [core] TransformState::getIntegerZoom should be uint8_tBruno de Oliveira Abinader2017-09-151-1/+1
|
* Set Default MaxZoom to 22Asheem Mamoowala2017-08-211-1/+1
|
* [core] Improved label pitch-scaling: approximate collision box shapes based ↵Chris Loer2017-07-111-0/+2
| | | | on tile distance from camera.
* [core] Make TransformState LatLngBounds optionalBruno de Oliveira Abinader2017-06-011-3/+4
|
* [core] Render fill-extrusion layers (#8431)Lauren Budorick2017-04-271-1/+1
|
* [all] Remove redundant scale-related camera methodsJohn Firebaugh2017-04-131-1/+0
| | | | We don't need to have two different measurement systems for map zoom.
* [core] Added {set,get}{Min,Max}PitchBruno de Oliveira Abinader2017-04-111-0/+6
|
* [core] Added Map::{get,set}LatLngBoundsBruno de Oliveira Abinader2017-04-111-0/+4
|
* [core] Move {Map,Transform}::{get,set}{Min,Max}Zoom to bounds pragmaBruno de Oliveira Abinader2017-04-111-2/+4
|
* [core] Updated Size::isEmpty and TransformState::valid checksBruno de Oliveira Abinader2017-04-101-0/+4
|
* [core, ios] replace `altitude` with `fov`Ansis Brammanis2016-12-211-2/+7
| | | | | | | | | ported from -js: eb6c6596c6a7a61363d30356674e0002153b1d19 `altitude` was a terribly-named variable that was used to indirectly control the fov. This should eliminate some confusion. `altitude` was equivalent to `cameraToCenterDistance / height`
* Revert "[core] Don't use GL_LINEAR if panning w/o rotation nor pitch"Bruno de Oliveira Abinader2016-11-011-0/+1
| | | | This reverts commit a70bfd89108cf1aef75181819ae43e550a69255e.
* [core] Don't use GL_LINEAR if panning w/o rotation nor pitchBruno de Oliveira Abinader2016-10-311-1/+0
|
* [core] change std::array<uint16_t, 2> to mbgl::SizeKonstantin Käfer2016-10-271-3/+3
|
* [core] Move TransformState::{un,}project() to ProjectionBruno de Oliveira Abinader2016-10-191-4/+1
|
* [core] Move TransformState::worldSize() to ProjectionBruno de Oliveira Abinader2016-10-191-4/+3
|
* [core] code style cleanupsKonstantin Käfer2016-07-011-1/+1
| | | | | | | - puts function definitions in a namespace ... {} rather than using namespace ...; - remove trailing whitespace - add trailing newline - protect SQL statements from being formatted by clang-format
* [core] Separate pattern size from draw-time variablesBruno de Oliveira Abinader2016-06-151-2/+3
| | | | Part of https://github.com/mapbox/mapbox-gl-shaders/issues/1.
* [core] use #pragma once instead of ifdef include guardsKonstantin Käfer2016-05-251-4/+1
|
* [core] Rewrite TileCoordinate in terms of geometry.hpp pointJohn Firebaugh2016-05-171-4/+3
|
* [core] Added Viewport modeBruno de Oliveira Abinader2016-05-111-2/+6
| | | | | | Satisfies embedding platforms that requires the viewport coordinate systems to be set according to its standards e.g. viewport mirrored vertically.
* [core] move Painter and dependents to new *TileID classesKonstantin Käfer2016-05-101-2/+2
|
* [core] Use geometry.hpp's pointJohn Firebaugh2016-05-051-1/+0
|
* [core] Coordinate wrapping fixesBruno de Oliveira Abinader2016-03-101-2/+2
| | | | | | | | | | | | | | | - Make returning LatLngs unwrapped by default. - PointAnnotation and ShapeAnnotation are always wrapped so they can be selected via intersection from the visible tile boundaries. - Fixes LatLng::wrap() calculation. - Fixes LatLng::unwrapForShortestPath() calculation. The new unwrapForShortestPath algorithm unwraps the start coordinate either forwards or backwards depending on the end coordinate value, so we can always cross the antimeridian when needed and still obtain a wrapped end coordinate in the end. Fixes #4214.
* [core] Use TransformState::worldSize() whenever possibleBruno de Oliveira Abinader2016-03-031-2/+2
|
* [core] Added DEGREES_MAX as constant valueBruno de Oliveira Abinader2016-03-011-1/+1
|
* [core] Moved TileCoordinate to tile cover scopeBruno de Oliveira Abinader2016-03-011-9/+2
|
* [core] Cleared TileCoordinate from PainterBruno de Oliveira Abinader2016-03-011-4/+5
|
* [core] PrecisionPoint is now ScreenCoordinateBruno de Oliveira Abinader2016-03-011-6/+6
|
* [core] Get rid of mbgl/util/vec4 - use vec4 from vec.hpp insteadBruno de Oliveira Abinader2016-03-011-1/+0
|
* Merge branch 'release-ios-v3.1.0'Minh Nguyễn2016-02-241-0/+3
|\
| * [core, ios, osx] Only constrain after adding to a windowMinh Nguyễn2016-02-101-0/+3
| | | | | | | | | | | | Introduced a setter/getter for constrain mode. On iOS and OS X, the zoom level inspectable causes the zoom level to be set independently from the longitude and latitude. Thus, the latitude inspectable had no effect because the latitude was constrained to 0 at z0. Temporarily removing the heightwise constraint allows the map to center on the intended location before zooming, which is the usual case for storyboards and XIBs. On iOS, the only guarantee we have timing-wise is that all the inspectables are applied after initialization but before the view is added to a window. So we reimpose the heightwise constraint as soon as the view is added to a window, that is, before the user has a chance to pan the map out of bounds. Fixes #3868.
* | [core] Refactor tileCoverJohn Firebaugh2016-02-101-3/+1
|/