TriEdge.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/geom/Coordinate.h>
#include <iostream>
namespace geos { // geos.
namespace triangulate { // geos.triangulate
namespace tri { // geos.triangulate.tri
class GEOS_DLL TriEdge {
using Coordinate = geos::geom::Coordinate;
private:
void normalize();
public:
// Members
Coordinate p0;
Coordinate p1;
TriEdge(const Coordinate& a, const Coordinate& b)
: p0(a)
, p1(b)
{
normalize();
}
struct GEOS_DLL HashCode {
std::size_t operator()(const TriEdge& te) const;
};
friend bool operator == (const TriEdge& te0, const TriEdge& te1);
friend std::ostream& operator << (std::ostream& os, const TriEdge& te);
};
} // namespace geos.triangulate.tri
} // namespace geos.triangulate
} // namespace geos
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::triangulate
Classes to compute Delaunay triangulations.
Definition ConcaveHull.h:32
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38