VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkBridgeDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBridgeDataSet.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 =========================================================================*/
25 #ifndef __vtkBridgeDataSet_h
26 #define __vtkBridgeDataSet_h
27 
28 #include "vtkBridgeExport.h" //for module export macro
29 #include "vtkGenericDataSet.h"
30 
31 class vtkDataSet;
32 
33 class VTKTESTINGGENERICBRIDGE_EXPORT vtkBridgeDataSet : public vtkGenericDataSet
34 {
35 public:
36  static vtkBridgeDataSet *New();
37  vtkTypeMacro(vtkBridgeDataSet,vtkGenericDataSet);
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
42  vtkDataSet *GetDataSet();
43 
46  void SetDataSet(vtkDataSet *ds);
47 
50  virtual vtkIdType GetNumberOfPoints();
51 
55  virtual vtkIdType GetNumberOfCells(int dim=-1);
56 
61  virtual int GetCellDimension();
62 
70  void GetCellTypes(vtkCellTypes *types);
71 
78  vtkGenericCellIterator *NewCellIterator(int dim=-1);
79 
81 
86  vtkGenericCellIterator *NewBoundaryIterator(int dim=-1,
87  int exteriorOnly=0);
89 
92  vtkGenericPointIterator *NewPointIterator();
93 
94 
96  vtkIdType GetEstimatedSize();
97 
99 
108  int FindCell(double x[3],
109  vtkGenericCellIterator* &cell,
110  double tol2,
111  int &subId,
112  double pcoords[3]);
114 
116 
118  void FindPoint(double x[3],
119  vtkGenericPointIterator *p);
121 
123  unsigned long int GetMTime();
124 
126  void ComputeBounds();
127 
128 protected:
129  // Constructor with default bounds (0,1, 0,1, 0,1).
131  virtual ~vtkBridgeDataSet();
132 
133  //BTX
134  friend class vtkBridgeCell;
135  friend class vtkBridgeCellIterator;
142  //ETX
143 
146  void ComputeNumberOfCellsAndTypes();
147 
148  vtkDataSet *Implementation;
149  vtkIdType NumberOf0DCells;
150  vtkIdType NumberOf1DCells;
151  vtkIdType NumberOf2DCells;
152  vtkIdType NumberOf3DCells;
153  vtkCellTypes *Types;
154  vtkTimeStamp ComputeNumberOfCellsTime; // for number of cells and cell types
155 
156 private:
157  vtkBridgeDataSet(const vtkBridgeDataSet&); // Not implemented.
158  void operator=(const vtkBridgeDataSet&); // Not implemented.
159 };
160 
161 #endif
vtkCellTypes * Types
Implementation of vtkGenericCellIterator. It is just an example that show how to implement the Generi...
Implementation of vtkGenericPointIterator.
vtkIdType NumberOf0DCells
Implementation of vtkGenericAdaptorCell.
Definition: vtkBridgeCell.h:37
Iterate over one cell only of a dataset.
Implementation of vtkGenericDataSet.
vtkIdType NumberOf3DCells
Implementation of vtkGenericPointIterator.
vtkTimeStamp ComputeNumberOfCellsTime
vtkIdType NumberOf1DCells
Implementation of vtkGenericPointIterator.
vtkDataSet * Implementation
Iterate over cells of a dataset.
Iterate over one point of a dataset.
vtkIdType NumberOf2DCells