Subject: CGAL users discussion list
List archive
- From: <>
- To:
- Subject: Re: Re: [cgal-discuss] Constraint Triangulation Face Base with info?
- Date: Sun, 12 Apr 2009 18:05:01 +0200 (CEST)
Hi, Everyone.
I'm a CGAL's beginner too. I implementing some mesh generating algorithms
(From 2D triangulaion to 3D mesh) recently. This problem confuse me for long
time too. Finally I found some answer in example in
[CGAL\examples\Triangulation_2]constrained.cpp and colored_face.cpp, and I
rewrote some concept for my purpose.
Following is my sample, help this will be helpful.
If there is any better solution, welcome to discuss with me. thanks.
eapping.
-------------------------------------------------------------------------
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>
enum TRIANGLE_TYPE { TERMINAL, SLEEVE , JUNCTION, CLOSED };
typedef struct _EDGE_INFO
{
int Edge_ID;
std::pair <int,int> Edge_Vertex;
CvPoint Edge_Center;
bool Is_Constrained;
} EDGE_INFO;
typedef struct _CDT_FACE_INFO
{
int Ttiangle_ID;
bool Is_Visited;
TRIANGLE_TYPE Triangle_Type;
CvPoint Triangle_Vertex[3];
CvPoint Triangle_Center;
LPSTR Label_String;
EDGE_INFO Edge_Info[3];
int Num_Constrained_Edge;
int Non_Constrained_Edge[3];
} CDT_FACE_INFO;
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb_Base;
typedef CGAL::Triangulation_face_base_with_info_2<CDT_FACE_INFO,K,Fb_Base> Fb;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag> CDT;
-------------------------------------------------------------------------
- [cgal-discuss] Constraint Triangulation Face Base with info?, Amir Vaxman, 04/11/2009
- Re: [cgal-discuss] Constraint Triangulation Face Base with info?, Laurent Rineau (GeometryFactory), 04/11/2009
- Re: [cgal-discuss] Constraint Triangulation Face Base with info?, avaxman, 04/12/2009
- Re: Re: [cgal-discuss] Constraint Triangulation Face Base with info?, s96321532, 04/12/2009
- Re: Re: Re: [cgal-discuss] Constraint Triangulation Face Base with, s96321532, 04/12/2009
- Re: Re: [cgal-discuss] Constraint Triangulation Face Base with info?, s96321532, 04/12/2009
- Re: [cgal-discuss] Constraint Triangulation Face Base with info?, avaxman, 04/12/2009
- Re: [cgal-discuss] Constraint Triangulation Face Base with info?, Laurent Rineau (GeometryFactory), 04/11/2009
Archive powered by MHonArc 2.6.16.