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 =========================================================================*/ 00033 #ifndef __vtkXMLPolyDataWriter_h 00034 #define __vtkXMLPolyDataWriter_h 00035 00036 #include "vtkXMLUnstructuredDataWriter.h" 00037 00038 class vtkPolyData; 00039 00040 class VTK_IO_EXPORT vtkXMLPolyDataWriter : public vtkXMLUnstructuredDataWriter 00041 { 00042 public: 00043 vtkTypeRevisionMacro(vtkXMLPolyDataWriter,vtkXMLUnstructuredDataWriter); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 static vtkXMLPolyDataWriter* New(); 00046 00048 00049 void SetInput(vtkPolyData* input); 00050 vtkPolyData* GetInput(); 00052 00054 const char* GetDefaultFileExtension(); 00055 00056 protected: 00057 vtkXMLPolyDataWriter(); 00058 ~vtkXMLPolyDataWriter(); 00059 00060 const char* GetDataSetName(); 00061 void SetInputUpdateExtent(int piece, int numPieces, int ghostLevel); 00062 00063 void WriteInlinePieceAttributes(); 00064 void WriteInlinePiece(vtkIndent indent); 00065 00066 void WriteAppendedMode(vtkIndent indent); 00067 void WriteAppendedPieceAttributes(int index); 00068 void WriteAppendedPiece(int index, vtkIndent indent); 00069 void WriteAppendedPieceData(int index); 00070 00071 // Positions of attributes for each piece. 00072 unsigned long* NumberOfVertsPositions; 00073 unsigned long* NumberOfLinesPositions; 00074 unsigned long* NumberOfStripsPositions; 00075 unsigned long* NumberOfPolysPositions; 00076 unsigned long** VertsPositions; 00077 unsigned long** LinesPositions; 00078 unsigned long** StripsPositions; 00079 unsigned long** PolysPositions; 00080 private: 00081 vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&); // Not implemented. 00082 void operator=(const vtkXMLPolyDataWriter&); // Not implemented. 00083 }; 00084 00085 #endif