CGAL & Boost - vertex_iterator & vertex_descriptor

CGAL & Boost - vertex_iterator & vertex_descriptor

本文关键字:vertex descriptor iterator Boost CGAL      更新时间:2023-10-16

对于三角形网格的变形,CGAL使用vertex_iterator&来自升压的vertex_descriptor。我想得到boost迭代器/描述符指向的顶点的x, y, z值。

如何获得点/顶点的x, y, z值?

vertex_iterator/vertex_descriptor与我习惯的CGAL不同,但我不太了解boost实现。

有人知道如何使用boost的vertex_iterator/vertex_descriptor来获得点的坐标吗?

在下面的片段中,您将获得一个顶点描述符。

// Add another control vertex which requires another call to preprocess.
vertex_descriptor control_3 = *CGAL::cpp11::next(vb, 92);
deform_mesh.insert_control_vertex(control_3);

我可以使用此描述符获取Point_3吗?如果是,怎么办?

如果是CGAL::Polyhedron_3,则调用control_3->point()。如果是CGAL::Surface_mesh sm,则调用sm.point(control_point)