GEOS
3.13.1
include
geos
triangulate
polygon
TriDelaunayImprover.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/TriEdge.h>
18
#include <geos/triangulate/tri/Tri.h>
19
#include <geos/triangulate/tri/TriList.h>
20
21
22
// Forward declarations
23
namespace
geos
{
24
namespace
geom {
25
class
Coordinate
;
26
}
27
}
28
29
using
geos::geom::Coordinate
;
30
using
geos::triangulate::tri::TriList
;
31
using
geos::triangulate::tri::Tri
;
32
33
34
namespace
geos
{
35
namespace
triangulate {
36
namespace
polygon {
37
38
48
class
GEOS_DLL
TriDelaunayImprover
{
49
50
private
:
51
52
// Members
53
static
constexpr
std::size_t MAX_ITERATION = 200;
54
TriList<Tri>
& triList;
55
64
std::size_t improveScan(
TriList<Tri>
& triList);
65
73
bool
improveNonDelaunay(
Tri
* tri, TriIndex index);
74
88
static
bool
isConvex(
const
Coordinate
& adj0,
const
Coordinate
& adj1,
89
const
Coordinate
& opp0,
const
Coordinate
& opp1);
90
103
static
bool
isDelaunay(
const
Coordinate
& adj0,
const
Coordinate
& adj1,
104
const
Coordinate
& opp0,
const
Coordinate
& opp1);
105
116
static
bool
117
isInCircle(
const
Coordinate
& a,
const
Coordinate
& b,
118
const
Coordinate
& c,
const
Coordinate
& p);
119
120
void
improve();
121
122
123
public
:
124
125
TriDelaunayImprover
(
TriList<Tri>
& p_triList)
126
: triList(p_triList)
127
{};
128
137
static
void
improve
(
TriList<Tri>
& triList);
138
139
140
};
141
142
143
144
}
// namespace geos.triangulate.polygon
145
}
// namespace geos.triangulate
146
}
// namespace geos
147
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition
Coordinate.h:217
geos::triangulate::polygon::TriDelaunayImprover
Definition
TriDelaunayImprover.h:48
geos::triangulate::polygon::TriDelaunayImprover::improve
static void improve(TriList< Tri > &triList)
geos::triangulate::tri::TriList
Definition
TriList.h:54
geos::triangulate::tri::Tri
Definition
Tri.h:49
geos
Basic namespace for all GEOS functionalities.
Definition
geos.h:39
Generated by
1.9.8