GEOS 3.11.1
PolygonRingSelfNode.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}
29
30namespace geos { // geos.
31namespace operation { // geos.operation
32namespace valid { // geos.operation.valid
33
35
36class GEOS_DLL PolygonRingSelfNode {
37
38private:
39
40 Coordinate nodePt;
41 const Coordinate* e00;
42 const Coordinate* e01;
43 const Coordinate* e10;
44 const Coordinate* e11;
45
46
47public:
48
49 PolygonRingSelfNode(
50 const Coordinate& p_nodePt,
51 const Coordinate* p_e00,
52 const Coordinate* p_e01,
53 const Coordinate* p_e10,
54 const Coordinate* p_e11)
55 : nodePt(p_nodePt)
56 , e00(p_e00)
57 , e01(p_e01)
58 , e10(p_e10)
59 , e11(p_e11)
60 {}
61
67 const Coordinate* getCoordinate() const {
68 return &nodePt;
69 }
70
82 bool isExterior(bool isInteriorOnRight) const;
83
84};
85
86} // namespace geos.operation.valid
87} // namespace geos.operation
88} // namespace geos
89
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Basic namespace for all GEOS functionalities.
Definition: geos.h:39