本文整理汇总了C++中HalfEdge::setNextEdge方法的典型用法代码示例。如果您正苦于以下问题:C++ HalfEdge::setNextEdge方法的具体用法?C++ HalfEdge::setNextEdge怎么用?C++ HalfEdge::setNextEdge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HalfEdge
的用法示例。
在下文中一共展示了HalfEdge::setNextEdge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Face
Face <T> :: Face ( const Container <Node3DCartesian <T> *, destructable> &nl, Container <HalfEdge <T> *> &hl )
{
//Create Face from the list of nodes
this->vertices_count = nl.size();
this->edge = NULL;
//Nodes list contains some points
if ( this->vertices_count > 2 )
{
//Create first half edge
HalfEdge <T> *h = new HalfEdge <T> ( nl [0], NULL, NULL, NULL ); //Create first edge
HalfEdge <T> *h_start = h;
hl.push_back ( h );
//Create other half edges
HalfEdge <T> *h_old = h;
//Process all vertices
for ( unsigned int i = 1; i < this->vertices_count; i++, h_old = h )
{
//Create new edge and set previous edge
h = new HalfEdge <T> ( nl [i], h_old, NULL, NULL );
//Set next edge
h_old->setNextEdge ( h );
//Set face for each edge
h->setFace ( this );
//Add half edge to the list
hl.push_back ( h );
}
//Set previous edge of the first edge
h_start->setPreviousEdge ( h );
//Set next edge for the last edge
h->setNextEdge ( h_start );
//Set face for h start
h_start->setFace ( this );
//Set start edge of the Face
this->edge = h_start;
}
}