本文整理汇总了C++中Bedge::flag方法的典型用法代码示例。如果您正苦于以下问题:C++ Bedge::flag方法的具体用法?C++ Bedge::flag怎么用?C++ Bedge::flag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bedge
的用法示例。
在下文中一共展示了Bedge::flag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ret
Bedge_list
Bface_list::get_edges() const
{
// Extract a list of the edges found in the given faces.
// Get clean slate
clear_edge_flags();
// Put edges into output array uniquely:
Bedge_list ret(size()*2); // pre-allocate plenty
for (Bface_list::size_type i=0; i<size(); i++) {
for (int j=1; j<4; j++) {
Bedge* e = at(i)->e(j);
if (e->flag() == 0) {
e->set_flag(1);
ret.push_back(e);
}
}
}
return ret;
}
示例2: Bedge_list
inline Bedge_list
quad_cell_end_edges(PCell* cell)
{
// if the cell is a quad (4 sides) and has one neigbhor,
// return the side opposite from the neighbor.
assert(cell && cell->num_corners() == 4);
PCell_list nbrs = cell->nbrs();
if (nbrs.size() != 1) {
err_adv(debug, "quad_cell_end_edges: neighbors: %d != 1", nbrs.size());
return Bedge_list();
}
// find an edge of the shared boundary.
// do it now before messing with flags...
assert(!cell->shared_boundary(nbrs[0]).empty());
Bedge* e = cell->shared_boundary(nbrs[0]).front();
assert(e);
EdgeStrip boundary = cell->get_boundary();
assert(boundary.num_line_strips() == 1);
// iterate around the boundary, setting edge flags to value
// k that is incremented whenever we pass a cell corner.
int k = 0;
PCellCornerVertFilter filter;
for (int i=0; i<boundary.num(); i++) {
if (filter.accept(boundary.vert(i)))
k = (k + 1)%4;
boundary.edge(i)->set_flag(k);
}
// we want the edges with flag == k + 2 mod 4
return boundary.edges().filter(
SimplexFlagFilter((e->flag() + 2)%4)
);
}