MEPP2 Project
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BoolPolyhedra< HalfedgeGraph > Class Template Reference

The class that compute a Boolean operation. More...

#include <boolops_polyhedra.hpp>

Collaboration diagram for BoolPolyhedra< HalfedgeGraph >:
Collaboration graph

Classes

struct  Info_Inter
 Contains informations about an intersection between a facet and a halfedge. More...
 
struct  Triangle_Cut
 A structure containing informations about an intersected facet. More...
 

Public Member Functions

 BoolPolyhedra (HalfedgeGraph &_gA, HalfedgeGraph &_gB, HalfedgeGraph &_g_out, Bool_Op BOOP)
 Constructor. More...
 
 ~BoolPolyhedra ()
 Destructor. More...
 

Private Member Functions

void Init (EnrichedPolyhedron *pMA, EnrichedPolyhedron *pMB)
 Initialisation of the tags, and triangulation of the two input polyhedra. More...
 
void triangulate (EnrichedPolyhedron *m)
 Triangulate the mesh. More...
 
void FindCouples ()
 Finds every couple of facets between the two input polyhedra that intersects. More...
 
void ComputeIntersections ()
 Compute the intersections. More...
 
void CutIntersectedFacets ()
 Cuts the intersected facets and starts to build the result. More...
 
void PropagateFacets ()
 Complete the building of the result. More...
 
void rmCouple (FacetId &A, FacetId &B)
 removes properly a couple from the list More...
 
void InterTriangleTriangle (FacetId &A, FacetId &B)
 Compute the intersection between two facets. More...
 
void InterTriangleSegment (Info_Inter *inter)
 Compute the intersection between a facet and a halfedge. More...
 
void IsInTriangle (Info_Inter *inter)
 Finds the position of a point in a 3d triangle. More...
 
bool IsSegment (Info_Inter *inter)
 Verify that the intersection is a segment. More...
 
void Get_Segment (Info_Inter *inter, std::vector< InterId > &I)
 Extracts the segment from a set of four intersection points and store these points in the list of intersecion points
There must be two valid and distinct points in the set. More...
 
void Store_Intersection (Info_Inter *inter)
 Store the intersection and memorize it for every couples of facet-halfedge. More...
 
void add_facet_to_solution (Facet_handle &pFacet, bool facet_from_A)
 Add a facet to the result. More...
 

Private Attributes

Bool_Op m_BOOP
 Boolean operation computed. More...
 
EnrichedPolyhedronm_pA
 The first input polyhedron. More...
 
EnrichedPolyhedronm_pB
 The second input polyhedron. More...
 
CPolyhedron_from_polygon_builder_3< HDSppbuilder
 The polyhedron builder. More...
 
std::map< FacetId, std::set< FacetId > > m_Couples
 Lists the couples of facets that intersect. More...
 
std::vector< Point3d_exactm_InterPts
 Lists the exact intersection points computed. More...
 
std::vector< Triangle_Cutm_Inter_tri
 Informations about the intersected facets. More...
 
std::vector< Facet_handlem_Facet_Handle
 Index to obtain the handle of a facet with its Id. More...
 
AABB_Tree tree
 the AABB-tree More...
 
double duration_Inputs_copy
 Input meshes copy time. More...
 
double duration_Init
 Initialisation time. More...
 
double duration_FindCouples
 Time to find all the couples of facet that intersect. More...
 
double duration_ComputeIntersections
 Time to Compute all the intersections. More...
 
double duration_CutIntersectedFacets
 Time to Cut the facets. More...
 
double duration_PropagateFacets
 Time to complete the result with the facets from the input polyhedra. More...
 
double duration_delegate
 Time to create the result polyhedron. More...
 
double duration_Output_copy
 Output mesh copy time. More...
 
double duration_total
 Time to Compute a Boolean operation. More...
 

Detailed Description

template<typename HalfedgeGraph>
class BoolPolyhedra< HalfedgeGraph >

The class that compute a Boolean operation.

Definition at line 133 of file boolops_polyhedra.hpp.

Constructor & Destructor Documentation

◆ BoolPolyhedra()

template<typename HalfedgeGraph >
BoolPolyhedra< HalfedgeGraph >::BoolPolyhedra ( HalfedgeGraph &  _gA,
HalfedgeGraph &  _gB,
HalfedgeGraph &  _g_out,
Bool_Op  BOOP 
)
inline

