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 
39 
40 class vtkPolyData;
41 
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent);
47  static vtkXMLPolyDataWriter* New();
48 
49  //BTX
51 
53  //ETX
55 
57  const char* GetDefaultFileExtension();
58 
59 protected:
62 
63  // see algorithm for more info
65 
66  const char* GetDataSetName();
67 
68  virtual void AllocatePositionArrays();
69  virtual void DeletePositionArrays();
70 
72  void WriteInlinePiece(vtkIndent indent);
73 
75  void WriteAppendedPiece(int index, vtkIndent indent);
76  void WriteAppendedPieceData(int index);
77 
79  void CalculateSuperclassFraction(float* fractions);
80 
81  // Positions of attributes for each piece.
82  unsigned long* NumberOfVertsPositions;
83  unsigned long* NumberOfLinesPositions;
84  unsigned long* NumberOfStripsPositions;
85  unsigned long* NumberOfPolysPositions;
86 
91 
92 private:
93  vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&); // Not implemented.
94  void operator=(const vtkXMLPolyDataWriter&); // Not implemented.
95 };
96 
97 #endif