Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Extending Arrangement_2 and storing Face handles

Subject: CGAL users discussion list

List archive

[cgal-discuss] Extending Arrangement_2 and storing Face handles


Chronological Thread 
  • From: D Weterings <>
  • To:
  • Subject: [cgal-discuss] Extending Arrangement_2 and storing Face handles
  • Date: Mon, 19 Mar 2012 07:21:57 -0700 (PDT)

Hello,

I'm currently trying to extend the DCEL of Arrangement_2: each vertex needs
to store a value (f.e. a double, but it is irrelevant to the question) that
is specific for each of its surrounding faces. Unless I'm missing something
this means I will need to extend the DCEL and store something like a vector
of pairs where each pair contains a double and a Face handle at each vertex.

A simplified example:

class VertexData
{
public:
std::vector< std::pair<Face_const_handle, double> > data;
};

typedef CGAL::Arr_extended_dcel< Traits_2, VertexData > Dcel;

typedef CGAL::Arrangement_2<Traits_2, Dcel> Arrangement_2_ext;

The problem is that Face_const_handle seems to depend on the full definition
of Arrangement_2_ext, so C++ cannot know what type the Face_const_handle is?
I'll admit my C++ template knowledge is pretty bad, so perhaps there is a
solution I'm not aware of.

Instead of using the extended_vertex/face functionality perhaps I could
extend the vertex base class and then get the right Face_const_handle
definition? From the source files I've seen this didn't seem possible
either.

Thanks!

--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Extending-Arrangement-2-and-storing-Face-handles-tp4484944p4484944.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page