Subject: CGAL users discussion list
List archive
- From: "Tyver Ray" <>
- To:
- Subject: Re: [cgal-discuss] Get near vertices
- Date: Mon, 6 Aug 2007 12:05:33 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=bjDjrGuh1iIJoLxhlg97hRaAenZdP5Bch6HhtdTtbsOV/0Lpqv5jlcJhetWJZeMS3PcGBBAepIh3vc5nnv9AAzZTx+LF0bviy9Do8URn61uvAElg2bmhnMfxHyF7OLYoNcUZy9cKd1x+JomOkKVSt9Ez4i39TCkU2TUfgGPsUbk=
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.
Second, I have to create an empty variable in my case : Point_set_2<Gt, Tds> PS;
In my code I try to use the range_search function with the code below:
PS ps;
std::vector<Vertex_handle> vertexFound;
Circle circle( Point2(0,0), 5 );
ps.range_search( circle, back_inserter(vertexFound) );
But I have many compilation errors due to the use of Triangulation_euclidean_traits_xy_3 but my triangulation needs it.
How can I use this range_search function with Triangulation_euclidean_traits_xy_3 ?
Do you know where is the error or do you have a little code example?
In advance thank you !!!
Error 14 error C2039: 'Bounded_side_2' : is not a member of 'CGAL::Etxy3<R>' c:\program files\cgal- 3.3\include\cgal\point_set_2.h 72
Error 7 error C2039: 'Circle_2' : is not a member of 'CGAL::Etxy3<R>' c:\program files\cgal-3.3\include\cgal\point_set_2.h 50
Error 18 error C2039: 'Compare_distance_2' : is not a member of 'CGAL::Etxy3<R>' c:\program files\cgal- 3.3\include\cgal\point_set_2.h 73
Error 9 error C2039: 'Compute_squared_distance_2' : is not a member of 'CGAL::Etxy3<R>' c:\program files\cgal-3.3\include\cgal\point_set_2.h 55
Error 22 error C2039: 'Construct_center_2' : is not a member of 'CGAL::Etxy3<R>' c:\program files\cgal-3.3\include\cgal\point_set_2.h 74
Error 8 error C2039: 'Construct_circle_2' : is not a member of 'CGAL::Etxy3<R>' c:\program files\cgal- 3.3\include\cgal\point_set_2.h 54
Error 10 error C2039: 'FT' : is not a member of 'CGAL::Etxy3<R>' c:\program files\cgal-3.3\include\cgal\point_set_2.h 56
Error 23 error C2065: 'Numb_type' : undeclared identifier c:\program files\cgal- 3.3\include\cgal\point_set_2.h 76
Error 15 error C2146: syntax error : missing ';' before identifier 'Circleptori' c:\program files\cgal-3.3\include\cgal\point_set_2.h 72
Error 19 error C2146: syntax error : missing ';' before identifier 'Comparedist' c:\program files\cgal- 3.3\include\cgal\point_set_2.h 73
Error 11 error C2146: syntax error : missing ';' before identifier 'Numb_type' c:\program files\cgal-3.3\include\cgal\point_set_2.h 56
Error 27 error C2146: syntax error : missing ';' before identifier 'tr_circleptori' c:\program files\cgal- 3.3\include\cgal\point_set_2.h 92
Error 24 error C2146: syntax error : missing ';' before identifier 'tr_comparedist' c:\program files\cgal-3.3\include\cgal\point_set_2.h 88
Error 30 error C2664: 'OutputIterator CGAL::Point_set_2<Gt,Tds>::range_search<std::back_insert_iterator<_Container>>(const CGAL::Circle_2 &,OutputIterator)' : cannot convert parameter 1 from 'Circle' to 'const CGAL::Circle_2 &' c:\documents and settings\test\bureau\prog\surface.cpp 103
Error 12 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal-3.3\include\cgal\point_set_2.h 56
Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal- 3.3\include\cgal\point_set_2.h 56
Error 16 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal-3.3\include\cgal\point_set_2.h 72
Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal- 3.3\include\cgal\point_set_2.h 72
Error 20 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal-3.3\include\cgal\point_set_2.h 73
Error 21 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal- 3.3\include\cgal\point_set_2.h 73
Error 25 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal-3.3\include\cgal\point_set_2.h 88
Error 26 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal- 3.3\include\cgal\point_set_2.h 88
Error 28 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal-3.3\include\cgal\point_set_2.h 92
Error 29 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\cgal- 3.3\include\cgal\point_set_2.h 92
2007/7/25, Laurent Rineau <>:
On Wednesday 25 July 2007 17:26:37 Tyver Ray wrote:
> Hello !
>
> I would like to know if it's possible to select all the points of a 2D
> delaunay triangulation which are in a ray r from a reference point?
You should read the CGAL manual about CGAL::Point_set_2, in the package
named "2D Range and Neighbor Search". That template class derives from a 2D
Delaunay triangulation, and provides a function range_search() that seems to
be exactly what you asked:
template<class OutputIterator>
OutputIterator PS.range_search ( Circle C, OutputIterator res);
"computes handles to all vertices contained in the closure of disk C. The
computed vertex handles will be placed as a sequence of objects in a
container of value type of res which points to the first object in the
sequence. The function returns an output iterator pointing to the position
beyond the end of the sequence."
(Quoted from
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Point_set_2_ref/Class_Point_set_2.html)
--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- Re: [cgal-discuss] Get near vertices, Tyver Ray, 08/06/2007
- Re: [cgal-discuss] Get near vertices, Laurent Rineau, 08/06/2007
Archive powered by MHonArc 2.6.16.