summaryrefslogtreecommitdiff
path: root/src/3rdparty/clip2tri
Commit message (Collapse)AuthorAgeFilesLines
* Add QGeoPolygon to QtPositioningPaolo Angelelli2017-08-042-0/+7
| | | | | | | | | | | This patch introduces a new QGeoShape, QGeoPolygon, together with helper functions in the location singleton (QtPositioning.*) to create and convert geopolygons from QML. [ChangeLog][QtPositioning][QGeoPolygon] Added QGeoPolygon shape. Change-Id: I111c576d7428f2a953f0459d16c25eea7ab2bd7c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use appropriate qmake flags for optimizationsAllan Sandfeld Jensen2017-05-241-3/+4
| | | | | | | | | | Using optimize_full gives us -O3 also on icc and clang, and -O3 already implies -ftree-vectorize, and -ffast-math already implies unsafe-math- optimizations. Change-Id: Ieb1a6841da1ea3513ae624bf2468554bc62318c9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Rename libclipper namespaceThiago Marcos P. Santos2017-04-102-10/+10
| | | | | | | | | | | So it won't clash with the libclipper used by the Mapbox GL plugin when linking Qt with -static. With -static, all the plugins are linked together instead of each one having its own shared library, thus, hiding private symbols. Change-Id: I33ee4afd4b83741c5f3fae32a88da7f4a7fee75f Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Disable warnings in third-party codeThiago Macieira2017-04-031-1/+1
| | | | | | | | | | We don't care to fix them. clipper.cpp:3665:13: warning: unused variable 'firstLeft' [-Wunused-variable] sweep.cpp:706:8: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare] Change-Id: I27b55fdf514247549455fffd14b17ba6040ac332 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Add clipping for rotated/tilted Map ItemsPaolo Angelelli2017-01-263-66/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds proper rotation/tilting support to Map Items. To do so, clipping is now performed in wrapped mercator space instead of screen space. This prevents projection of geo coordinates that ended behind the camera, and that would be projected incorrectly by the projection transformation. This patch therefore does not use the screen clipping code any longer (clipPathToRect), since the geometry has already been clipped. The downside is that updateSourcePoints is now necessary for any viewport change. This would be necessary anyway in presence of tilt or rotation. NB: Handling of MapQuickItems with zoomLevel set is still TODO. Future work: 1) Optimize updateSourcePoints by pre-computing the mercator projection of the geometry, and let updateSourcePoints do only the wrapping/clipping/projection-to-screen operations. 2) Remove updateScreenPoints altogether Change-Id: Ie0d3dbef68d48ac97a596d40240d0ac126c0efaf Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add clipping support to Clip2TriPaolo Angelelli2017-01-192-0/+103
| | | | | | | | | | | | Clip2Tri is a Poly2Tri and Clipper wrapper to do robust triangulation. It also catches exceptions, making Clipper safe to be used with Qt. This patch adds wrappers to expose clipping functionalities through Clip2Tri, in order to use Clipper from a layer that sanitizes the exception and makes it possible to use in Qt. Change-Id: I0cf18d55c87fee2584bcf34928f1a9cb1c3e287f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Document licenses of Qt LocationPaolo Angelelli2016-09-231-0/+13
| | | | | | | | | | | | Add qt_attribution.json files for 3rdparty code in Qt Location, and list the attributions in the index file. Also document the different licenses the module is available under as a whole. The _legal.qdoc files apparently weren't included anywhere, and have been removed. Change-Id: I56e8b75ae044954c745b2fde6f7cd4c1e80ec1b3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix for crash on tessellation of self-intersectiong GeoPolygonsPaolo Angelelli2016-06-154-0/+437
QtLocation makes use of a 3rd party library for polygon tessellation, poly2tri. This library is known to be weak in handling complex input, like, for example, polygons with self intersecting edges. Sanitizing the input data through clipper solves the problem, and it has already been implemented in the clip2tri library, which this patch includes and uses. Task-number: QTBUG-52076 Change-Id: I071a58e202345bc71da583995f7245361f00e8c4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>