我试图使用2d网格库作为代码。我从文档中的以下示例复制语法和包含文件
global.cpp
但是当我添加以下行时
CGAL::refine_Delaunay_mesh_2(cdt, Criteria(0.015625, sq3*a));我收到一个指向行的编译错误
#include <CGAL/Delaunay_mesher_2.h>问题是,代码在不调用网格函数的情况下编译良好。
完全错误是在这里张贴太大,但我发现这一行在中间。
/home/sameer/cgal/gap cvt/gap_cvt.cpp:1505:62: required from here
/usr/include/CGAL/Delaunay_mesher_2.h:166:11: error: ‘class CGAL::Constrained_triangulation_face_base_2<CGAL::Epick, CGAL::Triangulation_face_base_2<CGAL::Epick, CGAL::Triangulation_ds_face_base_2<CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_2<void> >, CGAL::Constrained_triangulation_face_base_2<CGAL::Epick, CGAL::Triangulation_face_base_2<CGAL::Epick, CGAL::Triangulation_ds_face_base_2<void> > > > > > >’ has no member named ‘set_in_domain’
it->set_in_domain(!mark);除了代码的参数外,我看不出我缺少的是什么,这段代码与示例中的情况差不多。
发布于 2016-01-13 07:20:31
2D网格类2期望CDT模板参数具有2的脸类型模型。不能使用默认的三角剖分数据结构。
在您指出的示例中,CDT类型声明如下:
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;https://stackoverflow.com/questions/34721124
复制相似问题