MEPP2 Project
Public Member Functions | Private Types | Private Attributes | List of all members
Triangulation< K > Class Template Reference

To subdivide a facet. (the kernel K must be exact) More...

#include <boolops_triangulation.hpp>

Collaboration diagram for Triangulation< K >:
Collaboration graph

Public Member Functions

 Triangulation (Halfedge_handle &he, Vector_exact &norm_dir)
 Constructor. More...
 
Point_tri get_minvar_point_2 (Point_3 &p)
 Compute the orthogonal projection of a point to the plane defined by the longest coordinate of the normal vector. More...
 
Vertex_handle_tri add_new_pt (Point_3 p, unsigned long &Label)
 Adds a point in the triangulation. More...
 
void add_segment (Point_3 &p1, Point_3 &p2, unsigned long &Label1, unsigned long &Label2)
 Adds a constrained segment in the triangulation. More...
 
std::vector< std::vector< unsigned long > > get_triangles (bool inv_triangles, bool *IsExt)
 Gets the triangles of the triangulation that belongs to the result and deduce for the three neighboring facets if they belong to the result or not. More...
 
std::vector< std::vector< unsigned long > > get_all_triangles (bool inv_triangles)
 Gets all the triangles of the triangulation. More...
 

Private Types

typedef K::Point_3 Point_3
 3d point using exact number type More...
 
typedef Enriched_vertex_base< K > Tri_vb
 Vertex base. More...
 
typedef Enriched_face_base< K > Tri_fb
 Face base. More...
 
typedef CGAL::Triangulation_data_structure_2< Tri_vb, Tri_fbTri_DS
 Data structure of the triangulation. More...
 
typedef CGAL::No_intersection_tag Itag
 No intersection tag. More...
 
typedef CGAL::Constrained_Delaunay_triangulation_2< K, Tri_DS, ItagConstrained_Delaunay_tri
 2d constrained Delaunay triangulation More...
 
typedef Constrained_Delaunay_tri::Vertex_handle Vertex_handle_tri
 Vertex handle for the triangulation. More...
 
typedef Constrained_Delaunay_tri::Face_handle Face_handle_tri
 Face handle for the triangulation. More...
 
typedef Constrained_Delaunay_tri::Point Point_tri
 2d point for the triangulation More...
 
typedef Constrained_Delaunay_tri::Face_iterator Face_iterator_tri
 Iterator for the faces of the triangulation. More...
 

Private Attributes

Constrained_Delaunay_tri ct
 The triangulation. More...
 
std::vector< InterIdpts_point
 List of the id of the points added in the triangulation. More...
 
std::vector< Vertex_handle_tripts_vertex
 List of the handles of the points added in the triangulation. More...
 
Vertex_handle_tri v1
 Handle of the point corresponding to the first vertex of the facet. More...
 
Vertex_handle_tri v2
 Handle of the point corresponding to the second vertex of the facet. More...
 
Vertex_handle_tri v3
 Handle of the point corresponding to the third vertex of the facet. More...
 
Vertex_handle_tri c1
 Handle of the point corresponding to the first vertex of the last segment added. More...
 
Vertex_handle_tri c2
 Handle of the point corresponding to the second vertex of the last segment added. More...
 
int max_coordinate
 Code identifying the plane where the triangulation is done
0 : Plane (y, z)
1 : Plane (z, x)
2 : Plane (x, y)
3 : Plane (z, y)
4 : Plane (x, z)
5 : Plane (y, x) More...
 

Detailed Description

template<class K>
class Triangulation< K >

To subdivide a facet. (the kernel K must be exact)

Definition at line 108 of file boolops_triangulation.hpp.

Member Typedef Documentation

◆ Constrained_Delaunay_tri

template<class K >
typename Triangulation< K >::Constrained_Delaunay_tri
private

2d constrained Delaunay triangulation

Definition at line 159 of file boolops_triangulation.hpp.

◆ Face_handle_tri

template<class K >
typename Triangulation< K >::Face_handle_tri
private

Face handle for the triangulation.

Definition at line 171 of file boolops_triangulation.hpp.

◆ Face_iterator_tri

template<class K >
typename Triangulation< K >::Face_iterator_tri
private

Iterator for the faces of the triangulation.

Definition at line 183 of file boolops_triangulation.hpp.

◆ Itag

template<class K >
typename Triangulation< K >::Itag
private

No intersection tag.

Definition at line 152 of file boolops_triangulation.hpp.

◆ Point_3

template<class K >
typename Triangulation< K >::Point_3
private

3d point using exact number type

Definition at line 114 of file boolops_triangulation.hpp.

◆ Point_tri

template<class K >
typename Triangulation< K >::Point_tri
private

2d point for the triangulation

Definition at line 177 of file boolops_triangulation.hpp.

◆ Tri_DS

template<class K >
typename Triangulation< K >::Tri_DS
private

Data structure of the triangulation.

Definition at line 132 of file boolops_triangulation.hpp.

◆ Tri_fb

template<class K >
typename Triangulation< K >::Tri_fb
private

