GEOS  3.13.0dev
PolygonTriangulator.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************/
14 
15 #pragma once
16 
17 #include <geos/triangulate/tri/TriList.h>
18 #include <geos/triangulate/tri/Tri.h>
19 
20 // Forward declarations
21 namespace geos {
22 namespace geom {
23 class Geometry;
24 class GeometryFactory;
25 class Polygon;
26 }
27 }
28 
34 
35 
36 namespace geos {
37 namespace triangulate {
38 namespace polygon {
39 
40 
59 class GEOS_DLL PolygonTriangulator {
60 
61 private:
62 
63  // Members
64 
65  const Geometry* inputGeom;
66  const GeometryFactory* geomFact;
67 
68  std::unique_ptr<Geometry> compute();
69 
75  void triangulatePolygon(const Polygon* poly, TriList<Tri>& triList);
76 
77 
78 public:
79 
85  PolygonTriangulator(const Geometry* p_inputGeom)
86  : inputGeom(p_inputGeom)
87  , geomFact(p_inputGeom->getFactory())
88  {}
89 
96  static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
97 
98 };
99 
100 
101 
102 } // namespace geos.triangulate.polygon
103 } // namespace geos.triangulate
104 } // namespace geos
105 
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:65
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Represents a linear polygon, which may include holes.
Definition: Polygon.h:60
Definition: PolygonTriangulator.h:59
static std::unique_ptr< Geometry > triangulate(const Geometry *geom)
PolygonTriangulator(const Geometry *p_inputGeom)
Definition: PolygonTriangulator.h:85
Definition: TriList.h:54
Definition: Tri.h:49
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25