00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBridgeDataSet.h 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 =========================================================================*/ 00025 #ifndef __vtkBridgeDataSet_h 00026 #define __vtkBridgeDataSet_h 00027 00028 #include "vtkBridgeExport.h" 00029 #include "vtkGenericDataSet.h" 00030 00031 class vtkDataSet; 00032 00033 class VTK_BRIDGE_EXPORT vtkBridgeDataSet : public vtkGenericDataSet 00034 { 00035 public: 00036 static vtkBridgeDataSet *New(); 00037 vtkTypeMacro(vtkBridgeDataSet,vtkGenericDataSet); 00038 void PrintSelf(ostream& os, vtkIndent indent); 00039 00042 vtkDataSet *GetDataSet(); 00043 00046 void SetDataSet(vtkDataSet *ds); 00047 00050 virtual vtkIdType GetNumberOfPoints(); 00051 00055 virtual vtkIdType GetNumberOfCells(int dim=-1); 00056 00061 virtual int GetCellDimension(); 00062 00070 void GetCellTypes(vtkCellTypes *types); 00071 00078 vtkGenericCellIterator *NewCellIterator(int dim=-1); 00079 00081 00086 vtkGenericCellIterator *NewBoundaryIterator(int dim=-1, 00087 int exteriorOnly=0); 00089 00092 vtkGenericPointIterator *NewPointIterator(); 00093 00094 00096 vtkIdType GetEstimatedSize(); 00097 00099 00108 int FindCell(double x[3], 00109 vtkGenericCellIterator* &cell, 00110 double tol2, 00111 int &subId, 00112 double pcoords[3]); 00114 00116 00118 void FindPoint(double x[3], 00119 vtkGenericPointIterator *p); 00121 00123 unsigned long int GetMTime(); 00124 00126 void ComputeBounds(); 00127 00128 protected: 00129 // Constructor with default bounds (0,1, 0,1, 0,1). 00130 vtkBridgeDataSet(); 00131 virtual ~vtkBridgeDataSet(); 00132 00133 //BTX 00134 friend class vtkBridgeCell; 00135 friend class vtkBridgeCellIterator; 00136 friend class vtkBridgeCellIteratorOnDataSet; 00137 friend class vtkBridgeCellIteratorOne; 00138 friend class vtkBridgePointIterator; 00139 friend class vtkBridgePointIteratorOnCell; 00140 friend class vtkBridgePointIteratorOnDataSet; 00141 friend class vtkBridgePointIteratorOne; 00142 //ETX 00143 00146 void ComputeNumberOfCellsAndTypes(); 00147 00148 vtkDataSet *Implementation; 00149 vtkIdType NumberOf0DCells; 00150 vtkIdType NumberOf1DCells; 00151 vtkIdType NumberOf2DCells; 00152 vtkIdType NumberOf3DCells; 00153 vtkCellTypes *Types; 00154 vtkTimeStamp ComputeNumberOfCellsTime; // for number of cells and cell types 00155 00156 private: 00157 vtkBridgeDataSet(const vtkBridgeDataSet&); // Not implemented. 00158 void operator=(const vtkBridgeDataSet&); // Not implemented. 00159 }; 00160 00161 #endif