$darkmode
VCG Library
selection.h
1 /****************************************************************************
2 * VCGLib o o *
3 * Visual and Computer Graphics Library o o *
4 * _ O _ *
5 * Copyright(C) 2004-2016 \/)\/ *
6 * Visual Computing Lab /\/| *
7 * ISTI - Italian National Research Council | *
8 * \ *
9 * All rights reserved. *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
20 * for more details. *
21 * *
22 ****************************************************************************/
23 #ifndef __VCG_TRI_UPDATE_SELECTION
24 #define __VCG_TRI_UPDATE_SELECTION
25 
26 #include <deque>
27 
28 #include <vcg/complex/base.h>
29 #include <vcg/simplex/face/topology.h>
30 
31 #include "flag.h"
32 
33 namespace vcg {
34 namespace tri {
37 
41 template <class ComputeMeshType>
43 {
44  typedef typename ComputeMeshType::template PerVertexAttributeHandle< bool > vsHandle;
45  typedef typename ComputeMeshType::template PerEdgeAttributeHandle< bool > esHandle;
46  typedef typename ComputeMeshType::template PerFaceAttributeHandle< bool > fsHandle;
47  typedef typename ComputeMeshType::template PerTetraAttributeHandle< bool > tsHandle;
48 
49 
50 public:
51  SelectionStack(ComputeMeshType &m)
52  {
53  _m=&m;
54  }
55 
56  bool push()
57  {
58  vsHandle vsH = Allocator<ComputeMeshType>::template AddPerVertexAttribute< bool >(*_m);
59  esHandle esH = Allocator<ComputeMeshType>::template AddPerEdgeAttribute< bool > (*_m);
60  fsHandle fsH = Allocator<ComputeMeshType>::template AddPerFaceAttribute< bool > (*_m);
61  tsHandle tsH = Allocator<ComputeMeshType>::template AddPerTetraAttribute< bool > (*_m);
62  typename ComputeMeshType::VertexIterator vi;
63  for(vi = _m->vert.begin(); vi != _m->vert.end(); ++vi)
64  if( !(*vi).IsD() ) vsH[*vi] = (*vi).IsS() ;
65 
66  typename ComputeMeshType::EdgeIterator ei;
67  for(ei = _m->edge.begin(); ei != _m->edge.end(); ++ei)
68  if( !(*ei).IsD() ) esH[*ei] = (*ei).IsS() ;
69 
70  typename ComputeMeshType::FaceIterator fi;
71  for(fi = _m->face.begin(); fi != _m->face.end(); ++fi)
72  if( !(*fi).IsD() ) fsH[*fi] = (*fi).IsS() ;
73 
74  typename ComputeMeshType::TetraIterator ti;
75  for(ti = _m->tetra.begin(); ti != _m->tetra.end(); ++ti)
76  if( !(*ti).IsD() ) tsH[*ti] = (*ti).IsS() ;
77 
78  vsV.push_back(vsH);
79  esV.push_back(esH);
80  fsV.push_back(fsH);
81  tsV.push_back(tsH);
82  return true;
83  }
84 
85  bool popOr()
86  {
87  return pop(true,false);
88  }
89 
90  bool popAnd()
91  {
92  return pop(false,true);
93  }
94 
99  bool pop(bool orFlag=false, bool andFlag=false)
100  {
101  if(vsV.empty()) return false;
102  if(orFlag && andFlag) return false;
103 
104  vsHandle vsH = vsV.back();
105  esHandle esH = esV.back();
106  fsHandle fsH = fsV.back();
107  tsHandle tsH = tsV.back();
108 
109  if(! (Allocator<ComputeMeshType>::template IsValidHandle(*_m, vsH))) return false;
110 
111  for(auto vi = _m->vert.begin(); vi != _m->vert.end(); ++vi)
112  if( !(*vi).IsD() )
113  {
114  if(vsH[*vi]) {
115  if(!andFlag) (*vi).SetS();
116  } else {
117  if(!orFlag) (*vi).ClearS();
118  }
119  }
120 
121  for(auto ei = _m->edge.begin(); ei != _m->edge.end(); ++ei)
122  if( !(*ei).IsD() )
123  {
124  if(esH[*ei]) {
125  if(!andFlag) (*ei).SetS();
126  } else {
127  if(!orFlag) (*ei).ClearS();
128  }
129  }
130 
131 
132  for(auto fi = _m->face.begin(); fi != _m->face.end(); ++fi)
133  if( !(*fi).IsD() )
134  {
135  if(fsH[*fi]) {
136  if(!andFlag) (*fi).SetS();
137  } else {
138  if(!orFlag) (*fi).ClearS();
139  }
140  }
141 
142  for (auto ti = _m->tetra.begin(); ti != _m->tetra.end(); ++ti)
143  if (!(*ti).IsD())
144  {
145  if (tsH[*ti]) {
146  if (!andFlag) (*ti).SetS();
147  } else {
148  if (!orFlag) (*ti).ClearS();
149  }
150  }
151 
152  Allocator<ComputeMeshType>::template DeletePerVertexAttribute<bool>(*_m,vsH);
153  Allocator<ComputeMeshType>::template DeletePerEdgeAttribute<bool>(*_m,esH);
154  Allocator<ComputeMeshType>::template DeletePerFaceAttribute<bool>(*_m,fsH);
155  Allocator<ComputeMeshType>::template DeletePerTetraAttribute<bool>(*_m,tsH);
156 
157  vsV.pop_back();
158  esV.pop_back();
159  fsV.pop_back();
160  tsV.pop_back();
161  return true;
162  }
163 
164 private:
165  ComputeMeshType *_m;
166  std::vector<vsHandle> vsV;
167  std::vector<esHandle> esV;
168  std::vector<fsHandle> fsV;
169  std::vector<tsHandle> tsV;
170 
171 };
172 
174 
176 
178 
182 template <class ComputeMeshType>
184 {
185 
186 public:
187 typedef ComputeMeshType MeshType;
188 typedef typename MeshType::ScalarType ScalarType;
189 typedef typename MeshType::VertexType VertexType;
190 typedef typename MeshType::VertexPointer VertexPointer;
191 typedef typename MeshType::VertexIterator VertexIterator;
192 typedef typename MeshType::EdgeIterator EdgeIterator;
193 typedef typename MeshType::EdgeType EdgeType;
194 typedef typename MeshType::FaceType FaceType;
195 typedef typename MeshType::FacePointer FacePointer;
196 typedef typename MeshType::FaceIterator FaceIterator;
197 typedef typename MeshType::TetraType TetraType;
198 typedef typename MeshType::TetraPointer TetraPointer;
199 typedef typename MeshType::TetraIterator TetraIterator;
200 
201 typedef typename vcg::Box3<ScalarType> Box3Type;
202 
204 static size_t VertexAll(MeshType &m)
205 {
206  for(VertexIterator vi = m.vert.begin(); vi != m.vert.end(); ++vi)
207  if( !(*vi).IsD() ) (*vi).SetS();
208  return m.vn;
209 }
210 
212 static size_t EdgeAll(MeshType &m)
213 {
214  for(EdgeIterator ei = m.edge.begin(); ei != m.edge.end(); ++ei)
215  if( !(*ei).IsD() ) (*ei).SetS();
216  return m.fn;
217 }
219 static size_t FaceAll(MeshType &m)
220 {
221  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
222  if( !(*fi).IsD() ) (*fi).SetS();
223  return m.fn;
224 }
225 
227 static size_t TetraAll (MeshType & m)
228 {
229  ForEachTetra(m, [] (TetraType & t) {
230  t.SetS();
231  });
232 
233  return m.tn;
234 }
235 
237 static size_t VertexClear(MeshType &m)
238 {
239  for(VertexIterator vi = m.vert.begin(); vi != m.vert.end(); ++vi)
240  if( !(*vi).IsD() ) (*vi).ClearS();
241  return 0;
242 }
243 
245 static size_t EdgeClear(MeshType &m)
246 {
247  for(EdgeIterator ei = m.edge.begin(); ei != m.edge.end(); ++ei)
248  if( !(*ei).IsD() ) (*ei).ClearS();
249  return 0;
250 }
251 
253 static size_t FaceClear(MeshType &m)
254 {
255  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
256  if( !(*fi).IsD() ) (*fi).ClearS();
257  return 0;
258 }
259 
261 static size_t TetraClear (MeshType & m)
262 {
263  ForEachTetra(m, [] (TetraType & t) {
264  t.ClearS();
265  });
266 
267  return 0;
268 }
269 
271 static void Clear(MeshType &m)
272 {
273  VertexClear(m);
274  EdgeClear(m);
275  FaceClear(m);
276  TetraClear(m);
277 }
278 
280 static size_t FaceCount(const MeshType &m)
281 {
282  size_t selCnt=0;
283  ForEachFace(m, [&](const FaceType& f){
284  if(f.IsS()) ++selCnt;
285  });
286  return selCnt;
287 }
288 
290 static size_t EdgeCount(const MeshType &m)
291 {
292  size_t selCnt=0;
293  ForEachEdge(m, [&](const EdgeType& e){
294  if(e.IsS()) ++selCnt;
295  });
296  return selCnt;
297 }
298 
300 static size_t VertexCount(const MeshType &m)
301 {
302  size_t selCnt=0;
303  ForEachVertex(m, [&](const VertexType& v){
304  if(v.IsS()) ++selCnt;
305  });
306  return selCnt;
307 }
308 
310 static size_t TetraCount (const MeshType & m)
311 {
312  size_t selCnt = 0;
313  ForEachTetra(m, [&] (const TetraType & t) {
314  if (t.IsS()) ++selCnt;
315  });
316 
317  return selCnt;
318 }
320 static size_t FaceInvert(MeshType &m)
321 {
322  size_t selCnt=0;
323  for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi)
324  if(!(*fi).IsD())
325  {
326  if((*fi).IsS()) (*fi).ClearS();
327  else {
328  (*fi).SetS();
329  ++selCnt;
330  }
331  }
332  return selCnt;
333 }
334 
336 static size_t EdgeInvert(MeshType &m)
337 {
338  size_t selCnt=0;
339  for(EdgeIterator ei=m.edge.begin();ei!=m.edge.end();++ei)
340  if(!(*ei).IsD())
341  {
342  if((*ei).IsS()) (*ei).ClearS();
343  else {
344  (*ei).SetS();
345  ++selCnt;
346  }
347  }
348  return selCnt;
349 }
350 
352 static size_t VertexInvert(MeshType &m)
353 {
354  size_t selCnt=0;
355  for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi)
356  if(!(*vi).IsD())
357  {
358  if((*vi).IsS()) (*vi).ClearS();
359  else {
360  (*vi).SetS();
361  ++selCnt;
362  }
363  }
364  return selCnt;
365 }
366 
368 static size_t TetraInvert (MeshType & m)
369 {
370  size_t selCnt = 0;
371  ForEachTetra(m, [&selCnt] (TetraType & t) {
372  if (t.IsS())
373  t.ClearS();
374  else
375  {
376  t.SetS();
377  ++selCnt;
378  }
379  });
380 
381  return selCnt;
382 }
383 
384 
386 static size_t VertexFromFaceLoose(MeshType &m, bool preserveSelection=false)
387 {
388  size_t selCnt=0;
389 
390  if(!preserveSelection) VertexClear(m);
391  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
392  if( !(*fi).IsD() && (*fi).IsS())
393  for(int i = 0; i < (*fi).VN(); ++i)
394  if( !(*fi).V(i)->IsS()) { (*fi).V(i)->SetS(); ++selCnt; }
395  return selCnt;
396 }
397 
399 static size_t VertexFromEdgeLoose(MeshType &m, bool preserveSelection=false)
400 {
401  size_t selCnt=0;
402 
403  if(!preserveSelection) VertexClear(m);
404  for(EdgeIterator ei = m.edge.begin(); ei != m.edge.end(); ++ei)
405  if( !(*ei).IsD() && (*ei).IsS())
406  {
407  if( !(*ei).V(0)->IsS()) { (*ei).V(0)->SetS(); ++selCnt; }
408  if( !(*ei).V(1)->IsS()) { (*ei).V(1)->SetS(); ++selCnt; }
409  }
410  return selCnt;
411 }
412 
414 
416 static size_t VertexFromFaceStrict(MeshType &m, bool preserveSelection=false)
417 {
419  if(preserveSelection) ss.push();
421  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
422  if( !(*fi).IsD() && !(*fi).IsS())
423  for(int i = 0; i < (*fi).VN(); ++i)
424  (*fi).V(i)->ClearS();
425 
426  if(preserveSelection) ss.popOr();
427  return VertexCount(m);
428 }
429 
431 static size_t FaceFromVertexStrict(MeshType &m, bool preserveSelection=false)
432 {
434  if(preserveSelection) ss.push();
435  size_t selCnt=0;
436  FaceClear(m);
437  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
438  if( !(*fi).IsD())
439  {
440  bool selFlag=true;
441  for(int i = 0; i < (*fi).VN(); ++i)
442  if(!(*fi).V(i)->IsS())
443  selFlag =false;
444  if(selFlag)
445  {
446  (*fi).SetS();
447  ++selCnt;
448  }
449  }
450 
451  if(preserveSelection) ss.popOr();
452  return selCnt;
453 }
454 
456 static size_t FaceFromVertexLoose(MeshType &m, bool preserveSelection=false)
457 {
458  size_t selCnt=0;
459  if(!preserveSelection) FaceClear(m);
460  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
461  if( !(*fi).IsD())
462  {
463  bool selVert=false;
464  for(int i = 0; i < (*fi).VN(); ++i)
465  if((*fi).V(i)->IsS())
466  selVert=true;
467 
468  if(selVert) {
469  (*fi).SetS();
470  ++selCnt;
471  }
472  }
473  return selCnt;
474 }
477 static size_t FaceDilate(MeshType &m)
478 {
481 }
482 
485 static size_t FaceErode(MeshType &m)
486 {
489 }
490 
491 
493 static size_t VertexFromBorderFlag(MeshType &m, bool preserveSelection=false)
494 {
495  size_t selCnt=0;
496  if(!preserveSelection) VertexClear(m);
497  for(VertexIterator vi = m.vert.begin(); vi != m.vert.end(); ++vi)
498  if( !(*vi).IsD() )
499  {
500  if((*vi).IsB() )
501  {
502  (*vi).SetS();
503  ++selCnt;
504  }
505  }
506  return selCnt;
507 }
508 
510 static size_t FaceFromBorderFlag(MeshType &m, bool preserveSelection=false)
511 {
512  tri::RequireTriangularMesh(m);
513  size_t selCnt=0;
514  if(!preserveSelection) FaceClear(m);
515  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
516  if( !(*fi).IsD() )
517  {
518  bool bordFlag=false;
519  for(int i = 0; i < 3; ++i)
520  if((*fi).IsB(i)) bordFlag=true;
521  if(bordFlag)
522  {
523  (*fi).SetS();
524  ++selCnt;
525  }
526  }
527  return selCnt;
528 }
529 
532 static size_t FaceOutOfRangeEdge(MeshType &m, ScalarType MinEdgeThr, ScalarType MaxEdgeThr=(std::numeric_limits<ScalarType>::max)(), bool preserveSelection=false)
533 {
534  if(!preserveSelection) FaceClear(m);
535  size_t selCnt = 0;
536  MinEdgeThr=MinEdgeThr*MinEdgeThr;
537  MaxEdgeThr=MaxEdgeThr*MaxEdgeThr;
538  for(FaceIterator fi=m.face.begin(); fi!=m.face.end();++fi)
539  if(!(*fi).IsD())
540  {
541  for(int i=0;i<(*fi).VN();++i)
542  {
543  const ScalarType squaredEdge=SquaredDistance((*fi).V0(i)->cP(),(*fi).V1(i)->cP());
544  if((squaredEdge<=MinEdgeThr) || (squaredEdge>=MaxEdgeThr) )
545  {
546  selCnt++;
547  (*fi).SetS();
548  break; // skip the rest of the edges of the tri
549  }
550  }
551  }
552  return selCnt;
553 }
554 
556 static size_t FaceConnectedFF(MeshType &m)
557 {
558  // it also assumes that the FF adjacency is well computed.
559  RequireFFAdjacency(m);
561 
562  std::deque<FacePointer> visitStack;
563  size_t selCnt=0;
564  for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
565  if( !(*fi).IsD() && (*fi).IsS() && !(*fi).IsV() )
566  visitStack.push_back(&*fi);
567 
568  while(!visitStack.empty())
569  {
570  FacePointer fp = visitStack.front();
571  visitStack.pop_front();
572  assert(!fp->IsV());
573  fp->SetV();
574  for(int i=0;i<fp->VN();++i) {
575  FacePointer ff = fp->FFp(i);
576  if(! ff->IsS())
577  {
578  ff->SetS();
579  ++selCnt;
580  visitStack.push_back(ff);
581  assert(!ff->IsV());
582  }
583  }
584  }
585  return selCnt;
586 }
588 static size_t FaceFromQualityRange(MeshType &m,float minq, float maxq, bool preserveSelection=false)
589 {
590  size_t selCnt=0;
591  if(!preserveSelection) FaceClear(m);
592  RequirePerFaceQuality(m);
593  for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi)
594  if(!(*fi).IsD())
595  {
596  if( (*fi).Q()>=minq && (*fi).Q()<=maxq )
597  {
598  (*fi).SetS();
599  ++selCnt;
600  }
601  }
602  return selCnt;
603 }
604 
606 static size_t VertexFromQualityRange(MeshType &m,float minq, float maxq, bool preserveSelection=false)
607 {
608  size_t selCnt=0;
609  if(!preserveSelection) VertexClear(m);
610  RequirePerVertexQuality(m);
611  for(VertexIterator vi=m.vert.begin();vi!=m.vert.end();++vi)
612  if(!(*vi).IsD())
613  {
614  if( (*vi).Q()>=minq && (*vi).Q()<=maxq )
615  {
616  (*vi).SetS();
617  ++selCnt;
618  }
619  }
620  return selCnt;
621 }
622 
624 static size_t VertexInBox( MeshType & m, const Box3Type &bb, bool preserveSelection=false)
625 {
626  if(!preserveSelection) VertexClear(m);
627  int selCnt=0;
628  for (VertexIterator vi = m.vert.begin(); vi != m.vert.end(); ++vi) if(!(*vi).IsD())
629  {
630  if(bb.IsIn((*vi).cP()) ) {
631  (*vi).SetS();
632  ++selCnt;
633  }
634  }
635  return selCnt;
636 }
637 
641 static size_t VertexCornerBorder(MeshType &m, ScalarType angleRad, bool preserveSelection=false)
642 {
643  if(!preserveSelection) VertexClear(m);
644  SimpleTempData<typename MeshType::VertContainer, ScalarType > angleSumH(m.vert,0);
645  int selCnt=0;
646  for(auto vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
647  angleSumH[vi]=0;
648 
649  for(auto fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
650  {
651  for(int i=0;i<(*fi).VN();++i)
652  angleSumH[fi->V(i)] += face::WedgeAngleRad(*fi,i);
653  }
654 
655  for(auto vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD())
656  {
657  if(angleSumH[vi]<angleRad && vi->IsB())
658  {
659  (*vi).SetS();
660  ++selCnt;
661  }
662  }
663  return selCnt;
664 }
665 
666 
667 void VertexNonManifoldEdges(MeshType &m, bool preserveSelection=false)
668 {
669  tri::RequireFFAdjacency(m);
670 
671  if(!preserveSelection) VertexClear(m);
672  for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
673  {
674  for(int i=0;i<fi->VN();++i)
675  if(!IsManifold(*fi,i)){
676  (*fi).V0(i)->SetS();
677  (*fi).V1(i)->SetS();
678  }
679  }
680 }
681 
682 }; // end class
683 
684 } // End namespace
685 } // End namespace
686 
687 
688 #endif
Definition: box3.h:42
bool IsIn(const Point3< BoxScalarType > &p) const
Definition: box3.h:194
Class to safely add and delete elements in a mesh.
Definition: allocate.h:97
A stack for saving and restoring selection.
Definition: selection.h:43
bool pop(bool orFlag=false, bool andFlag=false)
Definition: selection.h:99
Management, updating and computation of per-vertex and per-face flags (like border flags).
Definition: flag.h:44
Management, updating and conditional computation of selections (per-vertex, per-edge,...
Definition: selection.h:184
static size_t FaceFromVertexStrict(MeshType &m, bool preserveSelection=false)
Select ONLY the faces with ALL the vertices selected.
Definition: selection.h:431
static size_t FaceErode(MeshType &m)
This function erode the face selection by simply first selecting only the vertices completely surroun...
Definition: selection.h:485
static size_t VertexInvert(MeshType &m)
This function inverts the selection flag for all the vertices.
Definition: selection.h:352
static size_t TetraAll(MeshType &m)
This function select all the tetras.
Definition: selection.h:227
static size_t VertexCount(const MeshType &m)
This function returns the number of selected vertices.
Definition: selection.h:300
static size_t FaceFromQualityRange(MeshType &m, float minq, float maxq, bool preserveSelection=false)
Select the faces whose quality is in the specified closed interval.
Definition: selection.h:588
static size_t FaceOutOfRangeEdge(MeshType &m, ScalarType MinEdgeThr, ScalarType MaxEdgeThr=(std::numeric_limits< ScalarType >::max)(), bool preserveSelection=false)
This function select the faces that have an edge outside the given range. You can skip the second par...
Definition: selection.h:532
static void Clear(MeshType &m)
This function clears the selection flag for all the elements of a mesh (vertices, edges,...
Definition: selection.h:271
static size_t EdgeClear(MeshType &m)
This function clears the selection flag for all the edges.
Definition: selection.h:245
static size_t VertexFromFaceStrict(MeshType &m, bool preserveSelection=false)
Select ONLY the vertices that are touched ONLY by selected faces.
Definition: selection.h:416
static size_t FaceConnectedFF(MeshType &m)
This function expand current selection to cover the whole connected component.
Definition: selection.h:556
static size_t VertexFromBorderFlag(MeshType &m, bool preserveSelection=false)
This function select the vertices with the border flag set.
Definition: selection.h:493
static size_t EdgeCount(const MeshType &m)
This function returns the number of selected edges.
Definition: selection.h:290
static size_t TetraCount(const MeshType &m)
This function returns the number of selected tetras.
Definition: selection.h:310
static size_t VertexClear(MeshType &m)
This function clear the selection flag for all the vertices.
Definition: selection.h:237
static size_t TetraClear(MeshType &m)
This function clears the selection flag for all the tetras.
Definition: selection.h:261
static size_t VertexFromQualityRange(MeshType &m, float minq, float maxq, bool preserveSelection=false)
Select the vertices whose quality is in the specified closed interval.
Definition: selection.h:606
static size_t FaceFromBorderFlag(MeshType &m, bool preserveSelection=false)
This function select the faces that have an edge with the border flag set.
Definition: selection.h:510
static size_t FaceCount(const MeshType &m)
This function returns the number of selected faces.
Definition: selection.h:280
static size_t EdgeAll(MeshType &m)
This function select all the edges.
Definition: selection.h:212
static size_t VertexCornerBorder(MeshType &m, ScalarType angleRad, bool preserveSelection=false)
Select the border vertices that form a corner along the border with an angle that is below a certain ...
Definition: selection.h:641
static size_t FaceDilate(MeshType &m)
This function dilate the face selection by simply first selecting all the vertices touched by the fac...
Definition: selection.h:477
static size_t VertexFromEdgeLoose(MeshType &m, bool preserveSelection=false)
Select all the vertices that are touched by at least a single selected edge.
Definition: selection.h:399
static size_t FaceAll(MeshType &m)
This function select all the faces.
Definition: selection.h:219
static size_t VertexAll(MeshType &m)
This function select all the vertices.
Definition: selection.h:204
static size_t EdgeInvert(MeshType &m)
This function inverts the selection flag for all the edges.
Definition: selection.h:336
static size_t FaceClear(MeshType &m)
This function clears the selection flag for all the faces.
Definition: selection.h:253
static size_t VertexInBox(MeshType &m, const Box3Type &bb, bool preserveSelection=false)
Select the vertices contained in the specified Box.
Definition: selection.h:624
static size_t FaceFromVertexLoose(MeshType &m, bool preserveSelection=false)
Select all the faces with at least one selected vertex.
Definition: selection.h:456
static size_t TetraInvert(MeshType &m)
This function inverts the selection flag for all the tetras.
Definition: selection.h:368
static size_t FaceInvert(MeshType &m)
This function inverts the selection flag for all the faces.
Definition: selection.h:320
static size_t VertexFromFaceLoose(MeshType &m, bool preserveSelection=false)
Select all the vertices that are touched by at least a single selected faces.
Definition: selection.h:386
void ForEachTetra(const MeshType &m, Callable action)
Definition: foreach.h:270
void ForEachEdge(const MeshType &m, Callable action)
Definition: foreach.h:222
void ForEachFace(const MeshType &m, Callable action)
Definition: foreach.h:78
void ForEachVertex(const MeshType &m, Callable action)
Definition: foreach.h:126
FaceType::ScalarType WedgeAngleRad(FaceType &f, const int i)
Return the internal angle (in radians) of the i-th wedge of the triangle.
Definition: topology.h:118
Definition: namespaces.dox:6