Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] problem with using Search_traits_vertex_handle_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] problem with using Search_traits_vertex_handle_3


Chronological Thread 
  • From: Yifei Li <>
  • To:
  • Subject: Re: [cgal-discuss] problem with using Search_traits_vertex_handle_3
  • Date: Thu, 22 Jul 2010 11:53:41 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ZKshyjQUyZyT+S3RXWHv2/nRuSYT0Py84lxC/PVZvqSE915RDxH1xmedLPQFZ0mrNs 07iEscokE2Wkw3QFFBey1P5kzYYnz96ocdacW8PXwNZBcF4+ceTAogkcyYzCA9VMo+Yc iYAepeKnbHXUsqntQTzz5VG7I1ti1E6ddKyeo=

Here is a minimal example that failed to compile, which made me think I have to use Fuzzy_sphere

typedef CGAL::Cartesian<double> K;
typedef K::Point_3 Point_3;
typedef CGAL::Search_traits_3<K> Traits;
typedef CGAL::Kd_tree<Traits> Tree;
typedef CGAL::Fuzzy_sphere<Traits> Fuzzy_sphere;
typedef CGAL::Sphere_3<K> Sphere;

std::vector<Point_3> points;
points.push_back(Point_3(1,1,1));
Tree tree(points.begin(), points.end());
//Fuzzy_sphere fs(Point_3(0,0,0), 5.0);
Sphere fs(Point_3(0,0,0),5.0);
tree.search(std::ostream_iterator<Point_3>(std::cout, "\n"), fs);


Yifei


On Thu, Jul 22, 2010 at 11:17 AM, Sebastien Loriot (GeometryFactory) <sloriot.ml@gmail.com> wrote:
Yifei Li wrote:
Sebastien,

What template parameter should I use for Sphere_3?
Maybe I answered too fast. Can you please post a minimal example
showing the problem?



Actually, when I followed a spatial search example which uses Fuzzy_sphere, I was thinking about if I can use Sphere_3 instead of Fuzzy_sphere. But I got some compilation errors.

Which example did you try to modify?

Yifei




On Thu, Jul 22, 2010 at 2:45 AM, Sebastien Loriot (GeometryFactory) <sloriot.ml <http://sloriot.ml>@gmail.com <http://gmail.com>> wrote:

   Yifei Li wrote:

       Hi folks,

       I have a set of points and for each point p, I need to find all
       the neighbouring points in the ball centered at p with radius r.
       Also I need to know the indices for those neighbouring points,
       which is why I use Search_traits_vertex_handle_3

       Here is how I do it:

       typedef CGAL::Search_traits_vertex_handle_3<unsigned int>              Traits;

       Tree tree(V.begin(), V.end());     // Kd tree

       Fuzzy_sphere fs(Point(10.0,10.0,10.0,0), 15, 0);

       tree.search(std::ostream_iterator<Point>(std::cout, "\n"), fs);

       However, I got the following compile error:

       opt/local/include/CGAL/Fuzzy_sphere.h:50: error: ‘struct
       CGAL::Point_vertex_handle_3<unsigned int>’ has no member named
       ‘dimension’

       Any help is appreciated.

       Yifei


   Why are you using Fuzzy_sphere which is a d-dimensional sphere?
   What about using Sphere_3 instead?

   S.

   --     You are currently subscribed to cgal-discuss.
   To unsubscribe or access the archives, go to
   https://lists-sop.inria.fr/wws/info/cgal-discuss




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss





Archive powered by MHonArc 2.6.16.

Top of Page