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

IO/vtkXMLPPolyDataReader.h

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