Constructor.

Computes a boolean operation

Parameters
_gA: The first mesh
_gB: The second mesh
_g_out: The result mesh
BOOP: The Boolean operator. Must be UNION, INTER or MINUS

Definition at line 200 of file boolops_polyhedra.hpp.

Here is the call graph for this function:

◆ ~BoolPolyhedra()

template<typename HalfedgeGraph >
BoolPolyhedra< HalfedgeGraph >::~BoolPolyhedra ( )
inline

Destructor.

Definition at line 354 of file boolops_polyhedra.hpp.

Member Function Documentation

◆ add_facet_to_solution()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::add_facet_to_solution ( Facet_handle pFacet,
bool  facet_from_A 
)
inlineprivate

Add a facet to the result.

Parameters
pFacet: A handle to the facet to add
facet_from_A: must be true if the facet belongs to the first polyhedron

Definition at line 1760 of file boolops_polyhedra.hpp.

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

◆ ComputeIntersections()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::ComputeIntersections ( )
inlineprivate

Compute the intersections.

Definition at line 598 of file boolops_polyhedra.hpp.

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

◆ CutIntersectedFacets()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::CutIntersectedFacets ( )
inlineprivate

Cuts the intersected facets and starts to build the result.

Definition at line 612 of file boolops_polyhedra.hpp.

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

◆ FindCouples()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::FindCouples ( )
inlineprivate

Finds every couple of facets between the two input polyhedra that intersects.

Each couple is stored in the member m_Couples

Definition at line 485 of file boolops_polyhedra.hpp.

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

◆ Get_Segment()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::Get_Segment ( Info_Inter inter,
std::vector< InterId > &  I 
)
inlineprivate

Extracts the segment from a set of four intersection points and store these points in the list of intersecion points
There must be two valid and distinct points in the set.

Parameters
inter: A pointer to four Info_Inter structure
I: A vector to store the Id of the two intersection points (the output segment)

Definition at line 1465 of file boolops_polyhedra.hpp.

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

◆ Init()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::Init ( EnrichedPolyhedron pMA,
EnrichedPolyhedron pMB 
)
inlineprivate

Initialisation of the tags, and triangulation of the two input polyhedra.

Parameters
pMA: The first polyhedron
pMB: The second polyhedron

Definition at line 360 of file boolops_polyhedra.hpp.

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

◆ InterTriangleSegment()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::InterTriangleSegment ( Info_Inter inter)
inlineprivate

Compute the intersection between a facet and a halfedge.

Parameters
inter: A pointer to an Info_Inter structure.

Definition at line 1240 of file boolops_polyhedra.hpp.

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

◆ InterTriangleTriangle()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::InterTriangleTriangle ( FacetId A,
FacetId B 
)
inlineprivate

Compute the intersection between two facets.

Parameters
A: Facet Id of the first facet (from the first polyhedron)
B: Facet Id of the second facet (from the second polyhedron)

Definition at line 744 of file boolops_polyhedra.hpp.

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

◆ IsInTriangle()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::IsInTriangle ( Info_Inter inter)
inlineprivate

Finds the position of a point in a 3d triangle.

Parameters
inter: A pointer to an Info_Inter structure

Definition at line 1308 of file boolops_polyhedra.hpp.

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

◆ IsSegment()

template<typename HalfedgeGraph >
bool BoolPolyhedra< HalfedgeGraph >::IsSegment ( Info_Inter inter)
inlineprivate

Verify that the intersection is a segment.

Parameters
inter: A pointer to four Info_Inter structures
Returns
true if two distinct points are found in the four intersections computed

Definition at line 1369 of file boolops_polyhedra.hpp.

Here is the caller graph for this function:

◆ PropagateFacets()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::PropagateFacets ( )
inlineprivate

Complete the building of the result.

Definition at line 654 of file boolops_polyhedra.hpp.

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

◆ rmCouple()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::rmCouple ( FacetId A,
FacetId B 
)
inlineprivate

removes properly a couple from the list

Parameters
A: Id of the first facet
B: Id of the second facet

Definition at line 734 of file boolops_polyhedra.hpp.

Here is the caller graph for this function:

◆ Store_Intersection()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::Store_Intersection ( Info_Inter inter)
inlineprivate

Store the intersection and memorize it for every couples of facet-halfedge.

