10#ifndef CDT_Zahj4kpHLwFgkKtcOI1i
11#define CDT_Zahj4kpHLwFgkKtcOI1i
31template <
typename T,
typename TNearPo
intLocator>
40 typedef TriIndVec::const_iterator TriIndCit;
41 for(TriIndCit it = vTris.begin(); it != vTris.end(); ++it)
43 const array<VertInd, 3>& vv = cdt.
triangles[*it].vertices;
44 if(std::find(vv.begin(), vv.end(), iV) == vv.end())
52 typedef NeighborsArr3::const_iterator NCit;
57 const array<TriInd, 3>& nn = cdt.
triangles[*it].neighbors;
58 if(std::find(nn.begin(), nn.end(), iT) == nn.end())
66 typedef VerticesArr3::const_iterator VCit;
70 if(std::find(tt.begin(), tt.end(), iT) == tt.end())
80template <
typename T,
typename TNearPo
intLocator>
83 typedef TriangleVec::const_iterator Cit;
89 cdt.
vertices[t->vertices[1]]) <= T(0))
98template <
typename T,
typename TNearPo
intLocator>
103 typedef TriIndVec::const_iterator TriIndCit;
104 for(TriIndCit it = vertTris.begin(); it != vertTris.end(); ++it)
105 if(*it == noNeighbor)
Data structure representing a 2D constrained Delaunay triangulation.
V2dVec vertices
triangulation's vertices
TriangleVec triangles
triangulation's triangles
std::vector< TriIndVec > VerticesTriangles
Triangles by vertex index.
TriIndVec & VertTrisInternal()
Access internal vertex adjacent triangles.
CDT_EXPORT VerticesTriangles calculateTrianglesByVertex(const TriangleVec &triangles, VertInd verticesSize)
Calculate triangles adjacent to vertices (triangles by vertex index)
Namespace containing triangulation functionality.
bool verifyTopology(const CDT::Triangulation< T, TNearPointLocator > &cdt)
Verify that triangulation topology is consistent.
std::vector< TriInd > TriIndVec
Vector of triangle indices.
IndexSizeType VertInd
Vertex index.
CDT_EXPORT T orient2D(const V2d< T > &p, const V2d< T > &v1, const V2d< T > &v2)
Orient p against line v1-v2 2D: robust geometric predicate.
bool verifyWinding(const CDT::Triangulation< T, TNearPointLocator > &cdt)
Check that every triangle is wound counter-clockwise: degenerate and inverted triangles are topologic...
IndexSizeType TriInd
Triangle index.
bool eachVertexHasNeighborTriangle(const CDT::Triangulation< T, TNearPointLocator > &cdt)
Check that each vertex has a neighbor triangle.
Triangulation triangle (counter-clockwise winding)
VerticesArr3 vertices
triangle's three vertices
NeighborsArr3 neighbors
triangle's three neighbors