summaryrefslogtreecommitdiff
path: root/test/map/transform.test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [test] Add test for min and max pitch optionsupstream/jmalanen-clamp-pitchJuha Alanen2020-02-201-0/+72
|
* [test] Fix failing tests on iOSJuha Alanen2020-02-141-2/+3
|
* [core] Fix MapSnapshotter build failure on WindowsAnder Conselvan de Oliveira2019-11-131-2/+2
| | | | | | | | MSVC implementation of std::promise is buggy and only works with types that can be default-constructed. To avoid a compilation failure in the instantiation of ask() inside MapSnapshotter::getRegion(), which creates a std::promise<LanLngBounds>, make LatLngBounds' default constructor public.
* [core] Limit pitch based on edge insets. Fix max Z calculation in getProjMatrix.Aleksandar Stojiljkovic2019-08-011-0/+3
| | | | | | | | | | | | | Patch partly fixes #15163 in a way that it doesn't allow loading tens of thousands of tiles and attempt to show area above horizon: Limit pitch based on edge insets. It is not too bad - current limit of 60 degrees stays active until center of perspective is moved towards the bottom, to 84% of screen height. The plan is to split removal of 60 degrees limit to follow up patch. Fix max Z calculation in getProjMatrix. TransformState::getProjMatrix calculation of farZ was complex with possibility to lead to negative z values. Replacing it with simpler, precise calculation: furthestDistance = cameraToCenterDistance / (1 - tanFovAboveCenter * std::tan(getPitch())); TransformState::getProjMatrix calculation of farZ was an aproximation. Replacing it with simpler, but precise calculation. Related to: #15163
* [core] Offset viewport center when edge insets are specifiedAleksandar Stojiljkovic2019-05-281-11/+34
| | | | | | | | | | | | | | | | | | | | | 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
* [core] Remove optional from Map::setLatLngBounds()Ander Conselvan de Oliveira2019-03-141-2/+2
| | | | | | | | 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-19/+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] consolidate Axonometric rendering APISudarsana Babu Nagineni2019-03-081-0/+11
| | | | | | | Instead of having individual APIs for setting axonometric and skew options, create ProjectionMode struct that holds all the relevant options for Axonometric rendering and introduce setter/getter on the Map for those options.
* [core] util::wrap(): std::fmod is not losslessBruno de Oliveira Abinader2019-03-061-80/+84
|
* [core] Transform{State}: s/angle/bearing/Bruno de Oliveira Abinader2019-03-041-11/+11
|
* [core] Use unwrapped longitude for bounds checkBruno de Oliveira Abinader2019-02-261-1/+146
|
* [core] Ensure 'isPanning' is true when panning a full roundBruno de Oliveira Abinader2019-02-261-0/+17
|
* [core] Cleanup Transform, use {jump,ease}To() insteadBruno de Oliveira Abinader2018-11-271-98/+77
|
* [core] Camera center and anchor points are mutually exclusiveBruno de Oliveira Abinader2018-11-261-0/+13
|
* [android] add support for gnustlKonstantin Käfer2018-09-111-2/+4
|
* [core] Check if frameZoom is NaN in Transform::flyTo callbackBruno de Oliveira Abinader2017-06-281-0/+5
|
* [core] Clamp to scale boundaries in TransformState::setLatLngZoomBruno de Oliveira Abinader2017-06-281-0/+16
|
* [core] Make TransformState LatLngBounds optionalBruno de Oliveira Abinader2017-06-011-3/+7
|
* [core] Ignore shortest path in Map::pixelForLatLngBruno de Oliveira Abinader2017-04-141-25/+42
|
* [core] Tighten geo.hpp ctorsBruno de Oliveira Abinader2017-04-141-4/+2
|
* [all] Remove redundant scale-related camera methodsJohn Firebaugh2017-04-131-49/+27
| | | | 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/+18
|
* [core] Added Map::{get,set}LatLngBoundsBruno de Oliveira Abinader2017-04-111-0/+39
|
* [core] Updated Size::isEmpty and TransformState::valid checksBruno de Oliveira Abinader2017-04-101-23/+58
|
* [all] Make LatLng coordinates read-onlyJohn Firebaugh2017-04-061-110/+110
|
* [core] Tighten LatLng and other geo.hpp classesJohn Firebaugh2017-04-061-45/+1
| | | | | * Remove LatLng::null and enforce invariants * Remove unnecessary operator bool()
* [core] Replace MapChange enum with MapObserverBruno de Oliveira Abinader2017-03-151-1/+1
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-3/+3
|
* [core, ios] replace `altitude` with `fov`Ansis Brammanis2016-12-211-7/+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`
* [android][build] core tests - initial setup for rendering testsIvo van Dongen2016-11-271-0/+6
|
* [core] Cleanup TransformState::getIntegerZoomBruno de Oliveira Abinader2016-10-311-0/+23
|
* [core] change std::array<uint16_t, 2> to mbgl::SizeKonstantin Käfer2016-10-271-18/+18
|
* [test] add .test.cpp suffix to test case filesKonstantin Käfer2016-09-281-0/+516