本文整理汇总了C++中Halfedge_handle::vertex_begin方法的典型用法代码示例。如果您正苦于以下问题:C++ Halfedge_handle::vertex_begin方法的具体用法?C++ Halfedge_handle::vertex_begin怎么用?C++ Halfedge_handle::vertex_begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Halfedge_handle
的用法示例。
在下文中一共展示了Halfedge_handle::vertex_begin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Check_Manifold_Property
//Description :: Check if removal of this vertex would violate the manifold_property or not.
bool Check_Manifold_Property(Halfedge_handle h, const int &type,const int &valence)
{
bool check = false;
Halfedge_handle g = h;
int* Points_index = new int[valence];
// if valence is 3, no new edge is inserted, so always safe to remove.
if(valence == 3)
{
return false;
}
else
{
// Points_index[] contains all boundary vertices' indices (ordered in counterclockwise)
Points_index[0] = g->vertex()->Vertex_Number_S;
g = g->next(); // g points center vertex;
for(int i=1; i<valence; i++)
{
g = g->prev_on_vertex();// around the vertex in the counterclockwise way.
Points_index[i] = g->opposite()->vertex()->Vertex_Number_S;
}
// quadrangle
if (valence == 4)
{
if ((type == 5) || (type == 8))
{
g = h->opposite();
Halfedge_around_vertex_circulator Hvc = g->vertex_begin();
Halfedge_around_vertex_circulator Hvc_end = Hvc;
CGAL_For_all(Hvc,Hvc_end)
{
if (Hvc->opposite()->vertex()->Vertex_Number_S == Points_index[1])
check = true;
}
}
else if (( type == 6) || (type == 7))
{
g = h;
Halfedge_around_vertex_circulator Hvc = g->vertex_begin();
Halfedge_around_vertex_circulator Hvc_end = Hvc;
CGAL_For_all(Hvc,Hvc_end)
{
if (Hvc->opposite()->vertex()->Vertex_Number_S == Points_index[2])
check = true;;
}
}