VTK  9.2.6
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 "vtkIdList.h"
33#include "vtkObject.h"
34#include "vtkType.h" //for basic types
35#include <cstddef> //for size_t
36#include <map> //for private data members
37#include <utility> //for private data members
38#include <vector> // for private data members
39
41
42class VTKCOMMONMISC_EXPORT vtkPolygonBuilder
43{
44public:
46
50 void InsertTriangle(const vtkIdType* abc);
51
58
62 void Reset();
63
64private:
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
maintain an ordered list of IdList objects
The polygon output is the boundary of the union of the triangles.
void Reset()
Prepare the builder for a new set of inputs.
void InsertTriangle(const vtkIdType *abc)
Insert a triangle as a triplet of point IDs.
void GetPolygons(vtkIdListCollection *polys)
Populate polys with lists of polygons, defined as sequential external vertices.
int vtkIdType
Definition vtkType.h:332