CGAL 6.2 - 2D Triangulations: Triangulation_2/terrain_with_info.cpp

CGAL 6.2 - 2D Triangulations

Loading...
Searching...
No Matches
Triangulation_2/terrain_with_info.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Projection_traits_xy_3<K> Gt;
typedef CGAL::Triangulation_vertex_base_with_info_2<std::string, Gt> Vb;
typedef CGAL::Triangulation_data_structure_2<Vb> Tds;
typedef CGAL::Delaunay_triangulation_2<Gt,Tds> Delaunay;
typedef K::Point_3 Point;
int main()
{
Delaunay dt;
Delaunay::Vertex_handle vh;
vh = dt. insert(Point(0,0,0));
vh->info() = "Paris";
vh = dt.insert(Point(1,0,0.1));
vh->info() = "London";
vh = dt.insert(Point(0,1,0.2));
vh->info() = "New York";
return 0;
}
CGAL::Delaunay_triangulation_2
The class Delaunay_triangulation_2 is designed to represent the Delaunay triangulation of a set of po...
Definition: Delaunay_triangulation_2.h:80
CGAL::Delaunay_triangulation_2::insert
Vertex_handle insert(const Point &p, Face_handle f=Face_handle())
inserts point p.
CGAL::Exact_predicates_inexact_constructions_kernel
CGAL::Projection_traits_xy_3
CGAL::Triangulation_data_structure_2
CGAL::Triangulation_vertex_base_with_info_2
The class Triangulation_vertex_base_with_info_2 is designed to be used as a base vertex class of a tr...
Definition: Triangulation_vertex_base_with_info_2.h:38