Loading...
Searching...
No Matches
CG.hpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of bitpit.
10 *
11 * bitpit is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * bitpit is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with bitpit. If not, see <http://www.gnu.org/licenses/>.
22 *
23\*---------------------------------------------------------------------------*/
24
25# ifndef __BITPIT_CG_BASE_HPP__
26# define __BITPIT_CG_BASE_HPP__
27
28// Standard Template Library
29# include <array>
30# include <vector>
31
32// bitpit library
33# include "bitpit_common.hpp"
34
35namespace bitpit{
36
37
38namespace CGElem{
39
40typedef std::array<double,3> array3D ;
41
47const double DEFAULT_DISTANCE_TOLERANCE = 1.e-12;
48const double DEFAULT_COPLANARITY_TOLERANCE = 1.e-12;
49
53const std::array< std::array<int,2>,12> boxEdgeVertexConnectivity =
54{{
55 std::array<int,2>{ {0,2} },
56 std::array<int,2>{ {1,3} },
57 std::array<int,2>{ {0,1} },
58 std::array<int,2>{ {2,3} },
59 std::array<int,2>{ {4,6} },
60 std::array<int,2>{ {5,7} },
61 std::array<int,2>{ {4,5} },
62 std::array<int,2>{ {6,7} },
63 std::array<int,2>{ {0,4} },
64 std::array<int,2>{ {1,5} },
65 std::array<int,2>{ {2,6} },
66 std::array<int,2>{ {3,7} }
67
68}};
69
73const std::array< std::array<int,4>, 6> boxFaceVertexConnectivity =
74{{
75 std::array<int,4>{ {0,2,6,4} },
76 std::array<int,4>{ {1,3,7,5} },
77 std::array<int,4>{ {0,4,5,1} },
78 std::array<int,4>{ {2,6,7,3} },
79 std::array<int,4>{ {0,1,3,2} },
80 std::array<int,4>{ {4,5,7,6} }
81}};
82
87bool validSegment( array3D const &, array3D const & );
88bool validLine( array3D const &, array3D const & );
89bool validPlane( array3D const &, array3D const & );
90bool validTriangle( array3D const &, array3D const &, array3D const & );
91bool validBarycentric( double const * , int );
92
93int convertBarycentricToFlagSegment( std::array<double,2> const &, double tolerance = DEFAULT_DISTANCE_TOLERANCE);
94int convertBarycentricToFlagSegment( const double *lambda, double tolerance = DEFAULT_DISTANCE_TOLERANCE);
95int convertBarycentricToFlagTriangle( std::array<double,3> const &, double tolerance = DEFAULT_DISTANCE_TOLERANCE);
96int convertBarycentricToFlagTriangle( const double *lambda, double tolerance = DEFAULT_DISTANCE_TOLERANCE);
97int convertBarycentricToFlagPolygon( std::vector<double> const &, double tolerance = DEFAULT_DISTANCE_TOLERANCE);
98int convertBarycentricToFlagPolygon( std::size_t, double const *, double tolerance = DEFAULT_DISTANCE_TOLERANCE);
99
100void computeGeneralizedBarycentric( array3D const &, std::vector<array3D> const &, std::vector<double> &);
101void computeGeneralizedBarycentric( array3D const &, std::size_t, array3D const *, std::vector<double> &);
102void computeGeneralizedBarycentric( array3D const &, std::size_t, array3D const *, double *);
103
104array3D reconstructPointFromBarycentricSegment( array3D const &, array3D const &, std::array<double,2> const & );
105array3D reconstructPointFromBarycentricSegment( array3D const &, array3D const &, double const * );
106array3D reconstructPointFromBarycentricTriangle( array3D const &, array3D const &, array3D const &, std::array<double,3> const & );
107array3D reconstructPointFromBarycentricTriangle( array3D const &, array3D const &, array3D const &, double const * );
108array3D reconstructPointFromBarycentricPolygon( std::vector<array3D> const &, std::vector<double> const & );
109array3D reconstructPointFromBarycentricPolygon( std::size_t, array3D const *, std::vector<double> const & );
110array3D reconstructPointFromBarycentricPolygon( std::size_t, array3D const *, double const * );
111
112array3D rotatePoint( const array3D &P, const array3D &n0, const array3D &n1, double angle );
113
114array3D projectPointLine( array3D const &, array3D const &, array3D const & );
115array3D projectPointPlane( array3D const &, array3D const &, array3D const & );
116array3D projectPointSegment( array3D const &, array3D const &, array3D const & );
117array3D projectPointSegment( array3D const &, array3D const &, array3D const &, std::array<double,2> & );
118array3D projectPointSegment( array3D const &, array3D const &, array3D const &, double* );
119array3D projectPointTriangle( array3D const &, array3D const &, array3D const &, array3D const & );
120array3D projectPointTriangle( array3D const &, array3D const &, array3D const &, array3D const &, array3D & );
121array3D projectPointTriangle( array3D const &P, array3D const &Q0, array3D const &Q1, array3D const &Q2, double *lambda );
122array3D projectPointPolygon( array3D const &, std::vector<array3D> const & );
123array3D projectPointPolygon( array3D const &, std::size_t, array3D const * );
124array3D projectPointPolygon( array3D const &, std::vector<array3D> const &, std::vector<double> & );
125array3D projectPointPolygon( array3D const &, std::size_t, array3D const *, std::vector<double> & );
126array3D projectPointPolygon( array3D const &, std::size_t, array3D const *, double * );
127array3D projectPointCone( array3D const &, array3D const &, array3D const &, double );
128std::vector<array3D> projectCloudTriangle( std::vector<array3D> const &, array3D const &, array3D const &, array3D const &, std::vector<array3D> &);
129
130array3D restrictPointTriangle( array3D const &, array3D const &, array3D const &, array3D &);
131array3D restrictPointTriangle( array3D const &, array3D const &, array3D const &, double *);
132
133double distancePointLine( array3D const &, array3D const &, array3D const &, array3D & ) ;
134double distancePointPlane( array3D const &, array3D const &, array3D const &, array3D & ) ;
135
136double distancePointSegment( array3D const &, array3D const &, array3D const & );
137double distancePointSegment( array3D const &, array3D const &, array3D const &, std::array<double,2> & );
138
139double distancePointTriangle( array3D const &, array3D const &, array3D const &, array3D const &);
140double distancePointTriangle( array3D const &, array3D const &, array3D const &, array3D const &, array3D &);
141
142double distancePointPolygon( array3D const &, std::vector<array3D> const &, array3D &, int & );
143double distancePointPolygon( array3D const &, std::size_t, array3D const *, array3D &, int & );
144double distancePointPolygon( array3D const &, std::vector<array3D> const & );
145double distancePointPolygon( array3D const &, std::size_t, array3D const * );
146double distancePointPolygon( array3D const &, std::vector<array3D> const &, std::vector<double> & );
147double distancePointPolygon( array3D const &, std::size_t, array3D const *, std::vector<double> & );
148double distancePointPolygon( array3D const &, std::size_t, array3D const *, double * );
149
150double distancePointCone( array3D const &, array3D const &, array3D const &, double );
151
152std::vector<double> distanceCloudTriangle( std::vector<array3D> const &, array3D const &, array3D const &, array3D const &);
153std::vector<double> distanceCloudTriangle( std::vector<array3D> const &, array3D const &, array3D const &, array3D const &, std::vector<array3D> & );
154
155std::vector<double> distanceCloudPolygon( std::vector<array3D> const &, std::vector<array3D> const &, std::vector<array3D> &, std::vector<int> & );
156std::vector<double> distanceCloudPolygon( std::vector<array3D> const &, std::size_t, array3D const *, std::vector<array3D> &, std::vector<int> & );
157std::vector<double> distanceCloudPolygon( std::vector<array3D> const &, std::vector<array3D> const &);
158std::vector<double> distanceCloudPolygon( std::vector<array3D> const &, std::size_t, array3D const *);
159std::vector<double> distanceCloudPolygon( std::vector<array3D> const &, std::vector<array3D> const &, std::vector<std::vector<double>> &);
160std::vector<double> distanceCloudPolygon( std::vector<array3D> const &, std::size_t, array3D const *, std::vector<std::vector<double>> &);
161
162double distanceLineLine(array3D const &, array3D const &, array3D const &, array3D const &);
163double distanceLineLine(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &);
164
165
166bool intersectPointLine( array3D const &, array3D const &, array3D const &,
167 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
168bool intersectPointSegment( array3D const &, array3D const &, array3D const &,
169 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
170bool intersectPointTriangle( array3D const &, array3D const &, array3D const &, array3D const &,
171 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
172bool intersectPointBox( array3D const &, array3D const &, array3D const &, int dim=3,
173 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
174
175bool intersectLineLine( array3D const &, array3D const &, array3D const &, array3D const &, array3D &,
176 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
177bool intersectLinePlane( array3D const &, array3D const &, array3D const &, array3D const &, array3D &,
178 const double coplanarityTolerance = DEFAULT_COPLANARITY_TOLERANCE) ;
179bool intersectLineTriangle( array3D const &, array3D const &, array3D const &, array3D const &, array3D const &,
180 array3D &, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
181bool intersectLinePolygon( array3D const &, array3D const &, std::vector<array3D> const &, array3D &,
182 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
183bool intersectLinePolygon( array3D const &, array3D const &, std::size_t, array3D const *, array3D &,
184 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
185
186bool intersectSegmentSegment( array3D const &, array3D const &, array3D const &, array3D const &, array3D &,
187 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
188bool intersectSegmentPlane( array3D const &, array3D const &, array3D const &, array3D const &, array3D &,
189 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
190bool intersectSegmentTriangle( array3D const &, array3D const &, array3D const &, array3D const &, array3D const &,
191 array3D &, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
192bool intersectSegmentPolygon( array3D const &, array3D const &, std::vector<array3D> const &, array3D &,
193 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
194bool intersectSegmentPolygon( array3D const &, array3D const &, std::size_t, array3D const *, array3D &,
195 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
196
197bool intersectSegmentBox( array3D const &, array3D const &, array3D const &, array3D const &, int dim = 3,
198 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
199bool intersectSegmentBox( array3D const &, array3D const &, array3D const &, array3D const &, bool, bool,
200 std::vector<array3D> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
201bool intersectSegmentBox( array3D const &, array3D const &, array3D const &, array3D const &, bool, bool,
202 std::vector<array3D> &, std::vector<int> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
203
204bool intersectPlanePlane( array3D const &, array3D const &, array3D const &, array3D const &,
205 array3D &, array3D &, const double coplanarityTolerance = DEFAULT_COPLANARITY_TOLERANCE) ;
206bool intersectPlaneBox( array3D const &, array3D const &, array3D const &, array3D const &, int dim=3,
207 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
208bool intersectPlaneBox( array3D const &, array3D const &, array3D const &, array3D const &,
209 std::vector<array3D> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
210
211bool intersectBoxBox( array3D const &, array3D const &, array3D const &, array3D const &, int dim = 3,
212 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
213bool intersectBoxBox( array3D const &, array3D const &, array3D const &, array3D const &,
214 array3D &, array3D &, int dim = 3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
215
216
217bool intersectBoxTriangle( array3D const &, array3D const &, array3D const &, array3D const &, array3D const &,
218 int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
219bool intersectBoxTriangle( array3D const &, array3D const &, array3D const &, array3D const &, array3D const &,
220 bool, bool, bool, std::vector<array3D> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
221bool intersectBoxTriangle( array3D const &, array3D const &, array3D const &, array3D const &, array3D const &,
222 bool, bool, bool, std::vector<array3D> &, std::vector<int> &, int dim=3,
223 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE) ;
224
225
226bool intersectBoxPolygon( array3D const &, array3D const &, std::vector<array3D> const &, int dim=3,
227 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
228bool intersectBoxPolygon( array3D const &, array3D const &, std::size_t, array3D const *, int dim=3,
229 const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
230bool intersectBoxPolygon( array3D const &, array3D const &, std::vector<array3D> const &, bool, bool, bool,
231 std::vector<array3D> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
232bool intersectBoxPolygon( array3D const &, array3D const &, std::size_t, array3D const *, bool, bool, bool,
233 std::vector<array3D> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
234bool intersectBoxPolygon( array3D const &, array3D const &, std::vector<array3D> const &, bool, bool, bool,
235 std::vector<array3D> &, std::vector<int> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
236bool intersectBoxPolygon( array3D const &, array3D const &, std::size_t, array3D const *, bool, bool, bool,
237 std::vector<array3D> &, std::vector<int> &, int dim=3, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
238
239bool intersectBoxCircle( array3D const &A0, array3D const &A1, array3D const &centre, double radius, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
240
241bool intersectBoxSphere( array3D const &A0, array3D const &A1, array3D const &centre, double radius, const double distanceTolerance = DEFAULT_DISTANCE_TOLERANCE);
242
243void computeAABBSegment( array3D const &, array3D const &, array3D &, array3D & ) ;
244void computeAABBTriangle( array3D const &, array3D const &, array3D const &, array3D &, array3D & ) ;
245void computeAABBPolygon( std::vector<array3D> const &, array3D &, array3D & );
246void computeAABBPolygon( std::size_t, array3D const *, array3D &, array3D & );
247
248void unionAABB( array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D & );
249void intersectionAABB( array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D & );
250void subtractionAABB( array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D & );
251void unionAABB( std::vector<array3D> const &, std::vector<array3D> const &, array3D &, array3D & );
252
253array3D rotateVector( array3D const &, array3D const &, double);
254double areaTriangle( array3D const &, array3D const &, array3D const &);
255
256void vertexOfSegment( int, array3D const &, array3D const &, array3D &);
257
258void vertexOfTriangle( int, array3D const &, array3D const &, array3D const &, array3D &);
259void edgeOfTriangle( int, array3D const &, array3D const &, array3D const &, array3D &, array3D &);
260
261void vertexOfBox( int, array3D const &, array3D const &, array3D &);
262void edgeOfBox( int, array3D const &, array3D const &, array3D &, array3D &);
263void faceOfBox( int, array3D const &, array3D const &, array3D &, array3D &, array3D &, array3D & );
264
265int polygonEdgesCount(std::vector<array3D> const &);
266int polygonEdgesCount(std::size_t, array3D const *);
267int polygonSubtriangleCount(std::vector<array3D> const &);
268int polygonSubtriangleCount(std::size_t, array3D const *);
269void edgeOfPolygon( int, std::vector<array3D> const &, array3D &, array3D &);
270void edgeOfPolygon( int, std::size_t, array3D const *, array3D &, array3D &);
271void subtriangleOfPolygon( int, std::vector<array3D> const &, array3D &, array3D &, array3D &);
272void subtriangleOfPolygon( int, std::size_t, array3D const *, array3D &, array3D &, array3D &);
273
274}
275
276// Algorithms =============================================================== //
277
278namespace CGAlgorithms {
279
280double grad1DUpdate( // Update the local solution to the 1D grad limiting equation on a vertex of a 1D manifold
281 int , // (input) number of simplicies
282 std::vector<std::array<double,3>> &, // (input) vertex coordinate list
283 std::vector<std::vector<int>> &, // (input) simplex-vertex connectivity
284 std::vector<std::vector<std::vector<int>>> &, // (input) simplex-simplex adjacency
285 std::vector<double> &, // (input) scalar field to be limited
286 int , // (input) global index of simplex containing the vertex
287 int , // (input) local index of vertex
288 double , // (input) max slope
289 std::vector<bool> & // (input) flag for dead/alive vertices
290 );
291
292void gradLimiting1D( // Solve the grad limiting eq. on a 1D manifold in a 2D Euclidean space
293 int , // (input) number of simplicies
294 std::vector<std::array<double,3>> &, // (input) vertex coordinate list
295 std::vector<std::vector<int>> &, // (input) simplex-vertex connectivity
296 std::vector<std::vector<std::vector<int>>> &, // (input) simplex-simplex adjacency
297 std::vector<double> &, // (input) scalar field to be limited
298 double // (input) max slope
299 );
300
301double grad2DUpdate( // Update the local solution to the 2D grad limiting equation on a vertex of a 2D manifold
302 int , // (input) number of simplicies
303 std::vector<std::array<double,3>> &, // (input) vertex coordinate list
304 std::vector<std::vector<int>> &, // (input) simplex-vertex connectivity
305 std::vector<std::vector<std::vector<int>>> &, // (input) list of simplicies in the 1-ring of the given vertex
306 std::vector<double> &, // (input) scalar field to be limited
307 int , // (input) global index of simplex containing the vertex
308 int , // (input) local index of vertex
309 double , // (input) max slope
310 std::vector<bool> & // (input) flag for dead/alive vertices
311 );
312
313void gradLimiting2D( // Solve the grad limiting eq. on a 2D manifold in a 3D Euclidean space
314 int , // (input) number of simplicies
315 std::vector<std::array<double,3>> &, // (input) vertex coordinate list
316 std::vector<std::vector<int>> &, // (input) simplex-vertex connectivity
317 std::vector<double> &, // (input/output) scalar field to be limited
318 double // (input) max slope
319 );
320
321double grad2DUpdate( // Update the local solution to the 2D grad limiting equation on a cell of a 2D volume
322 int , // (input) number of simplicies
323 std::vector<std::array<double,3>> &, // (input) vertex coordinate list
324 std::vector<std::vector<int>> &, // (input) simplex-vertex connectivity
325 std::vector<std::vector<int>> &, // (input) simplex-simplex adjacency
326 std::vector<double> &, // (input) scalar field to be limited
327 int , // (input) global index of simplex to be updated
328 double , // (input) max slope
329 std::vector<bool> & // (input) flag for dead/alive vertices
330 );
331
332void gradLimiting2D( // Solve the grad limiting eq. in a 2D volume
333 int , // (input) number of simplicies
334 std::vector<std::array<double,3>> &, // (input) vertex coordinate list
335 std::vector<std::vector<int>> &, // (input) simplex-vertex connectivity,
336 std::vector<std::vector<int>> &, // (input) simplex-simplex adjacency
337 std::vector<double> &, // (input/output) scalar field to be limited
338 double // (input) max slope
339 );
340}
341
342}
343
344
345# endif
void edgeOfPolygon(int, std::vector< array3D > const &, array3D &, array3D &)
Definition CG_elem.cpp:3051
std::vector< double > distanceCloudTriangle(std::vector< array3D > const &, array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:1452
double distancePointLine(array3D const &, array3D const &, array3D const &, array3D &)
Definition CG_elem.cpp:1354
double distancePointCone(array3D const &, array3D const &, array3D const &, double)
Definition CG_elem.cpp:1438
array3D projectPointLine(array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:970
void edgeOfTriangle(int, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
Definition CG_elem.cpp:2816
const std::array< std::array< int, 2 >, 12 > boxEdgeVertexConnectivity
Definition CG.hpp:53
bool intersectPlaneBox(array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:1952
void unionAABB(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
Definition CG_elem.cpp:2667
bool intersectPointTriangle(array3D const &, array3D const &, array3D const &, array3D const &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2549
bool intersectBoxBox(array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2125
array3D projectPointTriangle(array3D const &, array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:1049
array3D rotateVector(array3D const &, array3D const &, double)
Definition CG_elem.cpp:2968
array3D projectPointSegment(array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:996
double distancePointPlane(array3D const &, array3D const &, array3D const &, array3D &)
Definition CG_elem.cpp:1368
bool intersectBoxTriangle(array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2177
int convertBarycentricToFlagSegment(std::array< double, 2 > const &, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:618
void computeAABBTriangle(array3D const &, array3D const &, array3D const &, array3D &, array3D &)
Definition CG_elem.cpp:2609
bool validBarycentric(double const *, int)
Definition CG_elem.cpp:585
void intersectionAABB(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
Definition CG_elem.cpp:2710
double distanceLineLine(array3D const &, array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:1727
array3D reconstructPointFromBarycentricTriangle(array3D const &, array3D const &, array3D const &, std::array< double, 3 > const &)
Definition CG_elem.cpp:857
array3D reconstructPointFromBarycentricSegment(array3D const &, array3D const &, std::array< double, 2 > const &)
Definition CG_elem.cpp:828
const std::array< std::array< int, 4 >, 6 > boxFaceVertexConnectivity
Definition CG.hpp:73
std::vector< double > distanceCloudPolygon(std::vector< array3D > const &, std::vector< array3D > const &, std::vector< array3D > &, std::vector< int > &)
Definition CG_elem.cpp:1597
void vertexOfSegment(int, array3D const &, array3D const &, array3D &)
Definition CG_elem.cpp:2755
void vertexOfTriangle(int, array3D const &, array3D const &, array3D const &, array3D &)
Definition CG_elem.cpp:2783
int convertBarycentricToFlagPolygon(std::vector< double > const &, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:686
bool intersectSegmentPlane(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:1870
bool intersectLineTriangle(array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:1986
bool intersectSegmentSegment(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:1806
double distancePointTriangle(array3D const &, array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:1409
bool intersectPointLine(array3D const &, array3D const &, array3D const &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2510
int polygonEdgesCount(std::vector< array3D > const &)
Definition CG_elem.cpp:2996
int polygonSubtriangleCount(std::vector< array3D > const &)
Definition CG_elem.cpp:3022
bool intersectBoxSphere(array3D const &A0, array3D const &A1, array3D const &centre, double radius, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2416
int convertBarycentricToFlagTriangle(std::array< double, 3 > const &, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:658
double areaTriangle(array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:2987
array3D projectPointPlane(array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:983
void subtriangleOfPolygon(int, std::vector< array3D > const &, array3D &, array3D &, array3D &)
Definition CG_elem.cpp:3087
bool intersectSegmentBox(array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2233
bool intersectPlanePlane(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &, const double coplanarityTolerance=DEFAULT_COPLANARITY_TOLERANCE)
Definition CG_elem.cpp:1900
void computeGeneralizedBarycentric(array3D const &, std::vector< array3D > const &, std::vector< double > &)
Definition CG_elem.cpp:750
double distancePointSegment(array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:1381
bool intersectLinePlane(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double coplanarityTolerance=DEFAULT_COPLANARITY_TOLERANCE)
Definition CG_elem.cpp:1837
bool validPlane(array3D const &, array3D const &)
Definition CG_elem.cpp:540
array3D rotatePoint(const array3D &P, const array3D &n0, const array3D &n1, double angle)
Definition CG_elem.cpp:892
double distancePointPolygon(array3D const &, std::vector< array3D > const &, array3D &, int &)
Definition CG_elem.cpp:1498
bool validLine(array3D const &, array3D const &)
Definition CG_elem.cpp:528
void computeAABBPolygon(std::vector< array3D > const &, array3D &, array3D &)
Definition CG_elem.cpp:2631
bool validTriangle(array3D const &, array3D const &, array3D const &)
Definition CG_elem.cpp:553
array3D reconstructPointFromBarycentricPolygon(std::vector< array3D > const &, std::vector< double > const &)
Definition CG_elem.cpp:927
bool intersectSegmentTriangle(array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2014
array3D restrictPointTriangle(array3D const &, array3D const &, array3D const &, array3D &)
Definition CG_elem.cpp:1096
bool intersectBoxPolygon(array3D const &, array3D const &, std::vector< array3D > const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2284
void faceOfBox(int, array3D const &, array3D const &, array3D &, array3D &, array3D &, array3D &)
Definition CG_elem.cpp:2853
std::vector< array3D > projectCloudTriangle(std::vector< array3D > const &, array3D const &, array3D const &, array3D const &, std::vector< array3D > &)
Definition CG_elem.cpp:1193
array3D projectPointCone(array3D const &, array3D const &, array3D const &, double)
Definition CG_elem.cpp:1313
void vertexOfBox(int, array3D const &, array3D const &, array3D &)
Definition CG_elem.cpp:2899
void edgeOfBox(int, array3D const &, array3D const &, array3D &, array3D &)
Definition CG_elem.cpp:2879
void subtractionAABB(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
Definition CG_elem.cpp:2725
array3D projectPointPolygon(array3D const &, std::vector< array3D > const &)
Definition CG_elem.cpp:1214
bool validSegment(array3D const &, array3D const &)
Definition CG_elem.cpp:517
void computeAABBSegment(array3D const &, array3D const &, array3D &, array3D &)
Definition CG_elem.cpp:2587
bool intersectPointBox(array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2568
bool intersectPointSegment(array3D const &, array3D const &, array3D const &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2530
bool intersectLineLine(array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:1785
bool intersectBoxCircle(array3D const &A0, array3D const &A1, array3D const &centre, double radius, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2390
bool intersectLinePolygon(array3D const &, array3D const &, std::vector< array3D > const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2040
bool intersectSegmentPolygon(array3D const &, array3D const &, std::vector< array3D > const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
Definition CG_elem.cpp:2082
--- layout: doxygen_footer ---