summaryrefslogtreecommitdiff
path: root/src/mbgl/map/transform.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [all] Merge View into RendererBackendJohn Firebaugh2017-07-261-1/+0
|
* [core] abort early when the dimension is 0Konstantin Käfer2017-07-171-1/+1
|
* [core] Check if frameZoom is NaN in Transform::flyTo callbackBruno de Oliveira Abinader2017-06-281-0/+5
|
* fix #8300 flyTo for close points (#9199)Ansis Brammanis2017-06-061-10/+7
| | | | | | | | | | | | | | The isClose threshold is switched from 0.000001 pixels to 1 pixel. As a backup, it checks whether r0 and r1 are finite. It might be possible to have just the threshold check or just the finiteness check, but I don't see the harm in having both. std::abs(w0 - w1) < 0.000001 is removed because it doesn't look like it's needed. All calculations should run fine even if w0 === w1. Finally, the point interpolation is tweaked so that at the end of the flying (when k === 1) it ends up at the exact end point. I didn't see any bugs related to this, but it seems like a good thing to have explicitly.
* [core] Make TransformState LatLngBounds optionalBruno de Oliveira Abinader2017-06-011-3/+4
|
* [core] Reduce use of RecalculateStyleJohn Firebaugh2017-05-051-11/+7
| | | | | | | * Don't use it to track zoom changes. Instead, Style::update can use the zoom history to check for a change in zoom from the previous frame. * Don't use it to track active property transitions. Style already knows which layers/light have an active transition, and can re-evaluate only those that do. This leaves layer property changes as the only use of RecalculateStyle.
* [core] Ignore shortest path in Map::pixelForLatLngBruno de Oliveira Abinader2017-04-141-6/+1
|
* [core] Tighten geo.hpp ctorsBruno de Oliveira Abinader2017-04-141-2/+2
|
* [all] Remove redundant scale-related camera methodsJohn Firebaugh2017-04-131-35/+11
| | | | We don't need to have two different measurement systems for map zoom.
* [core] Revert use of optional<EdgeInsets>, because EdgeInsets has a natural ↵John Firebaugh2017-04-111-24/+23
| | | | "empty" state
* [core] Added {set,get}{Min,Max}PitchBruno de Oliveira Abinader2017-04-111-2/+12
|
* [core] Added Map::{get,set}LatLngBoundsBruno de Oliveira Abinader2017-04-111-0/+6
|
* [core] Move {Map,Transform}::{get,set}{Min,Max}Zoom to bounds pragmaBruno de Oliveira Abinader2017-04-111-0/+2
|
* [core] Updated Size::isEmpty and TransformState::valid checksBruno de Oliveira Abinader2017-04-101-4/+6
|
* [all] Make LatLng coordinates read-onlyJohn Firebaugh2017-04-061-1/+3
|
* [core] Tighten LatLng and other geo.hpp classesJohn Firebaugh2017-04-061-22/+13
| | | | | * Remove LatLng::null and enforce invariants * Remove unnecessary operator bool()
* [core] Replace MapChange enum with MapObserverBruno de Oliveira Abinader2017-03-151-17/+7
|
* [core] [android] - allow zooming/scaling to use AnimationOptions (#8181)Tobrun2017-02-281-38/+38
| | | [glfw] - allow glfw binding to use AnimationOptions instead of using direction directly
* [core] - allow moveBy to use AnimationOptionsTobrun2017-02-201-2/+2
| | | | [android] - update jni bindings for moveBy with an interpolator
* [build] move logging to utilKonstantin Käfer2016-11-221-2/+2
|
* [core] change std::array<uint16_t, 2> to mbgl::SizeKonstantin Käfer2016-10-271-17/+16
|
* [core] Move TransformState::{un,}project() to ProjectionBruno de Oliveira Abinader2016-10-191-8/+7
|
* [core] Move TransformState::worldSize() to ProjectionBruno de Oliveira Abinader2016-10-191-3/+3
|
* [core] Skip redundant spherical mercator variable updates in {ease,fly}ToBruno de Oliveira Abinader2016-10-191-5/+0
|
* [core] code style cleanupsKonstantin Käfer2016-07-011-35/+37
| | | | | | | - 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] Added mbgl::util::DEFAULT_TRANSITION_EASEBruno de Oliveira Abinader2016-06-201-1/+1
|
* [core] Avoid NaNs in TransformState unit conversionsBruno de Oliveira Abinader2016-05-201-14/+13
| | | | | Fix cases where e.g. state has either zero width or height, causing the unit convertion functions would return NaNs.
* [core] remove MockView and View dependency in TransformKonstantin Käfer2016-05-181-10/+20
|
* [core] Rewrite TileCoordinate in terms of geometry.hpp pointJohn Firebaugh2016-05-171-26/+10
|
* [core] Added Viewport modeBruno de Oliveira Abinader2016-05-111-2/+12
| | | | | | Satisfies embedding platforms that requires the viewport coordinate systems to be set according to its standards e.g. viewport mirrored vertically.
* [core] Use geometry.hpp's pointJohn Firebaugh2016-05-051-17/+3
|
* [core] Privatize math.hpp and vec.hppJohn Firebaugh2016-05-051-1/+2
|
* [core, ios, osx] cameraThatFitsCoordinateBoundsMinh Nguyễn2016-04-221-0/+10
| | | | | | Added an API to get a camera that you can pass into -[MGLMapView setCamera:] that fits the given coordinate bounds, by analogy with -[MKMapView regionThatFits:] or -[MKMapView mapRectThatFits:edgePadding:]. Added mbgl::Map::getCameraOptions() for getting the current camera options more conveniently.
* [core] s/Update::Zoom/Update/RecalculateStyle/Bruno de Oliveira Abinader2016-03-181-2/+2
|
* [core] Check for NaNs in mbgl::util::{min,max,clamp}Bruno de Oliveira Abinader2016-03-181-0/+1
|
* [core] Always return wrapped coordinatesBruno de Oliveira Abinader2016-03-141-1/+1
| | | | | | This fixes an issue in both iOS and Android when e.g. adding a marker on both sides of the dateline border in Taveuni island, the marker in one of the sides would have an out-of-bounds longitude.
* [core] Ignore shortest path when gesturing in Transform::easeToBruno de Oliveira Abinader2016-03-141-3/+9
| | | | | | | If gesture in progress, we transfer the world rounds from the end longitude into start, so we can guarantee the "scroll effect" of rounding the world while assuring the end longitude remains wrapped. Otherwise, find the shortest path.
* [core] Simplify LatLng::unwrapForShortestPath usageBruno de Oliveira Abinader2016-03-141-40/+20
| | | | | | | | | | Simplify LatLng::{wrap,unwrapForShortestPath} code, avoiding duplicated code between Transform::{latLngToScreenCoordinate,easeTo,flyTo}. Added unit tests for camera usage in Transform to detect cases like e.g. crossing the antimeridian as a shortest path between two coordinates. Transform::flyTo precision loss to be handled in #4298.
* [core] Implement LatLng::null()Bruno de Oliveira Abinader2016-03-131-2/+3
|
* [core] Harden Transform anchor & padding usageBruno de Oliveira Abinader2016-03-131-66/+58
| | | | | Use optional values for anchor & padding in Map and Transform functions instead of NaNs. Added unit tests to stress some edge cases.
* [core] Fix non-anchored Transform::setAngleBruno de Oliveira Abinader2016-03-111-1/+1
| | | | | This reverts a line change from b33b2f15, because we explicitely want the anchor to be invalid.
* [core] Fix screen coordinates when crossing the antimeridian (#2)Bruno de Oliveira Abinader2016-03-111-1/+1
| | | | Added missing case. Really fixes #4155 this time.
* [core] Fix screen coordinates when crossing the antimeridianBruno de Oliveira Abinader2016-03-101-1/+15
| | | | | | | | | If the center and point coordinates are not in the same side of the antimeridian, we need to unwrap the point longitude to make sure it can still be seen from the visible side of the antimeridian that is opposite to the center side. Fixes #4155.
* [core] Extra checks in TransformBruno de Oliveira Abinader2016-03-101-1/+5
|
* [core] Check for NaNs in EdgeInsetsBruno de Oliveira Abinader2016-03-101-12/+11
|
* [core] Added Transform::getScreenCoordinateBruno de Oliveira Abinader2016-03-101-13/+18
|
* [core] Remove _validPoint from Transform codeBruno de Oliveira Abinader2016-03-101-11/+3
| | | | vec2<T>::operator bool() checks for NaNs already.
* [core] Coordinate wrapping fixesBruno de Oliveira Abinader2016-03-101-5/+15
| | | | | | | | | | | | | | | - 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] Added DEGREES_MAX as constant valueBruno de Oliveira Abinader2016-03-011-2/+2
|
* [core] Cleared TileCoordinate from PainterBruno de Oliveira Abinader2016-03-011-1/+0
|