Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Hidden Vertices in Regular_Triangulation_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Hidden Vertices in Regular_Triangulation_3


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] Hidden Vertices in Regular_Triangulation_3
  • Date: Fri, 16 Nov 2007 10:19:32 +0100
  • Organization: INRIA

Joshua A Levine a écrit :
Hi CGALers,

I was wondering about the mechanism for storing hidden vertices in the Regular_Triangulation_3 class. It seems that unlike in the 2D case, these vertices are only stored as a list of weighted points associated with whichever cell they are contained in. There seems to be no global way to access all of the hidden points for the triangulation (outside of checking every cell). Is this correct?

Moreover, because they are stored as a list of weighted points instead of as a list of actual vertices, it doesn't seem like there is a mechanism for storing additional information associated with these vertices. By this I mean if I have a custom Vertex class with some additional members, and if I'd like to use that class to store additional information for a point I want to insert, I may not be able to if that point becomes hidden. Is there a recommended way to store this sort of information without using some external bookkeeping? Is there even a moderately easy way to do it _with_ external bookkeeping?

What you can do is to setup a traits class with a different point type
which stores the information you need. Then write the predicates
accordingly. A quick hack might be to derive from the kernel point
type directly, then, nothing has to be done for predicates. Harder
if you use constructions (e.g. circumcenters).

template <typename K>
struct My_traits
: public K
{

struct Point_3
: typename K::Point_3 {

// eventually repeate ctors.

int my_id;
};

};

Then :

typedef CGAL::...kernel... K;
typedef My_traits<K> Traits;
typedef CGAL::Delaunay..._3<Traits> Delaunay;

...

To keep it simple for discussion purposes, consider a Regular_Triangulation_3 class where I want to store an associated id for each vertex I insert. But the triangulation is changing with both insertions and deletions, so at any time a point I insert could itself be hidden, or could hide other vertices already present. Similarly, on deletion I could unhide some points, but I'm pretty sure never hide anything.


--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.16.

Top of Page