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

vtkGenericDataSet.h

Go to the documentation of this file.
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 =========================================================================*/
00069 #ifndef __vtkGenericDataSet_h
00070 #define __vtkGenericDataSet_h
00071 
00072 #include "vtkDataObject.h"
00073 
00074 class vtkCellTypes;
00075 class vtkGenericCellIterator;
00076 class vtkGenericAttributeCollection;
00077 class vtkGenericCellTessellator;
00078 class vtkGenericPointIterator;
00079 class vtkRenderer;
00080 
00081 class VTK_FILTERING_EXPORT vtkGenericDataSet : public vtkDataObject
00082 {
00083 public:
00085 
00086   vtkTypeRevisionMacro(vtkGenericDataSet,vtkDataObject);
00087   void PrintSelf(ostream& os, vtkIndent indent);
00089 
00092   virtual vtkIdType GetNumberOfPoints() = 0;
00093 
00097   virtual vtkIdType GetNumberOfCells(int dim=-1) = 0;
00098 
00103   virtual int GetCellDimension() = 0;
00104   
00112   virtual void GetCellTypes(vtkCellTypes *types);
00113 
00122   virtual vtkGenericCellIterator *NewCellIterator(int dim=-1) = 0;
00123   
00125 
00131   virtual vtkGenericCellIterator *NewBoundaryIterator(int dim=-1,
00132                                                       int exteriorOnly=0) = 0;
00134   
00138   virtual vtkGenericPointIterator *NewPointIterator()=0;
00139   
00141 
00150   virtual vtkIdType FindCell(double x[3],
00151                              vtkGenericCellIterator* &cell,
00152                              double tol2,
00153                              int &subId,
00154                              double pcoords[3]) = 0;
00156   
00158 
00160   virtual void FindPoint(double x[3],
00161                          vtkGenericPointIterator *p)=0;
00163   
00166   virtual unsigned long int GetMTime();
00167   
00169   virtual void ComputeBounds()=0;
00170   
00174   virtual double *GetBounds();
00175 
00178   virtual void GetBounds(double bounds[6]);
00179   
00182   virtual double *GetCenter();
00183 
00185   virtual void GetCenter(double center[3]);
00186 
00189   virtual double GetLength();
00190   
00192 
00193   vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
00195   
00197 
00199   virtual void SetTessellator(vtkGenericCellTessellator *tessellator);
00200   vtkGetObjectMacro(Tessellator,vtkGenericCellTessellator);
00202 
00204 
00207   void SetUpdateExtent(int piece, int numPieces, int ghostLevel);
00208   virtual void SetUpdateExtent( int ext[6] )
00209     {
00210     this->Superclass::SetUpdateExtent(ext);
00211     }
00212   void SetUpdateExtent( int x1, int x2, int y1, int y2, int z1, int z2 )
00213     {
00214     this->Superclass::SetUpdateExtent(x1, x2, y1, y2, z1, z2);
00215     }
00217 
00221   virtual unsigned long GetActualMemorySize();
00222   
00224   int GetDataObjectType();
00225   
00227   virtual vtkIdType GetEstimatedSize() = 0;
00228   
00229 protected:
00232   vtkGenericDataSet();
00233   
00234   virtual ~vtkGenericDataSet();
00235 
00236   vtkGenericAttributeCollection *Attributes;
00237 
00238   //Main helper class to tesselate a higher order cell into linear ones.
00239   vtkGenericCellTessellator *Tessellator;
00240 
00241   double Bounds[6];  // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
00242   double Center[3]; // Center of the geometric bounding box
00243   vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
00244   
00245 private:
00246   vtkGenericDataSet(const vtkGenericDataSet&);  // Not implemented.
00247   void operator=(const vtkGenericDataSet&);    // Not implemented.
00248 };
00249 
00250 #endif