本文整理汇总了C++中Face_handle::has_vertex方法的典型用法代码示例。如果您正苦于以下问题:C++ Face_handle::has_vertex方法的具体用法?C++ Face_handle::has_vertex怎么用?C++ Face_handle::has_vertex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Face_handle
的用法示例。
在下文中一共展示了Face_handle::has_vertex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
Triangulation t;
Face_handle fh;
// Check the empty triangulation
fh = test_point_location(t, Point(0.5, 0.5), Triangulation::EMPTY);
CGAL_assertion(fh == Face_handle());
// Insert the first point
Point p0(0.5, 0.5);
Vertex_handle vh0 = t.insert(p0);
CGAL_assertion(t.is_valid(true));
CGAL_USE(vh0);
fh = test_point_location(t, p0, Triangulation::VERTEX);
CGAL_assertion(fh->has_vertex(vh0));
fh = test_point_location(t, p0 + Vector(0.1, 0.1), Triangulation::EDGE);
CGAL_assertion(fh->has_vertex(vh0));
fh = test_point_location(t, p0 + Vector(-0.1, -0.1), Triangulation::EDGE);
CGAL_assertion(fh->has_vertex(vh0));
fh = test_point_location(t, p0 + Vector(-0.2, -0.3), Triangulation::FACE);
CGAL_assertion(fh->has_vertex(vh0));
CGAL_assertion(t.is_valid(true));
// Insert the second point on an edge
Point p1(0.7, 0.7);
Vertex_handle vh1 = t.insert(p1);
CGAL_USE(vh1);
CGAL_assertion(t.is_valid(true));
fh = test_point_location(t, p0, Triangulation::VERTEX);
CGAL_assertion(fh->has_vertex(vh0));
fh = test_point_location(t, p1, Triangulation::VERTEX);
CGAL_assertion(fh->has_vertex(vh1));
fh = test_point_location(t, p0 + Vector(0.1, 0.1), Triangulation::EDGE);
CGAL_assertion(fh->has_vertex(vh0));
CGAL_assertion(fh->has_vertex(vh1));
fh = test_point_location(t, p0 + Vector(-0.1, -0.1), Triangulation::EDGE);
CGAL_assertion(fh->has_vertex(vh0));
CGAL_assertion(!fh->has_vertex(vh1));
fh = test_point_location(t, p1 + Vector(0.1, 0.1), Triangulation::EDGE);
CGAL_assertion(!fh->has_vertex(vh0));
CGAL_assertion(fh->has_vertex(vh1));
fh = test_point_location(t, p0 + Vector(-0.02, -0.03), Triangulation::FACE);
CGAL_assertion(fh->has_vertex(vh0));
fh = test_point_location(t, p1 + Vector(-0.02, -0.03), Triangulation::FACE);
CGAL_assertion(fh->has_vertex(vh1));
CGAL_assertion(t.is_valid(true));
// Insert the third point in a face
Point p2(0.8, 0.6);
Vertex_handle vh2 = t.insert(p2);
CGAL_USE(vh2);
CGAL_assertion(t.is_valid(true));
fh = test_point_location(t, p0, Triangulation::VERTEX);
CGAL_assertion(fh->has_vertex(vh0));
fh = test_point_location(t, p1, Triangulation::VERTEX);
CGAL_assertion(fh->has_vertex(vh1));
fh = test_point_location(t, p2, Triangulation::VERTEX);
CGAL_assertion(fh->has_vertex(vh2));
fh = test_point_location(t, Point(0.6, 0.6), Triangulation::EDGE);
CGAL_assertion(fh->has_vertex(vh0));
CGAL_assertion(fh->has_vertex(vh1));
test_point_location(t, Point(0.7, 0.6), Triangulation::FACE);
test_point_location(t, p0 + Vector(-0.02, -0.03), Triangulation::FACE);
test_point_location(t, p0 + Vector(0.02, -0.03), Triangulation::FACE);
test_point_location(t, p0 + Vector(-0.02, 0.03), Triangulation::FACE);
test_point_location(t, p0 + Vector(0.02, 0.03), Triangulation::FACE);
return 0;
}