00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkXMLPolyDataWriter.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 =========================================================================*/ 00044 #ifndef __vtkXMLPolyDataWriter_h 00045 #define __vtkXMLPolyDataWriter_h 00046 00047 #include "vtkXMLUnstructuredDataWriter.h" 00048 00049 class vtkPolyData; 00050 00051 class VTK_IO_EXPORT vtkXMLPolyDataWriter : public vtkXMLUnstructuredDataWriter 00052 { 00053 public: 00054 vtkTypeRevisionMacro(vtkXMLPolyDataWriter,vtkXMLUnstructuredDataWriter); 00055 void PrintSelf(ostream& os, vtkIndent indent); 00056 static vtkXMLPolyDataWriter* New(); 00057 00059 00060 void SetInput(vtkPolyData* input); 00061 vtkPolyData* GetInput(); 00063 00065 const char* GetDefaultFileExtension(); 00066 00067 protected: 00068 vtkXMLPolyDataWriter(); 00069 ~vtkXMLPolyDataWriter(); 00070 00071 const char* GetDataSetName(); 00072 void SetInputUpdateExtent(int piece, int numPieces, int ghostLevel); 00073 00074 void WriteInlinePieceAttributes(); 00075 void WriteInlinePiece(vtkIndent indent); 00076 00077 void WriteAppendedMode(vtkIndent indent); 00078 void WriteAppendedPieceAttributes(int index); 00079 void WriteAppendedPiece(int index, vtkIndent indent); 00080 void WriteAppendedPieceData(int index); 00081 00082 // Positions of attributes for each piece. 00083 unsigned long* NumberOfVertsPositions; 00084 unsigned long* NumberOfLinesPositions; 00085 unsigned long* NumberOfStripsPositions; 00086 unsigned long* NumberOfPolysPositions; 00087 unsigned long** VertsPositions; 00088 unsigned long** LinesPositions; 00089 unsigned long** StripsPositions; 00090 unsigned long** PolysPositions; 00091 private: 00092 vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&); // Not implemented. 00093 void operator=(const vtkXMLPolyDataWriter&); // Not implemented. 00094 }; 00095 00096 #endif