VTK
vtkFacetWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkFacetWriter.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 =========================================================================*/
39 #ifndef vtkFacetWriter_h
40 #define vtkFacetWriter_h
41 
42 #include "vtkIOGeometryModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 class vtkInformation;
46 
47 class VTKIOGEOMETRY_EXPORT vtkFacetWriter : public vtkPolyDataAlgorithm
48 {
49 public:
50  static vtkFacetWriter *New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
58  vtkSetStringMacro(FileName);
59  vtkGetStringMacro(FileName);
61 
65  void Write();
66 
67  void WriteToStream(ostream* ost);
68 
69 protected:
71  ~vtkFacetWriter() override;
72 
73  // This is called by the superclass.
74  // This is the method you should override.
75  int RequestData(vtkInformation *request,
76  vtkInformationVector** inputVector,
77  vtkInformationVector* outputVector) override;
78 
79  int FillInputPortInformation(int, vtkInformation *) override;
80 
81  int WriteDataToStream(ostream* ost, vtkPolyData* data);
82 
83  char *FileName;
84  ostream *OutputStream;
85 
86 private:
87  vtkFacetWriter(const vtkFacetWriter&) = delete;
88  void operator=(const vtkFacetWriter&) = delete;
89 };
90 
91 #endif
92 
ostream * OutputStream
reads a dataset in Facet format
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.