CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.68k stars 1.35k forks source link

How to use customized vertices for triangulation on sphere #7060

Closed bpoebiapl closed 1 year ago

bpoebiapl commented 1 year ago

Hi, I want to use customized vertices for triangulation on sphere. In user manual, customized vertices can be used for 2D triangulation like this:

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <vector>

typedef CGAL::Exact_predicates_inexact_constructions_kernel         K;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, K>    Vb;
typedef CGAL::Triangulation_data_structure_2<Vb>                    Tds;
typedef CGAL::Delaunay_triangulation_2<K, Tds>                      Delaunay;
typedef Delaunay::Point                                             Point;

int main() {
   std::vector<std::pair<Point, unsigned>> points;
   Delaunay dt;
   dt.insert(points.begin(), points.end());
   return 0;
}

I want to use customized vertices for Delaunay triangulation on sphere too, but couldn't find ways to use it. What I want to do is like this:

CGAL::Delaunay_triangulation_on_sphere_2<Traits> dtos;
std::vector<std::pair<Point, unsigned>> points;
dtos.insert(points.begin(), points.end());

I tried using Triangulation_on_sphere_vertex_base_with_info_2 which is created based on Triangulation_on_sphere_vertex_base_2 referring to "Triangulation_vertex_base_with info_2.h" file, but it doesn't work.

Any help would be greatly appreciated. Thank you for reading.

MaelRL commented 1 year ago

Please don't cross post the same question on multiple platforms