VTK
dox/Filtering/vtkGenericDataSet.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGenericDataSet.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 =========================================================================*/
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   vtkTypeMacro(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 
00192   virtual vtkDataSetAttributes* GetAttributes(int type)
00193     { return this->Superclass::GetAttributes(type); }
00195 
00197 
00199   virtual void SetTessellator(vtkGenericCellTessellator *tessellator);
00200   vtkGetObjectMacro(Tessellator,vtkGenericCellTessellator);
00202 
00206   virtual unsigned long GetActualMemorySize();
00207 
00209   int GetDataObjectType();
00210 
00212   virtual vtkIdType GetEstimatedSize() = 0;
00213 
00214   //BTX
00216 
00217   static vtkGenericDataSet* GetData(vtkInformation* info);
00218   static vtkGenericDataSet* GetData(vtkInformationVector* v, int i=0);
00219   //ETX
00221 
00222 protected:
00225   vtkGenericDataSet();
00226 
00227   virtual ~vtkGenericDataSet();
00228 
00229   vtkGenericAttributeCollection *Attributes;
00230 
00231   //Main helper class to tesselate a higher order cell into linear ones.
00232   vtkGenericCellTessellator *Tessellator;
00233 
00234   double Bounds[6];  // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
00235   double Center[3]; // Center of the geometric bounding box
00236   vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
00237 
00238 private:
00239   vtkGenericDataSet(const vtkGenericDataSet&);  // Not implemented.
00240   void operator=(const vtkGenericDataSet&);    // Not implemented.
00241 };
00242 
00243 #endif