CGALIndexedPolyhedron.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Typedefs
27  IndexedPolyhedron
28 
29 Description
30  CGAL data structures used for triSurface handling
31 
32  Define CGAL_INEXACT to use Exact_predicates_inexact_constructions kernel
33  otherwise the more robust but much less efficient
34  Exact_predicates_exact_constructions will be used.
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef CGALIndexedPolyhedron_H
39 #define CGALIndexedPolyhedron_H
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 // Include uint.H before CGAL headers to define __STDC_LIMIT_MACROS
44 #include "uint.H"
45 
46 #include "CGAL3DKernel.H"
47 #include <CGAL/Polyhedron_3.h>
48 #include <CGAL/Nef_polyhedron_3.h>
49 
50 #include "label.H"
51 
52 
53 typedef CGAL::Point_3<K> Point;
54 typedef CGAL::Segment_3<K> Segment;
55 typedef CGAL::Direction_3<K> Direction;
56 typedef CGAL::Plane_3<K> Plane;
57 typedef CGAL::Triangle_3<K> Triangle;
58 
59 // Define new class with color and define the polyhedron types
60 template<class Refs>
62 :
63  public CGAL::HalfedgeDS_face_base<Refs>
64 {
65  Foam::label index;
66  Foam::label region;
67 };
68 
69 struct My_items
70 :
71  public CGAL::Polyhedron_items_3
72 {
73  template<class Refs, class Traits>
74  struct Face_wrapper
75  {
77  };
78 };
79 
80 
81 //typedef CGAL::Polyhedron_3<K> Polyhedron;
82 typedef CGAL::Polyhedron_3<K, My_items> Polyhedron;
83 
91 typedef Polyhedron::Halfedge_around_facet_const_circulator HFCC;
92 typedef Polyhedron::Vertex_const_iterator VCI;
93 
94 typedef CGAL::Nef_polyhedron_3<K> Nef_polyhedron;
95 
96 
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98 
99 #endif
100 
101 // ************************************************************************* //
HalfedgeDS
Polyhedron::HalfedgeDS HalfedgeDS
Definition: CGALIndexedPolyhedron.H:84
VCI
Polyhedron::Vertex_const_iterator VCI
Definition: CGALIndexedPolyhedron.H:92
Triangle
CGAL::Triangle_3< K > Triangle
Definition: CGALIndexedPolyhedron.H:57
IndexedFace
Definition: CGALIndexedPolyhedron.H:61
My_items::Face_wrapper::Face
IndexedFace< Refs > Face
Definition: CGALIndexedPolyhedron.H:76
Segment
CGAL::Segment_3< K > Segment
Definition: CGALIndexedPolyhedron.H:54
Plane
CGAL::Plane_3< K > Plane
Definition: CGALIndexedPolyhedron.H:56
IndexedFace::index
Foam::label index
Definition: CGALIndexedPolyhedron.H:65
My_items
Definition: CGALIndexedPolyhedron.H:69
CGAL3DKernel.H
A typedef for selecting inexact (faster) or exact (slower) 3D model.
HFCC
Polyhedron::Halfedge_around_facet_const_circulator HFCC
Definition: CGALIndexedPolyhedron.H:91
Vertex_iterator
Polyhedron::Vertex_iterator Vertex_iterator
Definition: CGALIndexedPolyhedron.H:87
Halfedge_handle
Polyhedron::Halfedge_handle Halfedge_handle
Definition: CGALIndexedPolyhedron.H:88
Vertex
Polyhedron::Vertex Vertex
Definition: CGALIndexedPolyhedron.H:86
uint.H
System unsigned integer.
label.H
Polyhedron
CGAL::Polyhedron_3< K, My_items > Polyhedron
Definition: CGALIndexedPolyhedron.H:82
Point
CGAL::Point_3< K > Point
Definition: CGALIndexedPolyhedron.H:53
IndexedFace::region
Foam::label region
Definition: CGALIndexedPolyhedron.H:66
Direction
CGAL::Direction_3< K > Direction
Definition: CGALIndexedPolyhedron.H:55
Nef_polyhedron
CGAL::Nef_polyhedron_3< K > Nef_polyhedron
Definition: CGALIndexedPolyhedron.H:94
Edge_iterator
Polyhedron::Edge_iterator Edge_iterator
Definition: CGALIndexedPolyhedron.H:85
Facet_iterator
Polyhedron::Facet_iterator Facet_iterator
Definition: CGALIndexedPolyhedron.H:90
My_items::Face_wrapper
Definition: CGALIndexedPolyhedron.H:74