MEPP2 Project
boolops_enriched_polyhedron.hpp
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published
6 // by the Free Software Foundation; either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 
12 #pragma once
13 
14 #include <CGAL/Cartesian.h>
15 #include <CGAL/Polyhedron_3.h>
16 #include <CGAL/Polyhedron_items_3.h>
17 #include <CGAL/HalfedgeDS_halfedge_max_base_with_id.h>
18 
19 #include "boolops_properties.h"
20 
21 
22 template< class Refs, class T, class P >
23 class EnrichedVertex : public CGAL::HalfedgeDS_vertex_base< Refs, T, P >
24 {
25 public:
26  // life cycle
28 
29  // repeat mandatory constructors
30  EnrichedVertex(const P &pt)
31  : CGAL::HalfedgeDS_vertex_base< Refs, T, P >(pt)
32  {
33  }
34 
35  // vertex properties
37 };
38 
39 
40 // EnrichedHalfedge derives from HalfedgeDS_halfedge_max_base_with_id
41 // rather than HalfedgeDS_halfedge_base to speed up CGAL::copy_face_graph()
42 template< class Refs, class ID >
44  : public CGAL::HalfedgeDS_halfedge_max_base_with_id< Refs, ID >
45 {
46 public:
47  // halfedge properties
49 };
50 
51 
52 template< class Refs, class T >
53 class EnrichedFacet : public CGAL::HalfedgeDS_face_base< Refs, T >
54 {
55 public:
56  // life cycle
58 
59  // face properties
61  bool IsExt;
63  bool IsOK;
66 };
67 
68 
69 struct EnrichedItems : public CGAL::Polyhedron_items_3
70 {
71  // wrap vertex
72  template< class Refs, class Traits >
74  {
75  typedef typename Traits::Point_3 Point;
76  typedef typename Traits::Vector_3 Normal;
78  };
79 
80  // wrap halfedge
81  template< class Refs, class Traits >
83  {
84  typedef typename Traits::Vector_3 Normal;
86  };
87 
88  // wrap face
89  template< class Refs, class Traits >
90  struct Face_wrapper
91  {
92  typedef typename Traits::Point_3 Point;
93  typedef typename Traits::Vector_3 Normal;
94  typedef typename Traits::Plane_3 Plane;
96  };
97 };
98 
99 
100 using CGALKernel = CGAL::Cartesian< double >;
102  CGAL::Polyhedron_3< CGALKernel, EnrichedItems >;
EnrichedFacet
Definition: boolops_enriched_polyhedron.hpp:54
EnrichedPolyhedron
CGAL::Polyhedron_3< CGALKernel, EnrichedItems > EnrichedPolyhedron
Definition: boolops_enriched_polyhedron.hpp:102
EnrichedFacet::IsOK
bool IsOK
true if the facet has been processed
Definition: boolops_enriched_polyhedron.hpp:63
EnrichedVertex
Definition: boolops_enriched_polyhedron.hpp:24
EnrichedItems::Halfedge_wrapper::Normal
Traits::Vector_3 Normal
Definition: boolops_enriched_polyhedron.hpp:84
EnrichedVertex::Label
VertexId Label
Definition: boolops_enriched_polyhedron.hpp:36
EnrichedFacet::IsExt
bool IsExt
true if the facet belongs to the result
Definition: boolops_enriched_polyhedron.hpp:61
EnrichedItems::Halfedge_wrapper
Definition: boolops_enriched_polyhedron.hpp:83
EnrichedItems::Face_wrapper::Point
Traits::Point_3 Point
Definition: boolops_enriched_polyhedron.hpp:92
HalfedgeId
unsigned long HalfedgeId
Halfedge Id.
Definition: boolops_properties.h:30
EnrichedFacet::EnrichedFacet
EnrichedFacet()
Definition: boolops_enriched_polyhedron.hpp:57
CGALKernel
CGAL::Cartesian< double > CGALKernel
Definition: boolops_enriched_polyhedron.hpp:100
EnrichedItems::Vertex_wrapper::Point
Traits::Point_3 Point
Definition: boolops_enriched_polyhedron.hpp:75
FacetId
unsigned long FacetId
Facet Id.
Definition: boolops_properties.h:36
CGAL
Definition: Graph_properties_cgal_point_set.h:32
EnrichedVertex::EnrichedVertex
EnrichedVertex(const P &pt)
Definition: boolops_enriched_polyhedron.hpp:30
EnrichedItems::Face_wrapper::Plane
Traits::Plane_3 Plane
Definition: boolops_enriched_polyhedron.hpp:94
EnrichedItems::Vertex_wrapper::Vertex
EnrichedVertex< Refs, CGAL::Tag_true, Point > Vertex
Definition: boolops_enriched_polyhedron.hpp:77
EnrichedItems::Vertex_wrapper
Definition: boolops_enriched_polyhedron.hpp:74
VertexId
unsigned long VertexId
Vertex Id.
Definition: boolops_properties.h:24
EnrichedItems
Definition: boolops_enriched_polyhedron.hpp:70
EnrichedItems::Face_wrapper::Face
EnrichedFacet< Refs, CGAL::Tag_true > Face
Definition: boolops_enriched_polyhedron.hpp:95
EnrichedHalfedge::Label
HalfedgeId Label
Definition: boolops_enriched_polyhedron.hpp:48
EnrichedItems::Halfedge_wrapper::Halfedge
EnrichedHalfedge< Refs, std::size_t > Halfedge
Definition: boolops_enriched_polyhedron.hpp:85
EnrichedHalfedge
Definition: boolops_enriched_polyhedron.hpp:45
boolops_properties.h
EnrichedItems::Face_wrapper
Definition: boolops_enriched_polyhedron.hpp:91
EnrichedItems::Vertex_wrapper::Normal
Traits::Vector_3 Normal
Definition: boolops_enriched_polyhedron.hpp:76
EnrichedFacet::Label
FacetId Label
An Id for the facet.
Definition: boolops_enriched_polyhedron.hpp:65
EnrichedVertex::EnrichedVertex
EnrichedVertex()
Definition: boolops_enriched_polyhedron.hpp:27
EnrichedItems::Face_wrapper::Normal
Traits::Vector_3 Normal
Definition: boolops_enriched_polyhedron.hpp:93