GEOS  3.13.0dev
ConstrainedDelaunayTriangulator.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 
51 
52 private:
53 
54  // Members
55  const Geometry* inputGeom;
56  const GeometryFactory* geomFact;
57 
58  std::unique_ptr<Geometry> compute();
59 
60  static std::unique_ptr<Geometry> toGeometry(
61  const geom::GeometryFactory* geomFact,
62  const std::vector<std::unique_ptr<TriList<Tri>>>& allTriLists);
63 
64 
65 public:
66 
73  : inputGeom(p_inputGeom)
74  , geomFact(p_inputGeom->getFactory())
75  {}
76 
83  static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
84 
92  static void triangulatePolygon(const Polygon* poly, TriList<Tri>& triList);
93 
94 };
95 
96 
97 
98 } // namespace geos.triangulate.polygon
99 } // namespace geos.triangulate
100 } // namespace geos
101 
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: ConstrainedDelaunayTriangulator.h:50
static std::unique_ptr< Geometry > triangulate(const Geometry *geom)
ConstrainedDelaunayTriangulator(const Geometry *p_inputGeom)
Definition: ConstrainedDelaunayTriangulator.h:72
static void triangulatePolygon(const Polygon *poly, TriList< Tri > &triList)
Definition: TriList.h:54
Definition: Tri.h:49
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25