+/*!
+ * \brief Vertex of a polygon. Together with 2 neighbor Vertices represents a triangle
+ */
+struct Triangulate::PolyVertex
+{
+ SMESH_NodeXYZ _nxyz;
+ size_t _index;
+ gp_XY _xy;
+ PolyVertex* _prev;
+ PolyVertex* _next;
+
+ void SetNodeAndNext( const SMDS_MeshNode* n, PolyVertex& v, size_t index );
+ void GetTriaNodes( const SMDS_MeshNode** nodes, size_t* nodeIndices) const;
+ double TriaArea() const;
+ bool IsInsideTria( const PolyVertex* v );
+ PolyVertex* Delete();
+
+ // compare PolyVertex'es by node
+ bool operator()(const PolyVertex* a, const PolyVertex* b) const
+ {
+ return ( a->_nxyz.Node() < b->_nxyz.Node() );
+ }
+ // set of PolyVertex sorted by mesh node
+ typedef boost::container::flat_set< PolyVertex*, PolyVertex > PVSet;
+};
+
+struct Triangulate::Data
+{
+ std::vector< PolyVertex > _pv;
+ std::vector< size_t > _nodeIndex;
+ PolyVertex::PVSet _uniqueNodePV;
+};