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: Laurent Rineau <>
  • To:
  • Subject: Re: [cgal-discuss] Finite Triangle from infinite cell in triangulation
  • Date: Wed, 8 Aug 2007 01:19:22 +0200
  • Organization: Inria, Sophia Antipolis, FRANCE

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



Archive powered by MHonArc 2.6.16.

Top of Page