VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLPPolyDataReader.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 =========================================================================*/ 00028 #ifndef __vtkXMLPPolyDataReader_h 00029 #define __vtkXMLPPolyDataReader_h 00030 00031 #include "vtkIOXMLModule.h" // For export macro 00032 #include "vtkXMLPUnstructuredDataReader.h" 00033 00034 class vtkPolyData; 00035 00036 class VTKIOXML_EXPORT vtkXMLPPolyDataReader : public vtkXMLPUnstructuredDataReader 00037 { 00038 public: 00039 vtkTypeMacro(vtkXMLPPolyDataReader,vtkXMLPUnstructuredDataReader); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 static vtkXMLPPolyDataReader *New(); 00042 00044 00045 vtkPolyData *GetOutput(); 00046 vtkPolyData *GetOutput(int idx); 00048 00049 protected: 00050 vtkXMLPPolyDataReader(); 00051 ~vtkXMLPPolyDataReader(); 00052 00053 const char* GetDataSetName(); 00054 void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel); 00055 vtkIdType GetNumberOfCellsInPiece(int piece); 00056 vtkIdType GetNumberOfVertsInPiece(int piece); 00057 vtkIdType GetNumberOfLinesInPiece(int piece); 00058 vtkIdType GetNumberOfStripsInPiece(int piece); 00059 vtkIdType GetNumberOfPolysInPiece(int piece); 00060 void SetupOutputTotals(); 00061 00062 void SetupOutputData(); 00063 void SetupNextPiece(); 00064 int ReadPieceData(); 00065 00066 void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray); 00067 vtkXMLDataReader* CreatePieceReader(); 00068 virtual int FillOutputPortInformation(int, vtkInformation*); 00069 00070 // The size of the UpdatePiece. 00071 vtkIdType TotalNumberOfVerts; 00072 vtkIdType TotalNumberOfLines; 00073 vtkIdType TotalNumberOfStrips; 00074 vtkIdType TotalNumberOfPolys; 00075 vtkIdType StartVert; 00076 vtkIdType StartLine; 00077 vtkIdType StartStrip; 00078 vtkIdType StartPoly; 00079 00080 private: 00081 vtkXMLPPolyDataReader(const vtkXMLPPolyDataReader&); // Not implemented. 00082 void operator=(const vtkXMLPPolyDataReader&); // Not implemented. 00083 }; 00084 00085 #endif