17#include <geos/geom/Coordinate.h>
18#include <geos/triangulate/tri/TriList.h>
36namespace triangulate {
74 void replace(
Tri* triOld,
Tri* triNew);
75 void remove(TriIndex index);
87 std::vector<Tri*> getAdjacentTris(
Tri* tri, TriIndex index0, TriIndex index1);
91 void flip(
Tri* tri, TriIndex index0, TriIndex index1,
107 void setAdjacent(
Tri* p_tri0,
Tri* p_tri1,
Tri* p_tri2);
109 void setTri(TriIndex edgeIndex,
Tri* tri);
130 void validateAdjacent(TriIndex index);
132 std::pair<const Coordinate&, const Coordinate&> getEdge(
Tri* neighbor)
const;
134 const Coordinate& getEdgeStart(TriIndex i)
const;
135 const Coordinate& getEdgeEnd(TriIndex i)
const;
137 bool hasCoordinate(
const Coordinate& v)
const;
138 const Coordinate& getCoordinate(TriIndex i)
const;
141 TriIndex getIndex(
const Tri* tri)
const;
143 Tri* getAdjacent(TriIndex i)
const;
144 bool hasAdjacent(TriIndex i)
const;
145 bool hasAdjacent()
const;
146 bool isAdjacent(
Tri* tri)
const;
148 int numAdjacent()
const;
150 static TriIndex next(TriIndex i);
151 static TriIndex prev(TriIndex i);
152 static TriIndex oppVertex(TriIndex edgeIndex);
153 static TriIndex oppEdge(TriIndex vertexIndex);
165 bool isBorder()
const;
166 bool isBoundary(TriIndex index)
const;
167 Coordinate midpoint(TriIndex edgeIndex)
const;
169 double getArea()
const;
170 double getLength()
const;
171 double getLength(TriIndex i)
const;
174 static std::unique_ptr<Geometry> toGeometry(std::set<Tri*>& tris,
const GeometryFactory* gf);
176 friend std::ostream& operator << (std::ostream& os,
const Tri&);
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
bool isInteriorVertex(TriIndex index) const
void flip(TriIndex index)
Tri * tri0
Definition: Tri.h:62
Basic namespace for all GEOS functionalities.
Definition: geos.h:39