VTK
vtkXMLPolyDataWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPolyDataWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef __vtkXMLPolyDataWriter_h
36 #define __vtkXMLPolyDataWriter_h
37 
38 #include "vtkIOXMLModule.h" // For export macro
40 
41 class vtkPolyData;
42 
43 class VTKIOXML_EXPORT vtkXMLPolyDataWriter : public vtkXMLUnstructuredDataWriter
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48  static vtkXMLPolyDataWriter* New();
49 
50  //BTX
52 
54  //ETX
56 
58  const char* GetDefaultFileExtension();
59 
60 protected:
63 
64  // see algorithm for more info
66 
67  const char* GetDataSetName();
68 
69  virtual void AllocatePositionArrays();
70  virtual void DeletePositionArrays();
71 
73  void WriteInlinePiece(vtkIndent indent);
74 
76  void WriteAppendedPiece(int index, vtkIndent indent);
77  void WriteAppendedPieceData(int index);
78 
80  void CalculateSuperclassFraction(float* fractions);
81 
82  // Positions of attributes for each piece.
83  unsigned long* NumberOfVertsPositions;
84  unsigned long* NumberOfLinesPositions;
85  unsigned long* NumberOfStripsPositions;
86  unsigned long* NumberOfPolysPositions;
87 
92 
93 private:
94  vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&); // Not implemented.
95  void operator=(const vtkXMLPolyDataWriter&); // Not implemented.
96 };
97 
98 #endif