VTK  9.3.20240328
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 
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 
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
reads a dataset in Facet format
ostream * OutputStream
void WriteToStream(ostream *ost)
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkSetFilePathMacro(FileName)
Specify file name of Facet datafile to read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkFacetWriter * New()
~vtkFacetWriter() override
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkGetFilePathMacro(FileName)
Specify file name of Facet datafile to read.
int WriteDataToStream(ostream *ost, vtkPolyData *data)
void Write()
Write data.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
@ data
Definition: vtkX3D.h:315