VTK
vtkEdgeTable.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkEdgeTable.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 =========================================================================*/
29 #ifndef vtkEdgeTable_h
30 #define vtkEdgeTable_h
31 
32 #include "vtkCommonDataModelModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 class vtkIdList;
36 class vtkPoints;
37 class vtkVoidArray;
38 
40 {
41 public:
43  static vtkEdgeTable *New();
44 
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49  void Initialize();
50 
63  int InitEdgeInsertion(vtkIdType numPoints, int storeAttributes=0);
64 
73 
80  void InsertEdge(vtkIdType p1, vtkIdType p2, vtkIdType attributeId);
81 
88  void InsertEdge(vtkIdType p1, vtkIdType p2, void* ptr);
89 
96 
100  void IsEdge(vtkIdType p1, vtkIdType p2, void* &ptr);
101 
105  int InitPointInsertion(vtkPoints *newPts, vtkIdType estSize);
106 
108 
111  int InsertUniquePoint(vtkIdType p1, vtkIdType p2, double x[3],
112  vtkIdType &ptId);
114 
116 
117  vtkGetMacro(NumberOfEdges, vtkIdType);
119 
122 
128 
132  int GetNextEdge(vtkIdType &p1, vtkIdType &p2, void* &ptr);
133 
136  void Reset();
137 
138 protected:
141 
143  vtkIdType TableMaxId; //maximum point id inserted
144  vtkIdType TableSize; //allocated size of table
145  int Position[2];
146  int Extend;
148  vtkPoints *Points; //support point insertion
149 
150  int StoreAttributes; //==0:no attributes stored;==1:vtkIdType;==2:void*
151  vtkIdList **Attributes; //used to store IdTypes attributes
152  vtkVoidArray **PointerAttributes; //used to store void* pointers
153 
155 
156 private:
157  vtkEdgeTable(const vtkEdgeTable&); // Not implemented.
158  void operator=(const vtkEdgeTable&); // Not implemented.
159 };
160 
161 #endif
162 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkEdgeTable::IsEdge
vtkIdType IsEdge(vtkIdType p1, vtkIdType p2)
vtkEdgeTable::GetNextEdge
int GetNextEdge(vtkIdType &p1, vtkIdType &p2, void *&ptr)
vtkEdgeTable::Reset
void Reset()
vtkEdgeTable::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkEdgeTable::New
static vtkEdgeTable * New()
vtkEdgeTable::~vtkEdgeTable
~vtkEdgeTable()
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkEdgeTable::vtkEdgeTable
vtkEdgeTable()
vtkVoidArray
dynamic, self-adjusting array of void* pointers
Definition: vtkVoidArray.h:30
vtkEdgeTable::InsertEdge
vtkIdType InsertEdge(vtkIdType p1, vtkIdType p2)
vtkEdgeTable::PointerAttributes
vtkVoidArray ** PointerAttributes
Definition: vtkEdgeTable.h:152
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkEdgeTable::InitEdgeInsertion
int InitEdgeInsertion(vtkIdType numPoints, int storeAttributes=0)
vtkEdgeTable::NumberOfEdges
vtkIdType NumberOfEdges
Definition: vtkEdgeTable.h:147
vtkEdgeTable
keep track of edges (edge is pair of integer id's)
Definition: vtkEdgeTable.h:40
vtkEdgeTable::InsertEdge
void InsertEdge(vtkIdType p1, vtkIdType p2, vtkIdType attributeId)
vtkEdgeTable::Resize
vtkIdList ** Resize(vtkIdType size)
vtkEdgeTable::Table
vtkIdList ** Table
Definition: vtkEdgeTable.h:142
vtkEdgeTable::GetNextEdge
vtkIdType GetNextEdge(vtkIdType &p1, vtkIdType &p2)
vtkEdgeTable::Attributes
vtkIdList ** Attributes
Definition: vtkEdgeTable.h:151
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkEdgeTable::TableMaxId
vtkIdType TableMaxId
Definition: vtkEdgeTable.h:143
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkEdgeTable::InitPointInsertion
int InitPointInsertion(vtkPoints *newPts, vtkIdType estSize)
vtkObject.h
vtkEdgeTable::TableSize
vtkIdType TableSize
Definition: vtkEdgeTable.h:144
vtkEdgeTable::Extend
int Extend
Definition: vtkEdgeTable.h:146
vtkEdgeTable::Points
vtkPoints * Points
Definition: vtkEdgeTable.h:148
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkEdgeTable::Initialize
void Initialize()
vtkEdgeTable::StoreAttributes
int StoreAttributes
Definition: vtkEdgeTable.h:150
vtkEdgeTable::IsEdge
void IsEdge(vtkIdType p1, vtkIdType p2, void *&ptr)
vtkEdgeTable::InitTraversal
void InitTraversal()
vtkEdgeTable::InsertUniquePoint
int InsertUniquePoint(vtkIdType p1, vtkIdType p2, double x[3], vtkIdType &ptId)
vtkEdgeTable::InsertEdge
void InsertEdge(vtkIdType p1, vtkIdType p2, void *ptr)
vtkgl::size
GLsizeiptr size
Definition: vtkgl.h:11843