Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] problem conserning about extensible kernel

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] problem conserning about extensible kernel


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] problem conserning about extensible kernel
  • Date: Mon, 18 Jul 2011 11:06:57 +0200

The type-equality wrapper (making Kernel::Point_2 and Point_2<Kernel> identical, C_Point_2 in your case) only exposes constructors of
Point_2<Kernel>.

We are currently thinking about a solution to blindly (but type-safely)
forward constructors.

In your case, C_Kernel::Point_2 (which is CGAL::Point_2<C_Kernel>)
inherits from C_Point2. You can do something like this for example:

Point p(C_Point2(1.0f,2.0f,3,2));

In passing x() const should return a const reference otherwise
const cartesian iterator is using a reference to a temporary
(same for y() const)

Sebastien.

Yue Biek wrote:
Hi,
When I study the Extensible Kernel,I meet a problem,which described as follows:
I wish to create a C_Kernel for my C_Point2 class(all in the attachment), and I create a constructor initializer for the C_point2 class which takes four parameters.the pronlem turns out as i wish to initialize the point. part of the code in the *C_Kernel* is:

* typedef C_Point2 Point_2*
***
* in *main()* I just call the constructor initializer *
*
* Point p(1.0f,2.0f,3,2)*

then it turns out to wrong,complier says that the class has no constructor initializer that takes 4 parameters.
And i found the Point_2 is not the point which I defined in the C_Point2 ,But when i changed the code as
* typedef C_Point2 Point*.

Then the program go right. I wish to know why? May be my depict are not clear,a example has been attached
in the attachment and my complier is VS2008 in Win7. Thank you!




Archive powered by MHonArc 2.6.16.

Top of Page