VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkGenericDataSet.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 =========================================================================*/ 00056 #ifndef __vtkGenericDataSet_h 00057 #define __vtkGenericDataSet_h 00058 00059 #include "vtkDataObject.h" 00060 00061 class vtkCellTypes; 00062 class vtkGenericCellIterator; 00063 class vtkGenericAttributeCollection; 00064 class vtkGenericCellTessellator; 00065 class vtkGenericPointIterator; 00066 00067 class VTK_FILTERING_EXPORT vtkGenericDataSet : public vtkDataObject 00068 { 00069 public: 00071 00072 vtkTypeRevisionMacro(vtkGenericDataSet,vtkDataObject); 00073 void PrintSelf(ostream& os, vtkIndent indent); 00075 00078 virtual vtkIdType GetNumberOfPoints() = 0; 00079 00083 virtual vtkIdType GetNumberOfCells(int dim=-1) = 0; 00084 00089 virtual int GetCellDimension() = 0; 00090 00098 virtual void GetCellTypes(vtkCellTypes *types); 00099 00108 virtual vtkGenericCellIterator *NewCellIterator(int dim=-1) = 0; 00109 00111 00117 virtual vtkGenericCellIterator *NewBoundaryIterator(int dim=-1, 00118 int exteriorOnly=0) = 0; 00120 00125 virtual vtkGenericPointIterator *NewPointIterator()=0; 00126 00128 00137 virtual int FindCell(double x[3], 00138 vtkGenericCellIterator* &cell, 00139 double tol2, 00140 int &subId, 00141 double pcoords[3]) = 0; 00143 00145 00147 virtual void FindPoint(double x[3], 00148 vtkGenericPointIterator *p)=0; 00150 00153 virtual unsigned long int GetMTime(); 00154 00156 virtual void ComputeBounds()=0; 00157 00161 virtual double *GetBounds(); 00162 00165 virtual void GetBounds(double bounds[6]); 00166 00169 virtual double *GetCenter(); 00170 00172 virtual void GetCenter(double center[3]); 00173 00176 virtual double GetLength(); 00177 00179 00180 vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection); 00182 00184 00186 virtual void SetTessellator(vtkGenericCellTessellator *tessellator); 00187 vtkGetObjectMacro(Tessellator,vtkGenericCellTessellator); 00189 00193 virtual unsigned long GetActualMemorySize(); 00194 00196 int GetDataObjectType(); 00197 00199 virtual vtkIdType GetEstimatedSize() = 0; 00200 00201 //BTX 00203 00204 static vtkGenericDataSet* GetData(vtkInformation* info); 00205 static vtkGenericDataSet* GetData(vtkInformationVector* v, int i=0); 00206 //ETX 00208 00209 protected: 00212 vtkGenericDataSet(); 00213 00214 virtual ~vtkGenericDataSet(); 00215 00216 vtkGenericAttributeCollection *Attributes; 00217 00218 //Main helper class to tesselate a higher order cell into linear ones. 00219 vtkGenericCellTessellator *Tessellator; 00220 00221 double Bounds[6]; // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds 00222 double Center[3]; // Center of the geometric bounding box 00223 vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed 00224 00225 private: 00226 vtkGenericDataSet(const vtkGenericDataSet&); // Not implemented. 00227 void operator=(const vtkGenericDataSet&); // Not implemented. 00228 }; 00229 00230 #endif