当前位置: 首页>>代码示例>>C++>>正文


C++ Bedge::other_vertex方法代码示例

本文整理汇总了C++中Bedge::other_vertex方法的典型用法代码示例。如果您正苦于以下问题:C++ Bedge::other_vertex方法的具体用法?C++ Bedge::other_vertex怎么用?C++ Bedge::other_vertex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bedge的用法示例。


在下文中一共展示了Bedge::other_vertex方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: boundary

void
EdgeStrip::build_ccw_boundaries(
   CBedge_list& edges,
   CSimplexFilter& face_filter
   )
{
   // Similar to previous...
   //
   // XXX - needs comments

   // Clear edge flags to screen for unreached edges:
   // set edge flags to 1 in 1-ring of verts,
   // then clear edge flags of internal edges
   set_adjacent_edges(edges.get_verts(), 1);
   edges.clear_flags();

   // get an edge filter that accepts "boundary" edges WRT the
   // given face filter
   BoundaryEdgeFilter boundary(face_filter);

   // Pull out the edge tips:
   Bedge_list tips = edges.filter(ChainTipEdgeFilter(boundary));

   // Construct the filter that screens out previously reached
   // edges:
   UnreachedSimplexFilter unreached;
   AndFilter       wanted = unreached + boundary;

   int k;

   // Start from all the tips first:
   for (k=0; k<tips.num(); k++) {
      Bedge* e = tips[k];
      Bvert* v = (e->v2()->degree(boundary) != 2) ? e->v2() : e->v1();
      Bface* f = e->screen_face(face_filter);
      assert(f); // e must have 1 face satisfying the filter

      // If this will start out running ccw, take it.
      // otherwise skip:
      if (f->next_vert_ccw(v) == e->other_vertex(v))
         build(v, e, wanted);
   }

   // Now check the rest:
   for (k=0; k<edges.num(); k++) {
      Bedge* e = edges[k];
      Bface* f = e->screen_face(face_filter);
      assert(f); // e must have 1 face satisfying the filter

      // Go CCW around faces
      build(f->leading_vert_ccw(e), e, wanted);
   }
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:53,代码来源:edge_strip.C

示例2: while

bool
SELECT_WIDGET::select_edges(CPIXEL_list& pts)
{
   err_adv(debug, "SELECT_WIDGET::select_edges:");

   if (pts.num() < 2) {
      err_adv(debug, "  bad gesture: %d points", pts.num());
      return false;
   }

   // Find edit-level vert near start of pixel trail:
   Bvert* v = find_vert(pts[0]);
   if (!v) {
      err_adv(debug, "  can't get starter vertex");
      return false;
   }

   // 2. Extract edge sequence within tolerance of gest

   Bedge_list chain;

   int k = 0;                           // index of cur position in gesture
   Bvert* cur = v;                      // current vertex
   Bedge* e = 0;
   while ((e = match_span(cur, pts, k))) {
      if(!e->is_selected()) chain += e;
      cur = e->other_vertex(cur);
   }

   err_adv(debug, "  got %d edges", chain.num());

   // Confirm gest is sufficiently close to edge chain

   // 3. Select the edges

   WORLD::add_command(new MESH_SELECT_CMD(chain));

   return true;
}
开发者ID:ArnaudGastinel,项目名称:jot-lib,代码行数:39,代码来源:select_widget.C

示例3: next_border_vert_cw

 // Like above, but returns the next border vertex:
 Bvert* next_border_vert_cw() {
    Bedge* border = next_border_edge_cw();
    return border ? border->other_vertex(this) : nullptr;
 }               
开发者ID:QuLogic,项目名称:jot-lib,代码行数:5,代码来源:bvert.hpp


注:本文中的Bedge::other_vertex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。