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


C++ Boundary::contours_begin方法代码示例

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


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

示例1: dump_contours

void dump_contours (std::ostream &os, const Boundary &a, int flags) {
    Boundary::contour_iterator cit;
    Boundary::edge_iterator eit, eit_end;
    for (cit = a.contours_begin (); cit != a.contours_end (); ++cit) {
        if (flags & BY_DIRECTION) {
            if (total_inflection_for_contour (a, cit) < 0)
                continue;
        }
        eit = a.edges_begin (cit);
        eit_end = a.edges_end (cit);
        ++eit_end;
        for (; eit != eit_end; ++eit) {
            dump_vertex (os, eit->vert0, a);
        }
        os << "\n"; // contour sep. (for gnuplot)
    }
    os << "\n"; // index sep. (for gnuplot)
    if (! (flags & BY_DIRECTION))
        return;
    for (cit = a.contours_begin (); cit != a.contours_end (); ++cit) {
        if (flags & BY_DIRECTION) {
            if (total_inflection_for_contour (a, cit) > 0)
                continue;
        }
        eit = a.edges_begin (cit);
        eit_end = a.edges_end (cit);
        ++eit_end;
        for (; eit != eit_end; ++eit) {
            dump_vertex (os, eit->vert0, a);
        }
        os << "\n"; // contour sep. (for gnuplot)
    }
    os << "\n"; // index sep. (for gnuplot)
}
开发者ID:mapleyustat,项目名称:papaya,代码行数:34,代码来源:util.cpp

示例2: assert_boundary

// perform sanity checking on a Boundary.
// this is not public code for now.
static void assert_boundary (const Boundary &b) {
#ifndef NDEBUG
    Boundary::contour_iterator cit;
    for (cit = b.contours_begin (); cit != b.contours_end (); ++cit) {
        Boundary::edge_iterator eit     = b.edges_begin (cit),
                                eit_end = b.edges_end (cit);
        while (eit != eit_end) {
            Boundary::edge_iterator next_eit = eit;
            ++next_eit;
            if (! (normed_diff (b.edge_vertex1 (eit),
                                b.edge_vertex0 (next_eit))
                   < VERTEX_MERGE_TOLERANCE)) {
                die ("assert_boundary: contour is not continuous.");
            }

            eit = next_eit;
        }
    }
#endif // NDEBUG
}
开发者ID:mapleyustat,项目名称:papaya,代码行数:22,代码来源:util.cpp

示例3: assert_complete_boundary

void assert_complete_boundary (const Boundary &b) {
    Boundary::contour_iterator cit = b.contours_begin ();
    for (; cit != b.contours_end (); ++cit)
        assert (b.contour_is_complete (cit));
}
开发者ID:mapleyustat,项目名称:papaya,代码行数:5,代码来源:util.cpp


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