Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] - Convert Point_3 to float x, y, z

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] - Convert Point_3 to float x, y, z


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] - Convert Point_3 to float x, y, z
  • Date: Fri, 15 Dec 2006 16:31:48 +0100
  • Organization: INRIA Sophia Antipolis, France

Cédric LE MAITRE wrote:
Hello,

I have a question on a problem which seems simple. But it's stupid, i don't found how to resolve it...
I just want to retrieve x, y and z values of a Point_3.
I try this:

typedef CGAL::Gmpz NT;
typedef CGAL::Homogeneous<NT> Kernel;
typedef Kernel::Point_3 Point_3;

[...]

Point_3 point(10, 0, 0);
float x = (float) point.x();

But this code returned an error of casting...
How is it possible to do the conversion ?

CGAL::to_double(p.x());

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project
CGAL, http://cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page