【问题标题】:Getting Vertex_handles to the points of a delaunay triangulation将 Vertex_handles 获取到 delaunay 三角剖分的点
【发布时间】:2010-11-17 15:34:27
【问题描述】:

我想遍历 CGAL::Delaunay_triangulation_2 的所有顶点,但找不到有关获取所有顶点句柄的文档。

我为此找到的documentation 解释了如何遍历三角测量。

typedef CGAL::Delaunay_triangulation_2<K> T;
typedef T::Vertex_handle Vh;
typedef T::Vertex_iterator Vi;
for (Vi vi = g.vertices_begin(); vi != g.vertices_end(); vi++) {
    // Vh v = how can I get this?
}

但是,我找不到有关如何从迭代器获取 Vertex_handle 的文档

【问题讨论】:

    标签: c++ cgal


    【解决方案1】:

    好吧,我只是愚蠢。尝试了一些更随机的事情并得到迭代器实际上是句柄。当然,我在这里写完整篇文章后才发现这一点:-)

    typedef CGAL::Delaunay_triangulation_2<K> T; 
    typedef T::Vertex_handle Vh; 
    typedef T::Vertex_iterator Vi; 
    for (Vi vi = g.vertices_begin(); vi != g.vertices_end(); vi++) { 
        Vh v = vi;
    } 
    

    【讨论】:

      猜你喜欢
      • 2015-01-07
      • 2019-04-18
      • 2020-08-05
      • 2018-11-26
      • 2021-05-14
      • 2013-05-12
      • 1970-01-01
      • 2019-09-28
      • 2016-02-08
      相关资源
      最近更新 更多