QGIS API Documentation  2.14.0-Essen
pal::GeomFunction Class Reference

`#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 int convexHullId (int *id, const double *const x, const double *const 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, double *x, double *y)
Reorder points to have cross prod ((x,y)[i], (x,y)[i+1), point) > 0 when point is outside. More...

## Detailed Description

Note
not available in Python bindings

Definition at line 41 of file geomfunction.h.

## Member Function Documentation

 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
true if the lines intersect, or false if the lines are parallel

Definition at line 133 of file geomfunction.cpp.

 int GeomFunction::convexHullId ( int * id, const double *const x, const double *const y, int n, int *& cHull )
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 n Size of subset (vector id) cHull returns the point id (id of id's vector...) whom are parts of the convex hull
Returns
convexHull's size

Definition at line 163 of file geomfunction.cpp.

 static double pal::GeomFunction::cross_product ( double x1, double y1, double x2, double y2, double x3, double y3 )
inlinestatic

Definition at line 54 of file geomfunction.h.

 static double pal::GeomFunction::dist_euc2d ( double x1, double y1, double x2, double y2 )
inlinestatic

Definition at line 59 of file geomfunction.h.

 static double pal::GeomFunction::dist_euc2d_sq ( double x1, double y1, double x2, double y2 )
inlinestatic

Definition at line 64 of file geomfunction.h.

 void GeomFunction::findLineCircleIntersection ( double cx, double cy, double radius, double x1, double y1, double x2, double y2, double & xRes, double & yRes )
static

Definition at line 318 of file geomfunction.cpp.

 bool GeomFunction::isSegIntersects ( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 )
static

Returns true if the two segments intersect.

Definition at line 126 of file geomfunction.cpp.

 int GeomFunction::reorderPolygon ( int nbPoints, double * x, 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 264 of file geomfunction.cpp.

The documentation for this class was generated from the following files: