3
我想使用Voronoi圖提取邊緣點(點位於凸包的邊界邊緣上)。我知道一個無界單元格包含一個邊界站點點,但是如何使用迭代器訪問該信息?使用CGAL的Voronoi圖:僅提取邊緣點(凸包)
解決方案
VD vd;
//initialise your voronoi diagram
VD::Face_iterator it = vd.faces_begin(), beyond = vd.faces_end();
for (int f = 0; it != beyond; ++f, ++it)
{
std::cout << "Face " << f << ": \n";
if (it->is_unbounded())
{
// it's a boundary point
}
}