Subject: CGAL users discussion list
List archive
- From: "Bill Conan" <>
- To:
- Subject: [cgal-discuss] can't add attribute to vertices
- Date: Sun, 22 Jun 2008 12:55:31 +0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=M5pmaLfGrI5RKBVTrVrG6w7f+P0twnooNM1zXF/6keqGqZvpYHOS7lkTOGaPES9aU8 CPqJI7doinD73Oi7ZKgShMBLapquDjCz+p851zVyhGApoVT/vqgwtg/QNYPtZehKt/eL NDR6mkHVOs2BoiqP8oBBcfh7N1tOgrwQcvKJ8=
hello guys,
could you please show me an example of adding new attributes to the
vertex data structure.
i did this like this:
template < class Refs, class P >
struct My_vertex: public CGAL::HalfedgeDS_vertex_base<Refs,CGAL::Tag_true,P>
{
bool isSplitted;
My_vertex():CGAL::HalfedgeDS_vertex_base<Refs,CGAL::Tag_true,P>(),isSplitted(false)
{};
};
struct My_items: public CGAL::Polyhedron_items_3
{
template <class Refs, class Traits>
struct Halfedge_wrapper
{
typedef My_edge<Refs> Halfedge;
};
template <class Refs, class Traits>
struct Vertex_wrapper
{
typedef typename Traits::Point_3 Point;
typedef My_vertex<Refs,Point> Vertex;
};
};
but i won't compile giving the error under visual studio:
Error 4 error C2664: 'My_vertex<Refs,P>::My_vertex(const
My_vertex<Refs,P> &)' : cannot convert parameter 1 from 'const
CGAL::Point_3<R_>' to 'const My_vertex<Refs,P> &' c:\program
files\cgal-3.3.1\include\cgal\polyhedron_3.h 106 CGAL
the problematic function is this I_Polyhedron_vertex( const
Point_3& p) : VertexBase(p) {} under the file polyhedron_3.h
thanks.
- [cgal-discuss] can't add attribute to vertices, Bill Conan, 06/22/2008
Archive powered by MHonArc 2.6.16.