【发布时间】:2019-09-28 18:26:35
【问题描述】:
在我的工作中,我需要为焦点粒子获取 Voronoi 邻居的第一个壳。为此,我使用了 Delaunay 三角剖分,它是 Voronoi 镶嵌的对偶图。我使用的 CGAL 版本是 4.7。我一直使用 CGAL manual_4.7 中的基本代码作为模板来创建 Delaunay 三角剖分。我的问题在于该示例中的标头和 typedef,因为我最近发现它们与可用的最新版本 CGAL 4.14 不同。在CGAL 4.7:
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_triangulation_traits_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_triangulation_traits_2<K> Gt;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vb;
typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
typedef CGAL::Periodic_2_Delaunay_triangulation_2<Gt, Tds> Delaunay;
typedef Delaunay::Point Point;
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/Periodic_2_triangulation_face_base_2.h>
#include <CGAL/Periodic_2_triangulation_vertex_base_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <iostream>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<K> Gt;
typedef CGAL::Periodic_2_triangulation_vertex_base_2<Gt> Vbb;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt, Vbb> Vb;
typedef CGAL::Periodic_2_triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
typedef CGAL::Periodic_2_Delaunay_triangulation_2<Gt, Tds> Delaunay;
typedef Delaunay::Point Point;
然后我仔细检查了手册,看看解释是否不同。据我了解,Software Design 4.14 和Software Design 4.7 是相同的,并且与第二个示例匹配。由于我需要具有空圆属性的三角剖分,并且我只需要检索 Delaunay 三角剖分中相邻顶点的索引,第一个是否也会导致相同的结果? 我可以检查它们的某些点,但我只是怀疑它们是否对每组点产生相同的结果?
【问题讨论】:
标签: cgal triangulation voronoi delaunay