GEOS
3.14.0dev
include
geos
triangulate
tri
TriangulationBuilder.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/TriList.h>
19
20
#include <memory>
21
#include <unordered_map>
22
23
// Forward declarations
24
namespace
geos
{
25
namespace
geom {
26
class
Coordinate;
27
}
28
namespace
triangulate {
29
namespace
tri {
30
class
Tri;
31
}
32
}
33
}
34
35
namespace
geos
{
// geos.
36
namespace
triangulate {
// geos.triangulate
37
namespace
tri {
// geos.triangulate.tri
38
39
47
class
GEOS_DLL
TriangulationBuilder
{
48
using
Coordinate
=
geos::geom::Coordinate
;
49
50
private
:
51
52
// Members
53
std::unordered_map<TriEdge, Tri*, TriEdge::HashCode> triMap;
54
55
// Methods
56
Tri
* find(
const
Coordinate
& p0,
const
Coordinate
& p1)
const
;
57
void
addAdjacent(
Tri
* tri,
Tri
* adj,
const
Coordinate
& p0,
const
Coordinate
& p1);
58
59
60
public
:
61
62
TriangulationBuilder
(
TriList<Tri>
& triList);
63
64
TriangulationBuilder
() {};
65
void
add(
Tri
* tri);
66
72
static
void
build
(
TriList<Tri>
& triList);
73
74
};
75
76
77
78
79
80
81
82
}
// namespace geos.triangulate.tri
83
}
// namespace geos.triangulate
84
}
// namespace geos
85
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition
Coordinate.h:217
geos::triangulate::tri::TriList
Definition
TriList.h:50
geos::triangulate::tri::Tri
Definition
Tri.h:45
geos::triangulate::tri::TriangulationBuilder
Definition
TriangulationBuilder.h:47
geos::triangulate::tri::TriangulationBuilder::build
static void build(TriList< Tri > &triList)
geos
Basic namespace for all GEOS functionalities.
Definition
geos.h:39
Generated by
1.9.8