Pal labeling engine geometry functions.  
 More...
#include <geomfunction.h>
|  | 
| 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. 
 | 
|  | 
| static bool | containsCandidate (const GEOSPreparedGeometry *geom, double x, double y, double width, double height, double alpha) | 
|  | Returns trueif a GEOS prepared geometry totally contains a label candidate.
 | 
|  | 
| static std::vector< int > | convexHullId (std::vector< int > &id, const std::vector< double > &x, const std::vector< double > &y) | 
|  | Compute the convex hull in O(n·log(n)) 
 | 
|  | 
| static double | cross_product (double x1, double y1, double x2, double y2, double x3, double y3) | 
|  | 
| 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 trueif the two segments intersect.
 | 
|  | 
| static bool | reorderPolygon (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. 
 | 
|  | 
Pal labeling engine geometry functions. 
- Note
- not available in Python bindings 
Definition at line 49 of file geomfunction.h.
◆ computeLineIntersection()
  
  | 
        
          | bool GeomFunction::computeLineIntersection | ( | double | x1, |  
          |  |  | double | y1, |  
          |  |  | double | x2, |  
          |  |  | double | y2, |  
          |  |  | double | x3, |  
          |  |  | double | y3, |  
          |  |  | double | x4, |  
          |  |  | double | y4, |  
          |  |  | double * | x, |  
          |  |  | double * | y |  
          |  | ) |  |  |  | static | 
 
Compute the point where two lines intersect. 
- Returns
- trueif the lines intersect, or- falseif the lines are parallel
Definition at line 143 of file geomfunction.cpp.
 
 
◆ containsCandidate()
  
  | 
        
          | bool GeomFunction::containsCandidate | ( | const GEOSPreparedGeometry * | geom, |  
          |  |  | double | x, |  
          |  |  | double | y, |  
          |  |  | double | width, |  
          |  |  | double | height, |  
          |  |  | double | alpha |  
          |  | ) |  |  |  | static | 
 
Returns true if a GEOS prepared geometry totally contains a label candidate. 
- Parameters
- 
  
    | geom | GEOS prepared geometry |  | x | candidate x |  | y | candidate y |  | width | candidate width |  | height | candidate height |  | alpha | candidate angle |  
 
- Returns
- trueif candidate is totally contained
Definition at line 304 of file geomfunction.cpp.
 
 
◆ convexHullId()
  
  | 
        
          | std::vector< int > GeomFunction::convexHullId | ( | std::vector< int > & | id, |  
          |  |  | const std::vector< double > & | x, |  
          |  |  | const std::vector< double > & | y |  
          |  | ) |  |  |  | static | 
 
Compute the convex hull in O(n·log(n)) 
- Parameters
- 
  
    | id | set of point (i.e. point no 0 is (x,y) = x[id[0]],y[id[0]]) |  | x | x coordinates |  | y | y coordinates |  
 
- Returns
- convexHull vertex ids 
Definition at line 173 of file geomfunction.cpp.
 
 
◆ cross_product()
  
  | 
        
          | static double pal::GeomFunction::cross_product | ( | double | x1, |  
          |  |  | double | y1, |  
          |  |  | double | x2, |  
          |  |  | double | y2, |  
          |  |  | double | x3, |  
          |  |  | double | y3 |  
          |  | ) |  |  |  | inlinestatic | 
 
 
◆ findLineCircleIntersection()
  
  | 
        
          | void GeomFunction::findLineCircleIntersection | ( | double | cx, |  
          |  |  | double | cy, |  
          |  |  | double | radius, |  
          |  |  | double | x1, |  
          |  |  | double | y1, |  
          |  |  | double | x2, |  
          |  |  | double | y2, |  
          |  |  | double & | xRes, |  
          |  |  | double & | yRes |  
          |  | ) |  |  |  | static | 
 
 
◆ isSegIntersects()
  
  | 
        
          | bool GeomFunction::isSegIntersects | ( | double | x1, |  
          |  |  | double | y1, |  
          |  |  | double | x2, |  
          |  |  | double | y2, |  
          |  |  | double | x3, |  
          |  |  | double | y3, |  
          |  |  | double | x4, |  
          |  |  | double | y4 |  
          |  | ) |  |  |  | static | 
 
 
◆ reorderPolygon()
  
  | 
        
          | bool GeomFunction::reorderPolygon | ( | std::vector< double > & | x, |  
          |  |  | std::vector< double > & | y |  
          |  | ) |  |  |  | static | 
 
Reorder points to have cross prod ((x,y)[i], (x,y)[i+1), point) > 0 when point is outside. 
Definition at line 266 of file geomfunction.cpp.
 
 
The documentation for this class was generated from the following files:
- /build/qgis-3.99.0+git20250718+f78f5286a64+99sid/src/core/pal/geomfunction.h
- /build/qgis-3.99.0+git20250718+f78f5286a64+99sid/src/core/pal/geomfunction.cpp