Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkEdgeTable.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkEdgeTable.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00029 #ifndef __vtkEdgeTable_h
00030 #define __vtkEdgeTable_h
00031 
00032 #include "vtkObject.h"
00033 
00034 class vtkIdList;
00035 class vtkPoints;
00036 class vtkVoidArray;
00037 
00038 class VTK_COMMON_EXPORT vtkEdgeTable : public vtkObject
00039 {
00040 public:
00042   static vtkEdgeTable *New();
00043 
00044   vtkTypeRevisionMacro(vtkEdgeTable,vtkObject);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048   void Initialize();
00049 
00062   int InitEdgeInsertion(vtkIdType numPoints, int storeAttributes=0);
00063 
00071   vtkIdType InsertEdge(vtkIdType p1, vtkIdType p2);
00072 
00079   void InsertEdge(vtkIdType p1, vtkIdType p2, vtkIdType attributeId);
00080 
00087   void InsertEdge(vtkIdType p1, vtkIdType p2, void* ptr);
00088 
00094   vtkIdType IsEdge(vtkIdType p1, vtkIdType p2);
00095 
00099   void IsEdge(vtkIdType p1, vtkIdType p2, void* &ptr);
00100 
00104   int InitPointInsertion(vtkPoints *newPts, vtkIdType estSize);
00105 
00107 
00110   int InsertUniquePoint(vtkIdType p1, vtkIdType p2, double x[3],
00111                         vtkIdType &ptId);
00113 
00115 
00116   vtkGetMacro(NumberOfEdges, vtkIdType);
00118 
00120   void InitTraversal();
00121 
00126   vtkIdType GetNextEdge(vtkIdType &p1, vtkIdType &p2);
00127 
00131   int GetNextEdge(vtkIdType &p1, vtkIdType &p2, void* &ptr);
00132 
00135   void Reset();
00136 
00137 protected:
00138   vtkEdgeTable();
00139   ~vtkEdgeTable();
00140 
00141   vtkIdList **Table;
00142   vtkIdType TableMaxId; //maximum point id inserted
00143   vtkIdType TableSize;  //allocated size of table
00144   int Position[2];
00145   int Extend;
00146   vtkIdType NumberOfEdges;
00147   vtkPoints *Points; //support point insertion
00148 
00149   int StoreAttributes; //==0:no attributes stored;==1:vtkIdType;==2:void*
00150   vtkIdList **Attributes; //used to store IdTypes attributes
00151   vtkVoidArray **PointerAttributes; //used to store void* pointers
00152 
00153   vtkIdList **Resize(vtkIdType size);
00154 
00155 private:
00156   vtkEdgeTable(const vtkEdgeTable&);  // Not implemented.
00157   void operator=(const vtkEdgeTable&);  // Not implemented.
00158 };
00159 
00160 #endif
00161 

Generated on Mon Jan 21 23:07:16 2008 for VTK by  doxygen 1.4.3-20050530