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

vtkXMLPPolyDataReader.h

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