VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/DataModel/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 "vtkCommonDataModelModule.h" // For export macro
00060 #include "vtkDataObject.h"
00061 
00062 class vtkCellTypes;
00063 class vtkGenericCellIterator;
00064 class vtkGenericAttributeCollection;
00065 class vtkGenericCellTessellator;
00066 class vtkGenericPointIterator;
00067 
00068 class VTKCOMMONDATAMODEL_EXPORT vtkGenericDataSet : public vtkDataObject
00069 {
00070 public:
00072 
00073   vtkTypeMacro(vtkGenericDataSet,vtkDataObject);
00074   void PrintSelf(ostream& os, vtkIndent indent);
00076 
00079   virtual vtkIdType GetNumberOfPoints() = 0;
00080 
00084   virtual vtkIdType GetNumberOfCells(int dim=-1) = 0;
00085 
00090   virtual int GetCellDimension() = 0;
00091 
00099   virtual void GetCellTypes(vtkCellTypes *types);
00100 
00109   virtual vtkGenericCellIterator *NewCellIterator(int dim=-1) = 0;
00110 
00112 
00118   virtual vtkGenericCellIterator *NewBoundaryIterator(int dim=-1,
00119                                                       int exteriorOnly=0) = 0;
00121 
00126   virtual vtkGenericPointIterator *NewPointIterator()=0;
00127 
00129 
00138   virtual int FindCell(double x[3],
00139                        vtkGenericCellIterator* &cell,
00140                        double tol2,
00141                        int &subId,
00142                        double pcoords[3]) = 0;
00144 
00146 
00148   virtual void FindPoint(double x[3],
00149                          vtkGenericPointIterator *p)=0;
00151 
00154   virtual unsigned long int GetMTime();
00155 
00157   virtual void ComputeBounds()=0;
00158 
00162   virtual double *GetBounds();
00163 
00166   virtual void GetBounds(double bounds[6]);
00167 
00170   virtual double *GetCenter();
00171 
00173   virtual void GetCenter(double center[3]);
00174 
00177   virtual double GetLength();
00178 
00180 
00181   vtkGetObjectMacro(Attributes, vtkGenericAttributeCollection);
00183 
00185 
00193   virtual vtkDataSetAttributes* GetAttributes(int type)
00194     { return this->Superclass::GetAttributes(type); }
00196 
00198 
00200   virtual void SetTessellator(vtkGenericCellTessellator *tessellator);
00201   vtkGetObjectMacro(Tessellator,vtkGenericCellTessellator);
00203 
00207   virtual unsigned long GetActualMemorySize();
00208 
00210   int GetDataObjectType();
00211 
00213   virtual vtkIdType GetEstimatedSize() = 0;
00214 
00215   //BTX
00217 
00218   static vtkGenericDataSet* GetData(vtkInformation* info);
00219   static vtkGenericDataSet* GetData(vtkInformationVector* v, int i=0);
00220   //ETX
00222 
00223 protected:
00226   vtkGenericDataSet();
00227 
00228   virtual ~vtkGenericDataSet();
00229 
00230   vtkGenericAttributeCollection *Attributes;
00231 
00232   //Main helper class to tesselate a higher order cell into linear ones.
00233   vtkGenericCellTessellator *Tessellator;
00234 
00235   double Bounds[6];  // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
00236   double Center[3]; // Center of the geometric bounding box
00237   vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
00238 
00239 private:
00240   vtkGenericDataSet(const vtkGenericDataSet&);  // Not implemented.
00241   void operator=(const vtkGenericDataSet&);    // Not implemented.
00242 };
00243 
00244 #endif