Subject: CGAL users discussion list
List archive
- From:
- To:
- Subject: Re:Re: Re: [cgal-discuss] how to do that?
- Date: Wed, 23 Jan 2008 17:14:34 +0100 (CET)
- Importance: Normal
You do not have to manipulate halfedges. The piece of code I gave allow
you to do what I done in the attached pdf.
The only thing to do I copy and paste the code, and adapt it to your own
problem.
So again:
typedef CGAL::Iso_rectangle_2<YOUR_KERNEL> Rectangle;
typedef CGAL::Segment_2<YOUR_KERNEL> Segment;
typedef CGAL::Ray_2<KernelCD> Ray;
typedef CGAL::Line_2<KernelCD> Line;
typedef std::list<Ray> RayList;
typedef std::list<Line> LineList;
typedef std::list<Segment> SegmentList;
struct Voronoi_recup { //Class using stream to get the voronoi diagram
RayList quR;
LineList quL;
SegmentList quS;
Voronoi_recup() {quR.clear();quL.clear();quS.clear();}
void operator<<(const Ray p){quR.insert(quR.begin(),p);}
void operator<<(const Line p){quL.insert(quL.begin(),p);}
void operator<<(const Segment p){quS.insert(quS.begin(),p);}
};
YOUR_TRIANGULATION T;
Voronoi_recup vor;
.......
.......
T.draw_dual(vor);
.......
.......
SegmentList Seglist ;
Rectangle bbox(ONE_CORNER,OPPOSITE CORNER);
//TODO: iterate over vor.quR , vor.quS and vor.quL to fill Seglist using
//iterator CGAL::intersection
CGAL::Object obj_cgal = CGAL::intersection(YOUR_OBJECT,bbox);
Segment s;
if (CGAL::assign(s, obj_cgal))
Seglist.push_back(s);
Hope I am clear.
Sebastien
Attachment:
example.pdf
Description: application/binary
- Re: Re: [cgal-discuss] how to do that?, bendaoud_med, 01/22/2008
- Re: Re: [cgal-discuss] how to do that?, Sebastien . Loriot, 01/22/2008
- Re:Re: Re: [cgal-discuss] how to do that?, hds, 01/23/2008
- Re:Re: Re: [cgal-discuss] how to do that?, Sebastien . Loriot, 01/23/2008
- <Possible follow-up(s)>
- Re: Re:Re: Re: [cgal-discuss] how to do that?, bendaoud_med, 01/23/2008
- Problems with Vector_3, Jens K. Becker, 01/24/2008
- RE: [cgal-discuss] Problems with Vector_3, Stephen Wong, 01/24/2008
- Re: [cgal-discuss] Problems with Vector_3, Andreas Fabri, 01/24/2008
- Re: [cgal-discuss] Problems with Vector_3, Jens K. Becker, 01/24/2008
- Problems with Vector_3, Jens K. Becker, 01/24/2008
Archive powered by MHonArc 2.6.16.