Parameters
inter: A pointer to an Info_Inter structure

Definition at line 1494 of file boolops_polyhedra.hpp.

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

◆ triangulate()

template<typename HalfedgeGraph >
void BoolPolyhedra< HalfedgeGraph >::triangulate ( EnrichedPolyhedron m)
inlineprivate

Triangulate the mesh.

Parameters
m: The polyhedron to trinagulate

Definition at line 421 of file boolops_polyhedra.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ duration_ComputeIntersections

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_ComputeIntersections
private

Time to Compute all the intersections.

Definition at line 1943 of file boolops_polyhedra.hpp.

◆ duration_CutIntersectedFacets

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_CutIntersectedFacets
private

Time to Cut the facets.

Definition at line 1945 of file boolops_polyhedra.hpp.

◆ duration_delegate

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_delegate
private

Time to create the result polyhedron.

Definition at line 1949 of file boolops_polyhedra.hpp.

◆ duration_FindCouples

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_FindCouples
private

Time to find all the couples of facet that intersect.

Definition at line 1941 of file boolops_polyhedra.hpp.

◆ duration_Init

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_Init
private

Initialisation time.

Definition at line 1939 of file boolops_polyhedra.hpp.

◆ duration_Inputs_copy

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_Inputs_copy
private

Input meshes copy time.

Definition at line 1937 of file boolops_polyhedra.hpp.

◆ duration_Output_copy

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_Output_copy
private

Output mesh copy time.

Definition at line 1951 of file boolops_polyhedra.hpp.

◆ duration_PropagateFacets

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_PropagateFacets
private

Time to complete the result with the facets from the input polyhedra.

Definition at line 1947 of file boolops_polyhedra.hpp.

◆ duration_total

template<typename HalfedgeGraph >
double BoolPolyhedra< HalfedgeGraph >::duration_total
private

Time to Compute a Boolean operation.

Definition at line 1953 of file boolops_polyhedra.hpp.

◆ m_BOOP

template<typename HalfedgeGraph >
Bool_Op BoolPolyhedra< HalfedgeGraph >::m_BOOP
private

Boolean operation computed.

Definition at line 1913 of file boolops_polyhedra.hpp.

◆ m_Couples

template<typename HalfedgeGraph >
std::map< FacetId, std::set< FacetId > > BoolPolyhedra< HalfedgeGraph >::m_Couples
private

Lists the couples of facets that intersect.

Definition at line 1925 of file boolops_polyhedra.hpp.

◆ m_Facet_Handle

template<typename HalfedgeGraph >
std::vector< Facet_handle > BoolPolyhedra< HalfedgeGraph >::m_Facet_Handle
private

Index to obtain the handle of a facet with its Id.

Definition at line 1931 of file boolops_polyhedra.hpp.

◆ m_Inter_tri

template<typename HalfedgeGraph >
std::vector< Triangle_Cut > BoolPolyhedra< HalfedgeGraph >::m_Inter_tri
private

Informations about the intersected facets.

Definition at line 1929 of file boolops_polyhedra.hpp.

◆ m_InterPts

template<typename HalfedgeGraph >
std::vector< Point3d_exact > BoolPolyhedra< HalfedgeGraph >::m_InterPts
private

Lists the exact intersection points computed.

Definition at line 1927 of file boolops_polyhedra.hpp.

◆ m_pA

template<typename HalfedgeGraph >
EnrichedPolyhedron* BoolPolyhedra< HalfedgeGraph >::m_pA
private

The first input polyhedron.

Definition at line 1916 of file boolops_polyhedra.hpp.

◆ m_pB

template<typename HalfedgeGraph >
EnrichedPolyhedron* BoolPolyhedra< HalfedgeGraph >::m_pB
private

The second input polyhedron.

Definition at line 1918 of file boolops_polyhedra.hpp.

◆ ppbuilder

template<typename HalfedgeGraph >
CPolyhedron_from_polygon_builder_3<HDS> BoolPolyhedra< HalfedgeGraph >::ppbuilder
private

The polyhedron builder.

Definition at line 1922 of file boolops_polyhedra.hpp.

◆ tree

template<typename HalfedgeGraph >
AABB_Tree BoolPolyhedra< HalfedgeGraph >::tree
private

the AABB-tree

Definition at line 1934 of file boolops_polyhedra.hpp.


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