Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem with double in a Convex Hull

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem with double in a Convex Hull


Chronological Thread 
  • From: "Mathieu Brédif" <>
  • To:
  • Subject: Re: [cgal-discuss] Problem with double in a Convex Hull
  • Date: Thu, 12 Jun 2008 15:32:06 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=C5PMlRHO5JoxpFzRuoXbg1ylPJqG/uHrsIq1W5+rKoXm1dcrm0c44xsPH5rR7TR9+t yL5amWMJQXieA9AFnxcIR1XVARAad6siGfI/H8a/wR1EqCq8RnydzwahQQciyX8jE5FV YHhIJHD8Lavr1GjK4vfzlBOgAZQGvjPhgsQ9k=

just a thought, but is that "file >> x >> x " double reading intended ?

On Thu, Jun 12, 2008 at 3:15 PM,
<>
wrote:
> I'm having a problem when I want to create a convex hull from a vector of
> points that I have no idea how to fix. When I use this code below, the
> program
> enter on the function CGAL::convex_hull_3 and doesn't come out.
>
> ifstream file("resources/geometry.txt");
> vector<Point> points;
> Field_number x, y, z;
>
> if(file.is_open()){
> while (!file.eof()) {
> file >> x >> x >> y >> z;
> Point point(x, y, z);
> points.push_back(point);
> }
> }
>
> CGAL::Object object;
>
> CGAL::convex_hull_3(points.begin(), points.end(), object);
>
> But, if I just cast the numbers read to int [ Point point((int)x, (int)y,
> (int)z); ], the code works fine.
>
> Does anybody know where I'm making the mistake?
>
> Thank you all!
> --
> 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