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

dox/IO/vtkXMLPolyDataReader.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkXMLPolyDataReader.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00032 #ifndef __vtkXMLPolyDataReader_h 00033 #define __vtkXMLPolyDataReader_h 00034 00035 #include "vtkXMLUnstructuredDataReader.h" 00036 00037 class vtkPolyData; 00038 00039 class VTK_IO_EXPORT vtkXMLPolyDataReader : public vtkXMLUnstructuredDataReader 00040 { 00041 public: 00042 vtkTypeRevisionMacro(vtkXMLPolyDataReader,vtkXMLUnstructuredDataReader); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 static vtkXMLPolyDataReader *New(); 00045 00047 00048 void SetOutput(vtkPolyData *output); 00049 vtkPolyData *GetOutput(); 00050 vtkPolyData *GetOutput(int idx); 00052 00054 00055 virtual vtkIdType GetNumberOfVerts(); 00056 virtual vtkIdType GetNumberOfLines(); 00057 virtual vtkIdType GetNumberOfStrips(); 00058 virtual vtkIdType GetNumberOfPolys(); 00060 00061 protected: 00062 vtkXMLPolyDataReader(); 00063 ~vtkXMLPolyDataReader(); 00064 00065 const char* GetDataSetName(); 00066 void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel); 00067 void SetupOutputTotals(); 00068 void SetupNextPiece(); 00069 void SetupPieces(int numPieces); 00070 void DestroyPieces(); 00071 00072 void SetupOutputData(); 00073 int ReadPiece(vtkXMLDataElement* ePiece); 00074 int ReadPieceData(); 00075 00076 // Read a data array whose tuples coorrespond to cells. 00077 int ReadArrayForCells(vtkXMLDataElement* da, vtkDataArray* outArray); 00078 00079 // The size of the UpdatePiece. 00080 int TotalNumberOfVerts; 00081 int TotalNumberOfLines; 00082 int TotalNumberOfStrips; 00083 int TotalNumberOfPolys; 00084 vtkIdType StartVert; 00085 vtkIdType StartLine; 00086 vtkIdType StartStrip; 00087 vtkIdType StartPoly; 00088 00089 // The cell elements for each piece. 00090 vtkXMLDataElement** VertElements; 00091 vtkXMLDataElement** LineElements; 00092 vtkXMLDataElement** StripElements; 00093 vtkXMLDataElement** PolyElements; 00094 vtkIdType* NumberOfVerts; 00095 vtkIdType* NumberOfLines; 00096 vtkIdType* NumberOfStrips; 00097 vtkIdType* NumberOfPolys; 00098 00099 private: 00100 vtkXMLPolyDataReader(const vtkXMLPolyDataReader&); // Not implemented. 00101 void operator=(const vtkXMLPolyDataReader&); // Not implemented. 00102 }; 00103 00104 #endif