QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
Pal labeling engine geometry functions. More...
#include <geomfunction.h>
Static Public Member Functions | |
static bool | computeLineIntersection (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double *x, double *y) |
Compute the point where two lines intersect. More... | |
static bool | containsCandidate (const GEOSPreparedGeometry *geom, double x, double y, double width, double height, double alpha) |
Returns true if a GEOS prepared geometry totally contains a label candidate. More... | |
static int | convexHullId (int *id, const std::vector< double > &x, const std::vector< double > &y, int n, int *&cHull) |
Compute the convex hull in O(n·log(n)) More... | |
static double | cross_product (double x1, double y1, double x2, double y2, double x3, double y3) |
static double | dist_euc2d (double x1, double y1, double x2, double y2) |
static double | dist_euc2d_sq (double x1, double y1, double x2, double y2) |
static void | findLineCircleIntersection (double cx, double cy, double radius, double x1, double y1, double x2, double y2, double &xRes, double &yRes) |
static bool | isSegIntersects (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) |
Returns true if the two segments intersect. More... | |
static int | reorderPolygon (int nbPoints, std::vector< double > &x, std::vector< double > &y) |
Reorder points to have cross prod ((x,y)[i], (x,y)[i+1), point) > 0 when point is outside. More... | |
Pal labeling engine geometry functions.
Definition at line 49 of file geomfunction.h.
|
static |
Compute the point where two lines intersect.
true
if the lines intersect, or false
if the lines are parallel Definition at line 136 of file geomfunction.cpp.
|
static |
Returns true
if a GEOS prepared geometry totally contains a label candidate.
geom | GEOS prepared geometry |
x | candidate x |
y | candidate y |
width | candidate width |
height | candidate height |
alpha | candidate angle |
true
if candidate is totally contained Definition at line 321 of file geomfunction.cpp.
|
static |
Compute the convex hull in O(n·log(n))
id | set of point (i.e. point no 0 is (x,y) = x[id[0]],y[id[0]]) |
x | x coordinates |
y | y coordinates |
n | Size of subset (vector id) |
cHull | returns the point id (id of id's vector...) whom are parts of the convex hull |
Definition at line 166 of file geomfunction.cpp.
|
inlinestatic |
Definition at line 62 of file geomfunction.h.
|
inlinestatic |
Definition at line 67 of file geomfunction.h.
|
inlinestatic |
Definition at line 72 of file geomfunction.h.
|
static |
Definition at line 395 of file geomfunction.cpp.
|
static |
Returns true
if the two segments intersect.
Definition at line 129 of file geomfunction.cpp.
|
static |
Reorder points to have cross prod ((x,y)[i], (x,y)[i+1), point) > 0 when point is outside.
Definition at line 267 of file geomfunction.cpp.