Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!
- Date: Wed, 7 Oct 2009 22:53:00 +0200
- Organization: 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/
- [cgal-discuss] Having still problems inheriting CGAL classes ! HELP !, gilles.kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/08/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Gilles Kneuss, 10/07/2009
- Re: [cgal-discuss] Having still problems inheriting CGAL classes ! HELP!, Laurent Rineau (GeometryFactory), 10/07/2009
Archive powered by MHonArc 2.6.16.