VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkUnstructuredGridBase.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 =========================================================================*/ 00030 #ifndef __vtkUnstructuredGridBase_h 00031 #define __vtkUnstructuredGridBase_h 00032 00033 #include "vtkCommonDataModelModule.h" // For export macro 00034 #include "vtkPointSet.h" 00035 00036 class VTKCOMMONDATAMODEL_EXPORT vtkUnstructuredGridBase : public vtkPointSet 00037 { 00038 public: 00039 vtkAbstractTypeMacro(vtkUnstructuredGridBase,vtkPointSet) 00040 void PrintSelf(ostream &os, vtkIndent indent) 00041 { 00042 this->Superclass::PrintSelf(os, indent); 00043 } 00044 00045 int GetDataObjectType() { return VTK_UNSTRUCTURED_GRID; } 00046 00049 virtual void Allocate(vtkIdType numCells=1000, int extSize=1000) = 0; 00050 00052 void DeepCopy(vtkDataObject *src); 00053 00055 00063 virtual vtkIdType InsertNextCell(int type, vtkIdType npts, 00064 vtkIdType *ptIds) = 0; 00066 00073 virtual vtkIdType InsertNextCell(int type, vtkIdList *ptIds) = 0; 00074 00075 // Desciption: 00076 // Insert/create a polyhedron cell. npts is the number of unique points in 00077 // the cell. pts is the list of the unique cell point Ids. nfaces is the 00078 // number of faces in the cell. faces is the face-stream 00079 // [numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...]. 00080 // All point Ids are global. 00081 virtual vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds, 00082 vtkIdType nfaces, vtkIdType *faces) = 0; 00083 00089 virtual void ReplaceCell(vtkIdType cellId, int npts, vtkIdType *pts) = 0; 00090 00094 virtual void GetIdsOfCellsOfType(int type, vtkIdTypeArray *array) = 0; 00095 00097 virtual int IsHomogeneous() = 0; 00098 00099 //BTX 00101 00102 static vtkUnstructuredGridBase* GetData(vtkInformation* info); 00103 static vtkUnstructuredGridBase* GetData(vtkInformationVector* v, int i=0); 00104 //ETX 00106 00107 protected: 00108 vtkUnstructuredGridBase(); 00109 ~vtkUnstructuredGridBase(); 00110 00111 private: 00112 vtkUnstructuredGridBase(const vtkUnstructuredGridBase&); // Not implemented. 00113 void operator=(const vtkUnstructuredGridBase&); // Not implemented. 00114 }; 00115 00116 #endif