VTK
vtkPolygonBuilder.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolygonBuilder.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkPolygonBuilder_h
29 #define vtkPolygonBuilder_h
30 
31 #include "vtkCommonMiscModule.h" // For export macro
32 #include <map> //for private data members
33 #include <vector> // for private data members
34 #include <utility> //for private data members
35 #include "vtkType.h" //for basic types
36 #include <cstddef> //for size_t
37 #include "vtkObject.h"
38 #include "vtkIdList.h"
39 
41 
42 class VTKCOMMONMISC_EXPORT vtkPolygonBuilder
43 {
44 public:
46 
50  void InsertTriangle(vtkIdType* abc);
51 
57  void GetPolygons(vtkIdListCollection* polys);
58 
62  void Reset();
63 
64 private:
65  typedef std::pair<vtkIdType,vtkIdType> Edge;
66  typedef std::map<Edge,size_t> EdgeHistogram;
67  typedef std::multimap<vtkIdType,vtkIdType> EdgeMap;
68  typedef std::vector<vtkIdType> Triangle;
69  typedef std::vector<Triangle> Triangles;
70  typedef std::map<vtkIdType, Triangles> TriangleMap;
71 
72  TriangleMap Tris;
73 
74  EdgeHistogram EdgeCounter;
75  EdgeMap Edges;
76 };
77 
78 #endif
79 // VTK-HeaderTest-Exclude: vtkPolygonBuilder.h
int vtkIdType
Definition: vtkType.h:287
The polygon output is the boundary of the union of the triangles.
maintain an unordered list of dataarray objects