GEOS 3.11.1
TriEdge.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/export.h>
18#include <iostream>
19
20
21// Forward declarations
22namespace geos {
23namespace geom {
24class Coordinate;
25}
26}
27
29
30namespace geos { // geos.
31namespace triangulate { // geos.triangulate
32namespace tri { // geos.triangulate.tri
33
34
44class GEOS_DLL TriEdge {
45
46private:
47
48 void normalize();
49
50
51public:
52
53 // Members
54 Coordinate p0;
55 Coordinate p1;
56
57 TriEdge(const Coordinate& a, const Coordinate& b)
58 : p0(a)
59 , p1(b)
60 {
61 normalize();
62 }
63
64 struct GEOS_DLL HashCode {
65 std::size_t operator()(const TriEdge& te) const;
66 };
67
68 friend bool operator == (const TriEdge& te0, const TriEdge& te1);
69
70 friend std::ostream& operator << (std::ostream& os, const TriEdge& te);
71
72};
73
74
75
76
77} // namespace geos.triangulate.tri
78} // namespace geos.triangulate
79} // namespace geos
80
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Definition: TriEdge.h:44
Basic namespace for all GEOS functionalities.
Definition: geos.h:39