Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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 =========================================================================*/
    00040 #ifndef __vtkEdgeTable_h
    00041 #define __vtkEdgeTable_h
    00042
    00043 #include "vtkObject.h"
    00044
    00045 class vtkIdList;
    00046 class vtkPoints;
    00047
    00048 class VTK_COMMON_EXPORT vtkEdgeTable : public vtkObject
    00049 {
    00050 public:
    00052   static vtkEdgeTable *New();
    00053
    00054   vtkTypeRevisionMacro(vtkEdgeTable,vtkObject);
    00055   void PrintSelf(ostream& os, vtkIndent indent);
    00056
    00058   void Initialize();
    00059
    00067   int InitEdgeInsertion(vtkIdType numPoints, int storeAttributes=0);
    00068
    00076   vtkIdType InsertEdge(vtkIdType p1, vtkIdType p2);
    00077
    00084   void InsertEdge(vtkIdType p1, vtkIdType p2, int attributeId);
    00085
    00091   int IsEdge(vtkIdType p1, vtkIdType p2);
    00092
    00096   int InitPointInsertion(vtkPoints *newPts, vtkIdType estSize);
    00097
    00099
    00102   int InsertUniquePoint(vtkIdType p1, vtkIdType p2, float x[3],
    00103                         vtkIdType &ptId);
    00105
    00107
    00108   vtkGetMacro(NumberOfEdges, vtkIdType);
    00110
    00112   void InitTraversal();
    00113
    00118   int GetNextEdge(vtkIdType &p1, vtkIdType &p2);
    00119
    00122   void Reset();
    00123
    00124 protected:
    00125   vtkEdgeTable();
    00126   ~vtkEdgeTable();
    00127
    00128   vtkIdList **Table;
    00129   vtkIdList **Attributes;
    00130   int StoreAttributes;
    00131   vtkIdType TableMaxId; //maximum point id inserted
    00132   vtkIdType TableSize;  //allocated size of table
    00133   int Position[2];
    00134   int Extend;
    00135   vtkIdType NumberOfEdges;
    00136   vtkPoints *Points; //support point insertion
    00137
    00138   vtkIdList **Resize(vtkIdType size);
    00139 private:
    00140   vtkEdgeTable(const vtkEdgeTable&);  // Not implemented.
    00141   void operator=(const vtkEdgeTable&);  // Not implemented.
    00142 };
    00143
    00144 #endif
    00145