Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
tympan::PolygonTriangulator Class Reference

This class provides triangulating simple polygons without holes. More...

#include <cgal_tools.h>

Collaboration diagram for tympan::PolygonTriangulator:
Collaboration graph
[legend]

Classes

struct  FaceInfo
 
struct  VertexInfo
 

Public Types

typedef CGAL::Triangulation_vertex_base_with_info_2< VertexInfo, CGAL_GtVbb
 
typedef CGAL::Triangulation_face_base_with_info_2< FaceInfo, CGAL_GtFbb
 
typedef CGAL::Constrained_triangulation_face_base_2< CGAL_Gt, FbbFb
 
typedef CGAL::Triangulation_data_structure_2< Vbb, FbTDS
 
typedef CGAL::Exact_predicates_tag Itag
 
typedef CGAL::Constrained_Delaunay_triangulation_2< CGAL_Gt, TDS, ItagCDT
 
typedef CDT::Vertex_handle Vertex_handle
 
typedef CDT::Face_handle Face_handle
 
typedef CDT::Triangle Triangle
 
typedef std::deque< CDT::Vertex_handle > Vertex_handles_container
 
typedef boost::array< unsigned, 3 > Tri_indices
 

Public Member Functions

 PolygonTriangulator (const CGAL_Polygon &poly_)
 Constructor from a CGAL_Polygon. More...
 
virtual ~PolygonTriangulator ()
 Destructor. More...
 
const CDTtriangulation () const
 Return CDT object. More...
 
const Vertex_handlevertex_handle (unsigned i) const
 Return the ith vertex handle. More...
 
const Vertex_handles_containervertex_handles () const
 Return the polygon vertex handles. More...
 
void exportTriangles (std::deque< CDT::Triangle > &triangles) const
 Exports the triangles inside the polygon. More...
 
void exportTrianglesIndices (std::deque< Tri_indices > &triangles) const
 Exports the triangles inside the polygon. More...
 

Protected Attributes

Vertex_handles_container poly_vh
 Polygon vertex handles. More...
 
const CGAL_Polygonpoly
 Reference to the CGAL_Polygon to triangulate. More...
 
CDT cdt
 

Detailed Description

This class provides triangulating simple polygons without holes.

Definition at line 118 of file cgal_tools.h.

Member Typedef Documentation

◆ CDT

typedef CGAL::Constrained_Delaunay_triangulation_2<CGAL_Gt, TDS, Itag> tympan::PolygonTriangulator::CDT

Definition at line 141 of file cgal_tools.h.

◆ Face_handle

typedef CDT::Face_handle tympan::PolygonTriangulator::Face_handle

Definition at line 144 of file cgal_tools.h.

◆ Fb

typedef CGAL::Constrained_triangulation_face_base_2<CGAL_Gt, Fbb> tympan::PolygonTriangulator::Fb

Definition at line 138 of file cgal_tools.h.

◆ Fbb

typedef CGAL::Triangulation_face_base_with_info_2<FaceInfo, CGAL_Gt> tympan::PolygonTriangulator::Fbb

Definition at line 137 of file cgal_tools.h.

◆ Itag

typedef CGAL::Exact_predicates_tag tympan::PolygonTriangulator::Itag

Definition at line 140 of file cgal_tools.h.

◆ TDS

typedef CGAL::Triangulation_data_structure_2<Vbb, Fb> tympan::PolygonTriangulator::TDS

Definition at line 139 of file cgal_tools.h.

◆ Tri_indices

typedef boost::array<unsigned, 3> tympan::PolygonTriangulator::Tri_indices

Definition at line 149 of file cgal_tools.h.

◆ Triangle

Definition at line 145 of file cgal_tools.h.

◆ Vbb

typedef CGAL::Triangulation_vertex_base_with_info_2<VertexInfo, CGAL_Gt> tympan::PolygonTriangulator::Vbb

Definition at line 136 of file cgal_tools.h.

◆ Vertex_handle

typedef CDT::Vertex_handle tympan::PolygonTriangulator::Vertex_handle

Definition at line 143 of file cgal_tools.h.

◆ Vertex_handles_container

typedef std::deque<CDT::Vertex_handle> tympan::PolygonTriangulator::Vertex_handles_container

Definition at line 146 of file cgal_tools.h.

Constructor & Destructor Documentation

◆ PolygonTriangulator()

tympan::PolygonTriangulator::PolygonTriangulator ( const CGAL_Polygon poly_)

Constructor from a CGAL_Polygon.

Definition at line 119 of file cgal_tools.cpp.

◆ ~PolygonTriangulator()

tympan::PolygonTriangulator::~PolygonTriangulator ( )
virtual

Destructor.

Definition at line 139 of file cgal_tools.cpp.

Member Function Documentation

◆ exportTriangles()

void tympan::PolygonTriangulator::exportTriangles ( std::deque< CDT::Triangle > &  triangles) const

Exports the triangles inside the polygon.

The vertices are identified by their coordinates NB : This function expect empty deque and will clear the deque passed.

Definition at line 148 of file cgal_tools.cpp.

◆ exportTrianglesIndices()

void tympan::PolygonTriangulator::exportTrianglesIndices ( std::deque< Tri_indices > &  triangles) const

Exports the triangles inside the polygon.

The vertices are identified by their vertice handles and thus triangles are simply triples NB : This function expect empty deque and will clear the deque passed.

Definition at line 168 of file cgal_tools.cpp.

Here is the caller graph for this function:

◆ triangulation()

const CDT& tympan::PolygonTriangulator::triangulation ( ) const
inline

Return CDT object.

Definition at line 155 of file cgal_tools.h.

◆ vertex_handle()

const PolygonTriangulator::Vertex_handle & tympan::PolygonTriangulator::vertex_handle ( unsigned  i) const

Return the ith vertex handle.

Definition at line 141 of file cgal_tools.cpp.

◆ vertex_handles()

const Vertex_handles_container& tympan::PolygonTriangulator::vertex_handles ( ) const
inline

Return the polygon vertex handles.

Definition at line 162 of file cgal_tools.h.

Member Data Documentation

◆ cdt

CDT tympan::PolygonTriangulator::cdt
protected

CDT (Constrained Delaunay Triangulation) is the type of the main CGAL object to build the triangulation.

Definition at line 189 of file cgal_tools.h.

◆ poly

const CGAL_Polygon& tympan::PolygonTriangulator::poly
protected

Reference to the CGAL_Polygon to triangulate.

Definition at line 188 of file cgal_tools.h.

◆ poly_vh

Vertex_handles_container tympan::PolygonTriangulator::poly_vh
protected

Polygon vertex handles.

Definition at line 187 of file cgal_tools.h.


The documentation for this class was generated from the following files: