Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Check if vertex was inserted inside input constraint

Subject: CGAL users discussion list

List archive

[cgal-discuss] Check if vertex was inserted inside input constraint


Chronological Thread 
  • From: Raul Gallegos <>
  • To:
  • Subject: [cgal-discuss] Check if vertex was inserted inside input constraint
  • Date: Fri, 26 Jul 2013 16:28:24 -0500

Hello,

For example. I inserted points and a constraint on a Constrained Delaunay Triangulation, like this:

Vertex_handle va = cdt.insert(Point(2,2));
  Vertex_handle vb = cdt.insert(Point(-2,2));
  Vertex_handle vc = cdt.insert(Point(2,-2));
  Vertex_handle vd = cdt.insert(Point(-2,-2));


  cdt.insert_constraint(vb, vc);

Vertex_handle vertex_in_const = cdt.insert(Point(-1, 1));
Vertex_handle vertex_in_const = cdt.insert(Point(0,0));
Vertex_handle vertex_in_const = cdt.insert(Point(1,-1));

This generates the triangulation attached.

Inline image 2

So there are 3 points inserted on the constrained. How can I check if a vertex is on this case (inserted on a constrained) ?.

I only know about iterating constraints, and check is a vertex isn't one of the vertices that form this constraint, and then check if the the Point is inside the Line that forms this constrained. Isn't there a better and faster solution?

Thank you.

--
Raul O. Gallegos Hidalgo

Attachment: cdt.png
Description: PNG image




Archive powered by MHonArc 2.6.18.

Top of Page