17#include <geos/index/VertexSequencePackedRtree.h>
18#include <geos/triangulate/tri/TriList.h>
19#include <geos/triangulate/tri/Tri.h>
42namespace triangulate {
72 static constexpr std::size_t NO_VERTEX_INDEX = std::numeric_limits<std::size_t>::max();
74 bool isFlatCornersSkipped =
false;
81 std::vector<Coordinate> vertex;
82 std::vector<std::size_t> vertexNext;
83 std::size_t vertexSize;
86 std::size_t vertexFirst;
89 std::array<std::size_t, 3> cornerIndex;
99 std::vector<std::size_t> createNextLinks(std::size_t size)
const;
101 bool isValidEar(std::size_t cornerIndex,
const std::array<Coordinate, 3>& corner);
115 std::size_t findIntersectingVertex(std::size_t cornerIndex,
const std::array<Coordinate, 3>& corner)
const;
126 bool isValidEarScan(std::size_t cornerIndex,
const std::array<Coordinate, 3>& corner)
const;
129 static Envelope envelope(
const std::array<Coordinate, 3>& corner);
136 bool isRemoved(std::size_t vertexIndex)
const;
138 void initCornerIndex();
145 void fetchCorner(std::array<Coordinate, 3>& cornerVertex)
const;
150 void nextCorner(std::array<Coordinate, 3>& cornerVertex);
159 std::size_t nextIndex(std::size_t index)
const;
161 bool isConvex(
const std::array<Coordinate, 3>& pts)
const;
163 bool isFlat(
const std::array<Coordinate, 3>& pts)
const;
170 bool isCornerInvalid(
const std::array<Coordinate, 3>& pts)
const;
210 std::unique_ptr<Polygon> toGeometry()
const;
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Definition: VertexSequencePackedRtree.h:49
Definition: PolygonEarClipper.h:66
PolygonEarClipper(std::vector< Coordinate > &polyShell)
static void triangulate(std::vector< Coordinate > &polyShell, TriList< Tri > &triListResult)
void setSkipFlatCorners(bool p_isFlatCornersSkipped)
Basic namespace for all GEOS functionalities.
Definition: geos.h:39