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 =========================================================================*/
30 #ifndef vtkPolygonBuilder_h
31 #define vtkPolygonBuilder_h
32 
33 #include "vtkCommonMiscModule.h" // For export macro
34 #include <vector> //for private data members
35 #include "vtkType.h" //for basic types
36 #include <cstddef> //for size_t
37 #include "vtkObject.h"
38 class vtkIdList;
39 
41 {
42 public:
44  void Reset();
46  void GetPolygon(vtkIdList* poly) const;
47 
48 private:
49  typedef size_t VertexRef;
50  struct Vertex
51  {
52  VertexRef Next;
53  vtkIdType Vert;
54  Vertex(VertexRef next, vtkIdType vert):Next(next), Vert(vert){}
55  };
56 
57  bool FindEdge(vtkIdType a, vtkIdType b, VertexRef& v) const;
58  VertexRef Insert(VertexRef i, vtkIdType vertexId);
59  vtkIdType GetVertexId(VertexRef i) const { return this->Poly[i].Vert;}
60  VertexRef GetNextVertex(VertexRef i) const { return this->Poly[i].Next;}
61 
62  std::vector<Vertex> Poly;
63 };
64 
65 #endif
66 // VTK-HeaderTest-Exclude: vtkPolygonBuilder.h
vtkX3D::next
@ next
Definition: vtkX3D.h:436
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkPolygonBuilder::InsertTriangle
bool InsertTriangle(vtkIdType *abc)
VTKCOMMONMISC_EXPORT
#define VTKCOMMONMISC_EXPORT
Definition: vtkCommonMiscModule.h:15
vtkType.h
vtkPolygonBuilder::vtkPolygonBuilder
vtkPolygonBuilder()
vtkPolygonBuilder::GetPolygon
void GetPolygon(vtkIdList *poly) const
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkObject.h
vtkPolygonBuilder::Reset
void Reset()
vtkPolygonBuilder
Definition: vtkPolygonBuilder.h:41
vtkCommonMiscModule.h