本文整理汇总了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)
}
示例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
}
示例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));
}