summaryrefslogtreecommitdiff
path: root/src/mbgl/map/transform_state.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [core] code style cleanupsKonstantin Käfer2016-07-011-3/+3
| | | | | | | - 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] Use the right types for zoom scale logicBruno de Oliveira Abinader2016-06-281-3/+3
| | | | | | | 32 bit integers should be enough for zoom scale logic. In shape annotation logic, 'maxAmountOfTileFeatures' requires 64 bits because we are multiplying the zoom scale with the extent, which might give a number higher than std::numeric_limits<uint32_t>::max().
* [android] #5254 - fix ARMv5 supportThiago Marcos P. Santos2016-06-061-1/+1
| | | | Backported patches fixing ARMv5 support for issue #3985.
* [core] Avoid NaNs in TransformState unit conversionsBruno de Oliveira Abinader2016-05-201-0/+8
| | | | | Fix cases where e.g. state has either zero width or height, causing the unit convertion functions would return NaNs.
* [core] Rewrite TileCoordinate in terms of geometry.hpp pointJohn Firebaugh2016-05-171-39/+26
|
* [core] Added Viewport modeBruno de Oliveira Abinader2016-05-111-2/+10
| | | | | | 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-5/+7
|
* [core] Use geometry.hpp's pointJohn Firebaugh2016-05-051-19/+17
|
* [core] Privatize math.hpp and vec.hppJohn Firebaugh2016-05-051-0/+1
|
* [core] Coordinate wrapping fixesBruno de Oliveira Abinader2016-03-101-29/+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-5/+5
|
* [core] Simplify TransformState::moveLatLngBruno de Oliveira Abinader2016-03-031-2/+2
|
* [core] Added DEGREES_MAX as constant valueBruno de Oliveira Abinader2016-03-011-8/+8
|
* [core] Moved TileCoordinate to tile cover scopeBruno de Oliveira Abinader2016-03-011-62/+30
|
* [core] PrecisionPoint is now ScreenCoordinateBruno de Oliveira Abinader2016-03-011-8/+8
|
* [core] Get rid of mbgl/util/vec4 - use vec4 from vec.hpp insteadBruno de Oliveira Abinader2016-03-011-17/+19
|
* [core] Enforce constants usageBruno de Oliveira Abinader2016-03-011-14/+14
| | | | | Use 'LATITUDE_MAX', 'LONGITUDE_MAX', 'DEG2RAD' and 'RAD2DEG' whenever possible.
* Merge branch 'release-ios-v3.1.0'Minh Nguyễn2016-02-241-2/+10
|\
| * [core, ios, osx] Only constrain after adding to a windowMinh Nguyễn2016-02-101-2/+10
| | | | | | | | | | | | 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-13/+0
|/
* [core] #509 - Creating and using MIN_ZOOM and MAX_ZOOM constantsBrad Leege2016-02-031-2/+2
|
* [core] #509 - Adding min / max checks to parameters and refactoring to ↵Brad Leege2016-02-031-14/+4
| | | | utilize clamp function
* [android][core] #509 - Setting Min and Max Zooms warning annotations in ↵Brad Leege2016-02-031-2/+16
| | | | Android. Clamping Min and Max zooms at Core GL for all platforms to use at runtime.
* [core] support tiles with non-4096 extentsAnsis Brammanis2016-02-021-1/+1
| | | | | Convert all geometries to the maximum extent supported by our buffers and then use that constant extent everywhere else.
* [core] Simplify latLngToCoordinate calculationJohn Firebaugh2016-02-021-5/+3
|
* [core] Remove unusedJohn Firebaugh2016-02-021-4/+0
|
* [core] Remove TransformState::getNormalizedZoomJohn Firebaugh2016-02-021-4/+0
| | | | It calculated the same value as TransformState::getZoom.
* [core] add setMaxZoom, setMinZoomAnsis Brammanis2016-01-281-0/+8
| | | | also change the default maxZoom to 20 to match -js.
* [core] Consolidated zoom and angle anchor logicMinh Nguyễn2016-01-141-0/+20
| | | | Made anchor a CameraOption for easeTo().
* [core] Standardize transform originMinh Nguyễn2016-01-141-2/+0
| | | | All Transform methods that take a PrecisionPoint now assume a “flipped” origin at the upper-left corner of the view. Previously, some methods assumed an origin at the lower-left corner.
* [core] Cleaned up TransformMinh Nguyễn2016-01-141-2/+2
| | | | | | Eliminated many redundant methods on Transform. Minimized usage of TransformState::x and TransformState::y. Added convenient constructors for AnimationOptions. When scaling, passing in view’s origin as the anchor no longer anchors the scaling operation at the view’s center. To specify no anchor, use NaN. Increased precision of worldSize(), now that it’s used much more heavily in transform methods.
* [core] Constrain minimum zoom levelMinh Nguyễn2015-12-241-3/+3
|
* [core] Always constrain width for zoom levelMinh Nguyễn2015-12-241-5/+3
| | | | Even if the map supports wrapping the world, it isn’t necessary to show more than one full revolution of the world at a time. Removed a redundant zoom level clamp.
* [core] Refined and commented flyToMinh Nguyễn2015-12-191-0/+29
| | | | | | | | Rewrote the flyTo implementation to more closely match GL JS’s implementation and the paper on which it is based. Rewrote CameraOptions documentation. Only document units for generic types like double. The semantics of LatLng and Duration are already baked into the types; one just needs to look up the types’ definitions. Also, the […) is set notation, so the braces are supposed to be mismatched. Fixes #3296.
* [core] Do not use std:: namespace for log2()Thiago Marcos P. Santos2015-12-151-1/+1
| | | | As some versions of libstdc++ don't have it.
* [core] Corrected flying trajectory; pitched flightMinh Nguyễn2015-12-151-0/+4
| | | | | | Corrected some fairly opaque code that was incorrectly ported from GL JS the first time around in #3171, causing the trajectory to extend far into the Earth’s orbit. Also transition pitch while flying, call transition frame/finish callback functions, and recognize the same “speed” and “curve” parameters that GL JS does. Fixes #3296, fixes #3297.
* [core] allow changing the orientationKonstantin Käfer2015-12-151-7/+37
| | | | You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
* [core] Added ConstrainMode::{HeightOnly,WidthAndHeight}Bruno de Oliveira Abinader2015-11-181-11/+18
| | | | | | | | | | ConstrainMode gives flexibility to our engine to choose between constraining both vertically and horizontally, or just vertically (default behavior). Constrain in both axis means we can no longer pan the map beyond the map boundaries. This fixes an issue where e.g. annotations disappear upon crossing the map boundaries.
* [core] Avoid extra copy of TransformState in Painter::renderBruno de Oliveira Abinader2015-11-181-0/+4
| | | | | | In MapContext thread, TransformState gets updated from main thread to MapContext and Painter can safely reference MapContext's TransformState instead of copying it upon each Painter::render call.
* [core] Use PrecisionPoint in coordinate functionsBruno de Oliveira Abinader2015-11-111-5/+5
|
* [core] Added more transform state gettersBruno de Oliveira Abinader2015-10-211-15/+33
| | | | | Some platforms requires specific information that was previously not available in public API, but stored internally in TransformState object.
* Increased precision of coordinate conversion methodsandroid-v0.1.0-pre.1Minh Nguyễn2015-09-111-8/+8
| | | | Fixes #2230.
* increase precision for coordinate conversionsAnsis Brammanis2015-09-111-16/+15
| | | | | | This fixes the earthquakes while panning at high zoom levels. Cherry-picked from 9607171612c4a40e41eddaff5230ad571571a5b9 on the perspective-improved-gestures branch.
* move the point origin back to bottom-leftAnsis Brammanis2015-08-251-3/+5
|
* fix LatLng --> point for perspective viewsAnsis Brammanis2015-08-241-78/+56
|
* fix depth clipping in perspective viewAnsis Brammanis2015-08-241-1/+1
| | | | | | | | | The depth range is now set slightly differently. Both ends of the range are shifted for each layer to solve some precision issues. Some layers draw multiple things at different depths. For example, fill layers draw fills and antialiasing separately. To handle this case, I added setDepthSublayer(n) which a
* load correct covering tiles in perspective viewAnsis Brammanis2015-08-241-25/+82
| | | | | port pointCoordinate from -js to convert screen points to tile coordinates correctly in perspective view.
* port perspective projection matrix from -jsAnsis Brammanis2015-08-241-11/+10
|
* don't use certain STL functionsKonstantin Käfer2015-08-041-2/+2
| | | | 
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
* Make pixelRatio constant across a Map object lifetimeKonstantin Käfer2015-07-081-17/+0
| | | | also moves framebuffer size out of TransformState into its own object