Subject: CGAL users discussion list
List archive
- From: <>
- To:
- Subject: [cgal-discuss] Inheriting from Extended_homogeneous
- Date: Mon, 23 Apr 2012 14:55:29 +0200 (CEST)
I'm trying the add one property to the point class.
By help from StackOverflow I was directed to Manual Chapter 11.5 Extensible
Kernel using this I wrote the code below.
The code will not compile and I get the error:
‘typename CGAL::Extended_homogeneous::Base’ names
'CGAL::Extended_homogeneous::Base’, which is not a class template|
== CODE ==
#include <CGAL/Extended_homogeneous.h>
template < typename K_, typename K_Base >
class My_base : public K_Base::template Base<K_>::Type
{
typedef typename K_Base::template Base<K_>::Type OldK;
public:
typedef K_ Kernel;
template < typename Kernel2 >
struct Base { typedef My_base<Kernel2, K_Base> Type; };
};
template < typename RT_ >
struct MyKernel : public CGAL::Type_equality_wrapper<My_base<MyKernel<RT_>,
CGAL::Homogeneous<RT_> >, MyKernel<RT_> >
{};
#include <CGAL/Nef_polyhedron_3.h>
typedef MyKernel<CGAL::Gmpz> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_Polyhedron;
typedef Nef_Polyhedron::Plane_3 Plane;
int main()
{
Nef_Polyhedron half_space(Plane(1,1,1,1), Nef_Polyhedron::EXCLUDED);
return 0;
}
====
If the inhertiance is changed to "public K_Base::Base::template B<K_>::Type"
it
will compile but Then I miss the propeties from Extentensions I guess? Because
I get the error "Constructor not available for this kernel" when I run the
program.
- [cgal-discuss] Inheriting from Extended_homogeneous, ulen, 04/23/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Sebastien Loriot (GeometryFactory), 04/24/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Johannes Ulén, 04/24/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Sebastien Loriot (GeometryFactory), 04/24/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Johannes Ulen, 04/24/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Sebastien Loriot (GeometryFactory), 04/25/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Johannes Ulen, 04/25/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Sebastien Loriot (GeometryFactory), 04/25/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Johannes Ulen, 04/25/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Sebastien Loriot (GeometryFactory), 04/25/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Johannes Ulén, 04/24/2012
- <Possible follow-up(s)>
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Tomislav Maric, 04/24/2012
- Re: [cgal-discuss] Inheriting from Extended_homogeneous, Sebastien Loriot (GeometryFactory), 04/24/2012
Archive powered by MHonArc 2.6.16.