GEOS 3.11.1
PolygonNode.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2021 Paul Ramsey <pramsey@cleverelephant.ca>
7 * Copyright (C) 2021 Martin Davis
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16#pragma once
17
18#include <geos/export.h>
19
20
21#include <memory>
22
23// Forward declarations
24namespace geos {
25namespace geom {
26class Coordinate;
27}
28}
29namespace geos { // geos.
30namespace operation { // geos.operation
31namespace valid { // geos.operation.valid
32
34
35class GEOS_DLL PolygonNode {
36
37private:
38
51 static bool
52 isBetween(const Coordinate* origin, const Coordinate* p,
53 const Coordinate* e0, const Coordinate* e1);
54
64 static bool
65 isAngleGreater(const Coordinate* origin,
66 const Coordinate* p, const Coordinate* q);
67
68 static int
69 quadrant(const Coordinate* origin, const Coordinate* p);
70
71
72public:
73
86 static bool isCrossing(const Coordinate* nodePt,
87 const Coordinate* a0, const Coordinate* a1,
88 const Coordinate* b0, const Coordinate* b1);
89
102 static bool isInteriorSegment(const Coordinate* nodePt,
103 const Coordinate* a0, const Coordinate* a1,
104 const Coordinate* b);
105
106};
107
108
109
110} // namespace geos.operation.valid
111} // namespace geos.operation
112} // namespace geos
113
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Basic namespace for all GEOS functionalities.
Definition: geos.h:39