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

Common/vtkEdgeTable.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkEdgeTable.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00041 #ifndef __vtkEdgeTable_h
00042 #define __vtkEdgeTable_h
00043 
00044 #include "vtkObject.h"
00045 
00046 class vtkIdList;
00047 class vtkPoints;
00048 
00049 class VTK_COMMON_EXPORT vtkEdgeTable : public vtkObject
00050 {
00051 public:
00053   static vtkEdgeTable *New();
00054 
00055   vtkTypeRevisionMacro(vtkEdgeTable,vtkObject);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059   void Initialize();
00060 
00068   int InitEdgeInsertion(vtkIdType numPoints, int storeAttributes=0);
00069 
00077   vtkIdType InsertEdge(vtkIdType p1, vtkIdType p2);
00078 
00085   void InsertEdge(vtkIdType p1, vtkIdType p2, int attributeId);
00086 
00092   int IsEdge(vtkIdType p1, vtkIdType p2);
00093 
00097   int InitPointInsertion(vtkPoints *newPts, vtkIdType estSize);
00098 
00100 
00103   int InsertUniquePoint(vtkIdType p1, vtkIdType p2, float x[3],
00104                         vtkIdType &ptId);
00106 
00108 
00109   vtkGetMacro(NumberOfEdges, vtkIdType);
00111 
00113   void InitTraversal();
00114 
00119   int GetNextEdge(vtkIdType &p1, vtkIdType &p2);
00120 
00123   void Reset();
00124 
00125 protected:
00126   vtkEdgeTable();
00127   ~vtkEdgeTable();
00128 
00129   vtkIdList **Table;
00130   vtkIdList **Attributes;
00131   int StoreAttributes;
00132   vtkIdType TableMaxId; //maximum point id inserted
00133   vtkIdType TableSize;  //allocated size of table
00134   int Position[2];
00135   int Extend;
00136   vtkIdType NumberOfEdges;
00137   vtkPoints *Points; //support point insertion
00138 
00139   vtkIdList **Resize(vtkIdType size);
00140 private:
00141   vtkEdgeTable(const vtkEdgeTable&);  // Not implemented.
00142   void operator=(const vtkEdgeTable&);  // Not implemented.
00143 };
00144 
00145 #endif
00146