Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CAGL::To_double

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CAGL::To_double


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] CAGL::To_double
  • Date: Wed, 04 Feb 2015 07:15:42 +0100
  • Organization: GeometryFactory

On 02/04/2015 02:07 AM, Yuetong Luo wrote:
Dear all,

I am trying to to use "CGAL::To_double()" , but I am suffering from
compile error. My compiler is MicroSoft Visual studio 2010

The code:

#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
struct Kernel : public CGAL::Exact_predicates_exact_constructions_kernel
{};
typedef Kernel::Point_2 Point_2;
int main ()
{
Point_2 point(3,5);
CGAL::To_double(point.x());
return 0;
}

complile error:

ErrorC2955: Use of Class template reuires argument list
error C2440: '<function-style-cast>' : cannot convert from
'CGAL::Lazy_exact_nt<ET_>' to 'CGAL::To_double'


try CGAL::to_double(point.x());

All functions in CGAL are lowercase.

If you want to converter objects between kernel, you can use
the cartesian converter like this:

CGAL::Cartesian_converter<K1,K2> to_K2;
K1::Point_3 p1;
K2::Point_3 p2 = to_K2(p1);

Sebastien



Could anyone tell me how to modify the code to let it pass the compling
and building?

Thanks





Archive powered by MHonArc 2.6.18.

Top of Page