Face base.

Definition at line 126 of file boolops_triangulation.hpp.

◆ Tri_vb

template<class K >
typename Triangulation< K >::Tri_vb
private

Vertex base.

Definition at line 120 of file boolops_triangulation.hpp.

◆ Vertex_handle_tri

template<class K >
typename Triangulation< K >::Vertex_handle_tri
private

Vertex handle for the triangulation.

Definition at line 165 of file boolops_triangulation.hpp.

Constructor & Destructor Documentation

◆ Triangulation()

template<class K >
Triangulation< K >::Triangulation ( Halfedge_handle he,
Vector_exact norm_dir 
)
inline

Constructor.

Parameters
he: A halfedge incident to the facet
norm_dir: The vector directing the normal of the facet

Definition at line 191 of file boolops_triangulation.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ add_new_pt()

template<class K >
Vertex_handle_tri Triangulation< K >::add_new_pt ( Point_3  p,
unsigned long &  Label 
)
inline

Adds a point in the triangulation.

Parameters
p: The point (in 3d : the projection in 2d is done automatically)
Label: The label of the point
Returns
The Vertex_handle of the point added

Definition at line 265 of file boolops_triangulation.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_segment()

template<class K >
void Triangulation< K >::add_segment ( Point_3 p1,
Point_3 p2,
unsigned long &  Label1,
unsigned long &  Label2 
)
inline

Adds a constrained segment in the triangulation.

Parameters
p1: The first point (in 3d)
p2: The second point (in 3d)
Label1: The label of the first point
Label2: The label of the second point

Definition at line 288 of file boolops_triangulation.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_all_triangles()

template<class K >
std::vector< std::vector<unsigned long> > Triangulation< K >::get_all_triangles ( bool  inv_triangles)
inline

Gets all the triangles of the triangulation.

Parameters
inv_triangles: must be true if the orientation of the triangles must be inverted
Returns
The list of the triangles belonging to the result. each triangle is defined by a list of three labels

Definition at line 399 of file boolops_triangulation.hpp.

Here is the caller graph for this function:

◆ get_minvar_point_2()

template<class K >
Point_tri Triangulation< K >::get_minvar_point_2 ( Point_3 p)
inline

Compute the orthogonal projection of a point to the plane defined by the longest coordinate of the normal vector.

Parameters
p: the point (in 3d)
Returns
The projection as a 2d point

Definition at line 232 of file boolops_triangulation.hpp.

Here is the caller graph for this function:

◆ get_triangles()

template<class K >
std::vector< std::vector<unsigned long> > Triangulation< K >::get_triangles ( bool  inv_triangles,
bool *  IsExt 
)
inline

Gets the triangles of the triangulation that belongs to the result and deduce for the three neighboring facets if they belong to the result or not.

Parameters
inv_triangles: must be true if the orientation of the triangles must be inverted
IsExt: Pointer on a three-case boolean table.
Returns
The list of the triangles belonging to the result. each triangle is defined by a list of three labels

Definition at line 307 of file boolops_triangulation.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ c1

template<class K >
Vertex_handle_tri Triangulation< K >::c1
private

Handle of the point corresponding to the first vertex of the last segment added.

Definition at line 435 of file boolops_triangulation.hpp.

◆ c2

template<class K >
Vertex_handle_tri Triangulation< K >::c2
private

Handle of the point corresponding to the second vertex of the last segment added.

Definition at line 437 of file boolops_triangulation.hpp.

◆ ct

template<class K >
Constrained_Delaunay_tri Triangulation< K >::ct
private

The triangulation.

Definition at line 423 of file boolops_triangulation.hpp.

◆ max_coordinate

template<class K >
int Triangulation< K >::max_coordinate
private

Code identifying the plane where the triangulation is done
0 : Plane (y, z)
1 : Plane (z, x)
2 : Plane (x, y)
3 : Plane (z, y)
4 : Plane (x, z)
5 : Plane (y, x)

Definition at line 446 of file boolops_triangulation.hpp.

◆ pts_point

template<class K >
std::vector<InterId> Triangulation< K >::pts_point
private

List of the id of the points added in the triangulation.

Definition at line 425 of file boolops_triangulation.hpp.

◆ pts_vertex

template<class K >
std::vector<Vertex_handle_tri> Triangulation< K >::pts_vertex
private

List of the handles of the points added in the triangulation.

Definition at line 427 of file boolops_triangulation.hpp.

◆ v1

template<class K >
Vertex_handle_tri Triangulation< K >::v1
private

Handle of the point corresponding to the first vertex of the facet.

Definition at line 429 of file boolops_triangulation.hpp.

◆ v2

template<class K >
Vertex_handle_tri Triangulation< K >::v2
private

Handle of the point corresponding to the second vertex of the facet.

Definition at line 431 of file boolops_triangulation.hpp.

◆ v3

template<class K >
Vertex_handle_tri Triangulation< K >::v3
private

Handle of the point corresponding to the third vertex of the facet.

Definition at line 433 of file boolops_triangulation.hpp.


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