GEOS 3.11.1
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
21namespace geos {
22namespace geom {
23class Geometry;
24class GeometryFactory;
25class Polygon;
26}
27}
28
34
35
36namespace geos {
37namespace triangulate {
38namespace polygon {
39
40
51
52private:
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
65public:
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:66
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Definition: ConstrainedDelaunayTriangulator.h:50
ConstrainedDelaunayTriangulator(const Geometry *p_inputGeom)
Definition: ConstrainedDelaunayTriangulator.h:72
static void triangulatePolygon(const Polygon *poly, TriList< Tri > &triList)
static std::unique_ptr< Geometry > triangulate(const Geometry *geom)
Definition: TriList.h:54
Definition: Tri.h:49
Basic namespace for all GEOS functionalities.
Definition: geos.h:39