Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Finite Triangle from infinite cell in triangulation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Finite Triangle from infinite cell in triangulation


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Finite Triangle from infinite cell in triangulation
  • Date: Wed, 08 Aug 2007 08:53:10 +0200

Hi Satyajit,

just use the following function for v = the infinite vertex

template <class OutputIterator>
OutputIterator t.incident_cells ( Vertex_handle v, OutputIterator cells)
Copies the Cell_handles of all cells incident to v to the output iterator cells. If t.dimension() <3, then do nothing. Returns the resulting output iterator.
Precondition: v Vertex_handle(), t.is_vertex(v).

best,
Monique Teillaud

Satyajit Sarangi wrote:
Hi Laurent,
Thanx for the answer. However, the result which I was expecting didn't turn out. What I exactly wanted to do was to get the convex hull of certain points in 3D by using Delaunay triangulation and then only considering the cells which were infinite and extracting the finite triangle from the cells. It would be great if you could give me an idea about how to go about it.
Thanx
Satyajit

On 8/7/07, *Laurent Rineau* < <mailto:>> wrote:

On Wednesday 08 August 2007 01:04:56 Satyajit Sarangi wrote:
> Hi all,
> am new to cgal and was trying to extract the finite
triangle from an
> infinite cell and was wondering how to do it. I was also
wondering if there
> was a way by which if there was an iterator for the infinite cells.

Hi,

I assume that ch is the cell handle of an infinite cell, and tr is the
triangulation (of type Tr).

const int index = ch->index(tr.infinite_vertex()); // here is the trick
Point_3 pa = ch->vertex((index+1)&3)->point();
Point_3 pb = ch->vertex((index+2)&3)->point();
Point_3 pc = ch->vertex((index+3)&3)->point();

then Triangle_3(pa, pb, pc) is the finite triangle of ch.

--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
<https://lists-sop.inria.fr/wws/info/cgal-discuss>





Archive powered by MHonArc 2.6.16.

Top of Page