Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MeshSelectionT.hh
Go to the documentation of this file.
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4 * Copyright (c) 2001-2015, RWTH-Aachen University *
5 * Department of Computer Graphics and Multimedia *
6 * All rights reserved. *
7 * www.openflipper.org *
8 * *
9 *---------------------------------------------------------------------------*
10 * This file is part of OpenFlipper. *
11 *---------------------------------------------------------------------------*
12 * *
13 * Redistribution and use in source and binary forms, with or without *
14 * modification, are permitted provided that the following conditions *
15 * are met: *
16 * *
17 * 1. Redistributions of source code must retain the above copyright notice, *
18 * this list of conditions and the following disclaimer. *
19 * *
20 * 2. Redistributions in binary form must reproduce the above copyright *
21 * notice, this list of conditions and the following disclaimer in the *
22 * documentation and/or other materials provided with the distribution. *
23 * *
24 * 3. Neither the name of the copyright holder nor the names of its *
25 * contributors may be used to endorse or promote products derived from *
26 * this software without specific prior written permission. *
27 * *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49
50
51
52
53 //=============================================================================
54 //
55 //
56 //=============================================================================
57
58
59 #ifndef MESHSELECTION_HH
60 #define MESHSELECTION_HH
61
62
68 //== INCLUDES =================================================================
69
70 #include <vector>
71
72 //== FORWARDDECLARATIONS ======================================================
73
74 //== NAMESPACES ===============================================================
75
76 namespace MeshSelection {
77
78 //== DEFINITIONS ==============================================================
79
80 //===========================================================================
83 //===========================================================================
84
86 template< typename MeshT >
87 inline
88 void selectVertices(MeshT* _mesh, const std::vector< int >& _vertices);
89
91 template< typename MeshT >
92 inline
93 void unselectVertices(MeshT* _mesh, const std::vector< int >& _vertices);
94
96 template< typename MeshT >
97 inline
98 void selectAllVertices(MeshT* _mesh);
99
101 template< typename MeshT >
102 inline
103 void clearVertexSelection(MeshT* _mesh);
104
106 template< typename MeshT >
107 inline
108 void invertVertexSelection(MeshT* _mesh);
109
112 template< typename MeshT >
113 inline
114 void selectBoundaryVertices(MeshT* _mesh);
115
118 template< typename MeshT >
119 inline
120 void shrinkVertexSelection(MeshT* _mesh) ;
121
124 template< typename MeshT >
125 inline
126 void growVertexSelection(MeshT* _mesh);
127
130 template< typename MeshT >
131 inline
132 std::vector< int > getVertexSelection(MeshT* _mesh);
133
137 template< typename MeshT >
138 inline
139 std::vector< int > getVertexSelection(MeshT* _mesh, bool& _invert);
140
149 template< typename MeshT >
150 inline
151 void selectBoundaryVertices(MeshT* _mesh, const typename MeshT::VertexHandle& _vh);
152
157 template< typename MeshT >
158 inline
159 void convertVertexToEdgeSelection(MeshT* _mesh, const std::vector< int >& _vertices);
160
164 template< typename MeshT >
165 inline
166 void convertVertexToEdgeSelection(MeshT* _mesh);
167
172 template< typename MeshT >
173 inline
174 void convertVertexToHalfedgeSelection(MeshT* _mesh, const std::vector< int >& _vertices);
175
179 template< typename MeshT >
180 inline
181 void convertVertexToHalfedgeSelection(MeshT* _mesh);
182
187 template< typename MeshT >
188 inline
189 void convertVertexToFaceSelection(MeshT* _mesh, const std::vector< int >& _vertices);
190
194 template< typename MeshT >
195 inline
196 void convertVertexToFaceSelection(MeshT* _mesh);
197
201 template< typename MeshT >
202 inline
203 void convertVertexSelectionToFeatureVertices(MeshT* _mesh);
204
208 template< typename MeshT >
209 inline
210 void convertFeatureVerticesToVertexSelection(MeshT* _mesh);
211
215 template< typename MeshT >
216 inline
217 void clearFeatureVertices(MeshT* _mesh);
218
221 //===========================================================================
224 //===========================================================================
225
230 template< typename MeshT >
231 inline
232 void setArea(MeshT* _mesh, const std::vector< int >& _vertices , unsigned int _type, bool _state);
233
237 template< typename MeshT >
238 inline
239 void setArea(MeshT* _mesh , unsigned int _type, bool _state);
240
243 template< typename MeshT >
244 inline
245 std::vector< int > getArea(MeshT* _mesh, unsigned int _type);
246
250 template< typename MeshT >
251 inline
252 std::vector< int > getArea(MeshT* _mesh, unsigned int _type , bool& _invert);
253
256 //===========================================================================
259 //===========================================================================
260
262 template< typename MeshT >
263 inline
264 void selectEdges(MeshT* _mesh, const std::vector< int >& _edges);
265
267 template< typename MeshT >
268 inline
269 void unselectEdges(MeshT* _mesh, const std::vector< int >& _edges);
270
272 template< typename MeshT >
273 inline
274 void selectAllEdges(MeshT* _mesh);
275
277 template< typename MeshT >
278 inline
279 void clearEdgeSelection(MeshT* _mesh);
280
282 template< typename MeshT >
283 inline
284 void invertEdgeSelection(MeshT* _mesh);
285
287 template< typename MeshT >
288 inline
289 void growEdgeSelection(MeshT* _mesh);
290
292 template< typename MeshT >
293 void selectBoundaryEdges(MeshT* _mesh);
294
297 template< typename MeshT >
298 inline
299 std::vector< int > getEdgeSelection(MeshT* _mesh);
300
304 template< typename MeshT >
305 inline
306 std::vector< int > getEdgeSelection(MeshT* _mesh, bool& _invert);
307
312 template< typename MeshT >
313 inline
314 void convertEdgeToVertexSelection(MeshT* _mesh, const std::vector< int >& _edges);
315
319 template< typename MeshT >
320 inline
321 void convertEdgeToVertexSelection(MeshT* _mesh);
322
327 template< typename MeshT >
328 inline
329 void convertEdgeToFaceSelection(MeshT* _mesh, const std::vector< int >& _edges);
330
334 template< typename MeshT >
335 inline
336 void convertEdgeToFaceSelection(MeshT* _mesh);
337
341 template< typename MeshT >
342 inline
343 void convertEdgeToHalfedgeSelection(MeshT* _mesh);
344
348 template< typename MeshT >
349 inline
350 void convertEdgeSelectionToFeatureEdges(MeshT* _mesh);
351
355 template< typename MeshT >
356 inline
357 void convertFeatureEdgesToEdgeSelection(MeshT* _mesh);
358
362 template< typename MeshT >
363 inline
364 void clearFeatureEdges(MeshT* _mesh);
365
366
369 //===========================================================================
372 //===========================================================================
373
375 template< typename MeshT >
376 inline
377 void selectHalfedges(MeshT* _mesh, const std::vector< int >& _halfedges);
378
380 template< typename MeshT >
381 inline
382 void unselectHalfedges(MeshT* _mesh, const std::vector< int >& _halfedges);
383
385 template< typename MeshT >
386 inline
387 void selectAllHalfedges(MeshT* _mesh);
388
390 template< typename MeshT >
391 inline
392 void clearHalfedgeSelection(MeshT* _mesh);
393
395 template< typename MeshT >
396 inline
397 void invertHalfedgeSelection(MeshT* _mesh);
398
400 template< typename MeshT >
401 void selectBoundaryHalfedges(MeshT* _mesh);
402
405 template< typename MeshT >
406 inline
407 std::vector< int > getHalfedgeSelection(MeshT* _mesh);
408
412 template< typename MeshT >
413 inline
414 void convertHalfedgeToVertexSelection(MeshT* _mesh);
415
419 template< typename MeshT >
420 inline
421 void convertHalfedgeToEdgeSelection(MeshT* _mesh);
422
426 template< typename MeshT >
427 inline
428 void convertHalfedgeToFaceSelection(MeshT* _mesh);
429
430 //===========================================================================
433 //===========================================================================
434
436 template< typename MeshT >
437 inline
438 void selectFaces(MeshT* _mesh, const std::vector< int >& _faces );
439
441 template< typename MeshT >
442 inline
443 void unselectFaces(MeshT* _mesh, const std::vector< int >& _faces );
444
446 template< typename MeshT >
447 inline
448 void selectAllFaces(MeshT* _mesh);
449
451 template< typename MeshT >
452 inline
453 void clearFaceSelection(MeshT* _mesh);
454
456 template< typename MeshT >
457 inline
458 void invertFaceSelection(MeshT* _mesh);
459
461 template< typename MeshT >
462 void selectBoundaryFaces(MeshT* _mesh);
463
468 template< typename MeshT >
469 inline
470 void shrinkFaceSelection(MeshT* _mesh);
471
476 template< typename MeshT >
477 inline
478 void growFaceSelection(MeshT* _mesh);
479
482 template< typename MeshT >
483 inline
484 std::vector< int > getFaceSelection(MeshT* _mesh);
485
489 template< typename MeshT >
490 inline
491 std::vector< int > getFaceSelection(MeshT* _mesh, bool& _invert);
492
497 template< typename MeshT >
498 inline
499 void convertFaceToVertexSelection(MeshT* _mesh, const std::vector< int >& _faces);
500
504 template< typename MeshT >
505 inline
506 void convertFaceToVertexSelection(MeshT* _mesh);
507
511 template< typename MeshT >
512 inline
513 void convertFaceToEdgeSelection(MeshT* _mesh);
514
518 template< typename MeshT >
519 inline
520 void convertFaceToHalfedgeSelection(MeshT* _mesh);
521
525 template< typename MeshT >
526 inline
527 void convertFaceSelectionToFeatureFaces(MeshT* _mesh);
528
532 template< typename MeshT >
533 inline
534 void convertFeatureFacesToFaceSelection(MeshT* _mesh);
535
539 template< typename MeshT >
540 inline
541 void clearFeatureFaces(MeshT* _mesh);
542
545 //=============================================================================
546 } // MeshSelection Namespace
547 //=============================================================================
548 #if defined(INCLUDE_TEMPLATES) && !defined(MESHSELECTION_C)
549 #define MESHSELECTION_TEMPLATES
550 #include "MeshSelectionT.cc"
551 #endif
552 //=============================================================================
553 #endif // MESHSELECTION_HH defined
554 //=============================================================================
555
MeshSelection
Definition: MeshSelectionT.cc:70