VTK  9.3.1
vtkFacetWriter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
27 #ifndef vtkFacetWriter_h
28 #define vtkFacetWriter_h
29 
30 #include "vtkIOGeometryModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkInformation;
35 
36 class VTKIOGEOMETRY_EXPORT vtkFacetWriter : public vtkPolyDataAlgorithm
37 {
38 public:
39  static vtkFacetWriter* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  vtkSetFilePathMacro(FileName);
48  vtkGetFilePathMacro(FileName);
50 
54  void Write();
55 
56  void WriteToStream(ostream* ost);
57 
58 protected:
60  ~vtkFacetWriter() override;
61 
62  // This is called by the superclass.
63  // This is the method you should override.
64  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
65  vtkInformationVector* outputVector) override;
66 
67  int FillInputPortInformation(int, vtkInformation*) override;
68 
69  int WriteDataToStream(ostream* ost, vtkPolyData* data);
70 
71  char* FileName;
72  ostream* OutputStream;
73 
74 private:
75  vtkFacetWriter(const vtkFacetWriter&) = delete;
76  void operator=(const vtkFacetWriter&) = delete;
77 };
78 
79 VTK_ABI_NAMESPACE_END
80 #endif
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:79
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
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.