GEOS 3.10.1
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
18// Forward declarations
19namespace geos {
20namespace geom {
21class Geometry;
22class GeometryFactory;
23class Polygon;
24}
25namespace triangulate {
26namespace tri {
27class TriList;
28}
29}
30}
31
36
37
38namespace geos {
39namespace triangulate {
40namespace polygon {
41
42
61class GEOS_DLL PolygonTriangulator {
62
63private:
64
65 // Members
66
67 const Geometry* inputGeom;
68 const GeometryFactory* geomFact;
69
70 std::unique_ptr<Geometry> compute();
71
77 void triangulatePolygon(const Polygon* poly, TriList& triList);
78
79
80public:
81
87 PolygonTriangulator(const Geometry* p_inputGeom)
88 : inputGeom(p_inputGeom)
89 , geomFact(p_inputGeom->getFactory())
90 {}
91
98 static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
99
100};
101
102
103
104} // namespace geos.triangulate.polygon
105} // namespace geos.triangulate
106} // namespace geos
107
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Definition: PolygonTriangulator.h:61
static std::unique_ptr< Geometry > triangulate(const Geometry *geom)
PolygonTriangulator(const Geometry *p_inputGeom)
Definition: PolygonTriangulator.h:87
Definition: TriList.h:48
Basic namespace for all GEOS functionalities.
Definition: geos.h:40