使用 CGAL 4-12-beta2 的 Lloyd 优化

Lloyd optimization using CGAL 4-12-beta2

我正在尝试优化执行延迟细化后获得的网格,如下所示

CGAL::refine_Delaunay_mesh_2(cdtp, seed.begin(), seed.end(), Criteria( cnfg_.MaxTriangleSkewness(), cnfg_.MaxTriangleEdgeLength()*2.0));
if(OptimizeMesh)
{
    CGAL::lloyd_optimize_mesh_2(cdtp ,CGAL::parameters::max_iteration_number = MeshOptItr);
}

但是我得到如下所示的编译器错误

3>D:\PE\PE_SoftwarerdParty\CGAL\CGAL-4.12-beta2\include\CGAL/Mesh_2/Mesh_global_optimizer_2.h(379): error C2039: 'sizing_info' : is not a member of 'CGAL::Triangulation_vertex_base_with_info_2<Info_,GT,Vb>'
3>          with
3>          [
3>              Info_=std::pair<std::pair<int,int>,std::pair<int,IdType>>,
3>              GT=Kernel,
3>              Vb=CGAL::Triangulation_vertex_base_2<CGAL::Exact_predicates_inexact_constructions_kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vertex_base,Face_base>>>
3>          ]
3>          D:\PE\PE_SoftwarerdParty\CGAL\CGAL-4.12-beta2\include\CGAL/Mesh_2/Mesh_global_optimizer_2.h(371) : while compiling class template member function 'void CGAL::Mesh_2::Mesh_global_optimizer_2<CDT,MoveFunction>::update_mesh(const std::vector<_Ty> &)'
3>          with
3>          [
3>              CDT=CGAL::Constrained_triangulation_plus_2<CDTriangulation>,
3>              MoveFunction=Mv,
3>              _Ty=std::pair<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_2<std::pair<std::pair<int,int>,std::pair<int,IdType>>,Kernel,CGAL::Triangulation_vertex_base_2<CGAL::Exact_predicates_inexact_constructions_kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vertex_base,Face_base>>>>>,false>,CGAL::Point_2<CGAL::Epick>>
3>          ]
3>          D:\PE\PE_SoftwarerdParty\CGAL\CGAL-4.12-beta2\include\CGAL/Mesh_2/Mesh_global_optimizer_2.h(178) : see reference to function template instantiation 'void CGAL::Mesh_2::Mesh_global_optimizer_2<CDT,MoveFunction>::update_mesh(const std::vector<_Ty> &)' being compiled
3>          with
3>          [
3>              CDT=CGAL::Constrained_triangulation_plus_2<CDTriangulation>,
3>              MoveFunction=Mv,
3>              _Ty=std::pair<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_2<std::pair<std::pair<int,int>,std::pair<int,IdType>>,Kernel,CGAL::Triangulation_vertex_base_2<CGAL::Exact_predicates_inexact_constructions_kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vertex_base,Face_base>>>>>,false>,CGAL::Point_2<CGAL::Epick>>
3>          ]

我在 windows 上使用 visual studio 2012 7. CGAL 网站中的示例并未说明带有附加信息的顶点。我该如何克服这个问题?

在没有看到任何代码的情况下,我只能猜测顶点 and/or 面类型而不是使用优化方法的有效模型。

如文档所述here其底层TriangulationDataStructure_2的顶点基和面基分别实现了概念DelaunayMeshFaceBase_2和DelaunayMeshVertexBase_2.

另见 this example