Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP !
  • Date: Wed, 7 Oct 2009 22:44:33 +0200 (CEST)

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...'
}

The first error is :

/usr/include/CGAL/Triangulation_2.h:77: erreur: no type named ‘size_type’
in ‘class CGAL::Etxy3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >
>

...followed by lots (of the same type)

I'm really stucked by this problem !

Thanks for help !

Gilles

PS : I'm using gcc under linux.



Archive powered by MHonArc 2.6.16.

Top of Page