本文整理汇总了C++中HalfEdge::he_prev方法的典型用法代码示例。如果您正苦于以下问题:C++ HalfEdge::he_prev方法的具体用法?C++ HalfEdge::he_prev怎么用?C++ HalfEdge::he_prev使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HalfEdge
的用法示例。
在下文中一共展示了HalfEdge::he_prev方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: include_edge
bool Face::include_edge(Edge *e)
{
HalfEdge * he = m_halfedge;
if(he->edge () == e || he->he_next ()->edge () == e || he->he_prev ()->edge () == e)
return true;
return false;
}
示例2: assign_kuv_to_edge
int superMi::assign_kuv_to_edge(Solid* mesh)
{
for (SolidEdgeIterator seiter(mesh); !seiter.end(); ++seiter){
Edge* se = *seiter;
se->kuv_h() = 0.0;
//Point p1 = mesh->edgeVertex1(se)->point();
//Point p3 = mesh->edgeVertex2(se)->point();
//HalfEdge* he2 = se->halfedge(0)->ccw_rotate_about_source();
//HalfEdge* he4 = se->halfedge(0)->clw_rotate_about_source();
//Point p2 = he2->target()->point();
//Point p4 = he4->target()->point();
//double alpha = ((p3 - p2)*(p1 - p2) / ((p3 - p2) ^ (p1 - p2)).norm()) / 2.0;
//double beta = ((p3 - p4)*(p1 - p4) / ((p3 - p4) ^ (p1 - p4)).norm()) / 2.0;
//se->kuv_h() = alpha + beta;
HalfEdge* he = se->halfedge(0);
HalfEdge* nhe = he->he_next();
HalfEdge* phe = he->he_prev();
Face* hef = he->face();
double nhel = (nhe->target()->point() - nhe->source()->point()).norm();
double phel = (phe->target()->point() - phe->source()->point()).norm();
double hel = (he->target()->point() - he->source()->point()).norm();
se->kuv_h() += (nhel*nhel + phel*phel - hel*hel) / hef->area() / 8.0;
he = se->halfedge(1);
nhe = he->he_next();
phe = he->he_prev();
hef = he->face();
nhel = (nhe->target()->point() - nhe->source()->point()).norm();
phel = (phe->target()->point() - phe->source()->point()).norm();
se->kuv_h() += (nhel*nhel + phel*phel - hel*hel) / hef->area() / 8.0;
se->kuv_t() = 1.0;
//std::cout << se->kuv() << std::endl;
}
return 0;
}