Subject: CGAL users discussion list
List archive
- From: David Coeurjolly <>
- To: cgal-discuss <>
- Subject: [cgal-discuss] Problem customizing Polyhedron_3 Point type
- Date: Fri, 29 Jun 2012 09:36:44 +0200
Dear cgal-discuss,
I'm having issues with a customization of CGAL Polyhedron_3 and after
discussing about that with couple of CGAL gurus, I'm posting my problem here.
I would like to construct a Polyhedron_3 upon a specific point class (not a
custom vertex class via wrappers). More precisely, I would like to use
Weighted_point class which decorated a template class point with "weights"
(note: Weighted_Point inherits from the given class Point). Hence, my new
class of points satisfies with the point concept and many of the
methods/functions dealing with points can use the weighted points.... except
Polyherdon_3...
More precisely, I'm doing something like that:
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
struct My_items : public CGAL::Polyhedron_items_3
{
template <class Refs, class Traits>
struct Vertex_wrapper {
typedef CGAL::Weighted_point<typename Traits::Point_3, double> Point;
//CustomPoints
typedef CGAL::HalfedgeDS_vertex_base<Refs,CGAL::Tag_true,Point> Vertex;
};
template < class Refs, class Traits>
struct Halfedge_wrapper {
typedef CGAL::HalfedgeDS_halfedge_base<Refs>
Halfedge;
};
template < class Refs, class Traits>
struct Face_wrapper {
typedef typename Traits::Plane_3 Plane;
typedef CGAL::HalfedgeDS_face_base<Refs, CGAL::Tag_true, Plane> Face;
};
};
typedef CGAL::Polyhedron_3<K, My_items > Polyhedron_3;
but when I want to use it (for example to compute the convex hull of weighted
point considering only the point coordinates), I get an compilation error in
the Polyhedron_3 class (not matching function
‘CGAL::HalfedgeDS_in_place_list_vertex<...) which seems to be related to
Halfedge containers. Note: for the rest of the process, I really need the
weights to be associated with the points and not the polyhedron 3 vertices...
Am I doing something wrong ? How can I customize the Point class in
Polyhedron ?
thanks in advance,
David Coeurjolly
----------------
David Coeurjolly - Directeur de recherche CNRS
CNRS, LIRIS-UMR 5205
Université de Lyon
Batiment Nautibus
43 boulevard du 11 novembre 1918, 69622 Villeurbanne cedex, France
Tel : (+33) [0]4.72.44.82.40 Fax : (+33) [0]4.72.43.15.36
http://liris.cnrs.fr/david.coeurjolly
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
- [cgal-discuss] Problem customizing Polyhedron_3 Point type, David Coeurjolly, 06/29/2012
- Re: [cgal-discuss] Problem customizing Polyhedron_3 Point type, Laurent Rineau (CGAL/GeometryFactory), 06/29/2012
- Re: [cgal-discuss] Problem customizing Polyhedron_3 Point type, Philipp Moeller, 06/29/2012
Archive powered by MHonArc 2.6.18.