GEOS 3.14.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
21namespace geos {
22namespace geom {
23class Geometry;
24class GeometryFactory;
25class Polygon;
26}
27}
28
29namespace geos {
30namespace triangulate {
31namespace polygon {
32
33
47 template<typename TriType>
50
51private:
52
53 // Members
54 const Geometry* inputGeom;
55 const GeometryFactory* geomFact;
56
57 std::unique_ptr<Geometry> compute() const;
58
59 static std::unique_ptr<Geometry> toGeometry(
60 const geom::GeometryFactory* geomFact,
61 const std::vector<std::unique_ptr<TriList<Tri>>>& allTriLists);
62
63
64public:
65
72 : inputGeom(p_inputGeom)
73 , geomFact(p_inputGeom->getFactory())
74 {}
75
82 static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
83
91 static void triangulatePolygon(const Polygon* poly, TriList<Tri>& triList);
92
93};
94
95
96
97} // namespace geos.triangulate.polygon
98} // namespace geos.triangulate
99} // namespace geos
100
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
Represents a linear polygon, which may include holes.
Definition Polygon.h:61
Definition ConstrainedDelaunayTriangulator.h:43
ConstrainedDelaunayTriangulator(const Geometry *p_inputGeom)
Definition ConstrainedDelaunayTriangulator.h:71
static void triangulatePolygon(const Polygon *poly, TriList< Tri > &triList)
static std::unique_ptr< Geometry > triangulate(const Geometry *geom)
Definition TriList.h:50
Definition Tri.h:45
Basic namespace for all GEOS functionalities.
Definition geos.h:39