Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Get near vertices

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Get near vertices


Chronological Thread 
  • From: Laurent Rineau <>
  • To:
  • Cc: "Tyver Ray" <>
  • Subject: Re: [cgal-discuss] Get near vertices
  • Date: Mon, 6 Aug 2007 14:25:17 +0200
  • Organization: Inria, Sophia Antipolis, FRANCE

On Monday 06 August 2007 12:05:33 Tyver Ray wrote:
> Hello!
>
> Thank you for the answer. My problem is that I do not know how I can use it
> with my definitions :
>
> struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
> typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt;
> typedef CGAL::Triangulation_vertex_base_2<Gt> Vb;
> typedef CGAL::Triangulation_face_base_2<Gt> Fb;
> typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
> typedef CGAL::Point_set_2<Gt, Tds> PS;
> typedef CGAL::Delaunay_triangulation_2<Gt, Tds> Delaunay;
>
> typedef K::Point_2 Point2;
> typedef K::Point_3 Point3;
> typedef K::Circle_2 Circle;
>
>
> First, in the documentation it is said that I have to define a Gt::Circle_2
> but with my triangulation I'm obliged to get it through the Kernel because
> of my Triangulation_euclidean_traits_xy_3<K> Gt.

Well, that traits class Triangulation_euclidean_traits_xy_3<K> was designed
for 2D Delaunay triangulations, and has not been adapted to
Point_set_2<Gt,Tds>. You need to amend that class, so that it is a model of
the concept PointSetTraits:

http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Point_set_2_ref/Concept_PointSetTraits.html

A few types and predicates need to be added:
Bounded_side_2
Circle_2
Compare_distance_2
Compute_squared_distance_2
Construct_center_2
Construct_circle_2
FT

It should not be too difficult, as long as you use the distance in the plane
xy. Circle_2 is K::Circle_3. Compute_squared_distance_2, Construct_center_2,
and Construct_circle_2 are strait-forward (construct the circle in the
xy-plane). Bounded_side_2 and Compare_distance_2 need to be adapted: see the
other predicates of the traits class.

If you need to use the euclidean 3D distance, then I think that Point_set_2
is
not the solution.

--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62



Archive powered by MHonArc 2.6.16.

Top of Page