Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!


Chronological Thread 
  • From: Gilles Kneuss <>
  • To:
  • Subject: Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!
  • Date: Wed, 7 Oct 2009 23:20:19 +0200

Re-hello,

my last reply was not as clear as it should be :

DT2<Gt>* heritage=new DT2<Gt>();

or

DT2<K,Gt>* heritage=new DT2<Gt>();

Give the same compile problems (the first error is) :

"main.cpp:23: erreur: wrong number of template arguments (1, should be 2)"

Any other ideas ?


Gilles




2009/10/7 Gilles Kneuss <>
Hello,

Thank you for so quick response...

I tried to do so :

...

DT2<Gt>* heritage=new DT2<Gt>(); // Cela provoque une quantité d'erreur 'no type named...'

...

Also this :

...

DT2<K,Gt>* heritage=new DT2<Gt>();

...



result : main.cpp:23: erreur: wrong number of template arguments (1, should be 2)


Any other ideas ?


Gilles



2009/10/7 Laurent Rineau (GeometryFactory) <>

Le mercredi 07 octobre 2009 22:44:33, a écrit :
> Hello,
>
> I found an example of inherited class.
> It's in a  pdf-file about 2d Triangulations,
> from Pierre Alliez and Mariette Yvinec :
>
> Page 55 :
>
> Drawing Generators...
>
> template <class kernel, class TDS>
> class DT2 : public CGAL::Delaunay_triangulation_2<kernel,TDS>
> {
>     public:
>     void gl_draw_generators()
>     {
>
>         ::glBegin(GL_POINTS);
>
>         Point_iterator it;
>         for(it = points_begin();
>              it != points_end();
>              it++)
>         {
>                     const Point& p = *it;
>
>                     ::glVertex2f(p.x(),p.y());
>
>         }
>
>         ::glEnd();
>
>     }
>
> I tried to use the derivated class (DT2) this way :
>
> int main(int argc, char *argv[])
> {
>     typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
>     typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt;
>     typedef CGAL::Delaunay_triangulation_2<Gt> Delaunay;
>
>     Delaunay* normal=new Delaunay;     // Cela fonctionne ( pas d'héritage )
>
>     DT2<K,Gt>* heritage=new DT2<K,Gt>();   // Cela provoque une quantité
> d'erreur 'no type named...'

... =new DT2<Gt>();

i.e. remove the "K," before "Gt"...

--
Laurent Rineau, PhD
Release Manager of the CGAL Project
http://www.cgal.org/
R&D
Engineer at GeometryFactory
http://www.geometryfactory.com/
--
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