VTK  9.3.1
vtkJSONRenderWindowExporter.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
24 #ifndef vtkJSONRenderWindowExporter_h
25 #define vtkJSONRenderWindowExporter_h
26 
27 #include "vtkIOExportModule.h" // For export macro
28 
29 #include "vtkExporter.h"
30 #include "vtkNew.h" // For vtkNew
31 #include "vtkViewNodeFactory.h" // For vtkViewNodeFactory
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkArchiver;
37 
38 class VTKIOEXPORT_EXPORT vtkJSONRenderWindowExporter : public vtkExporter
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  virtual void SetSerializer(vtkVtkJSSceneGraphSerializer*);
50  vtkGetObjectMacro(Serializer, vtkVtkJSSceneGraphSerializer);
52 
54 
57  virtual void SetArchiver(vtkArchiver*);
58  vtkGetObjectMacro(Archiver, vtkArchiver);
60 
62 
65  void WriteData() override;
67 
69 
72  vtkSetMacro(CompactOutput, bool);
73  vtkGetMacro(CompactOutput, bool);
74  vtkBooleanMacro(CompactOutput, bool);
76 
77 protected:
79  ~vtkJSONRenderWindowExporter() override;
80 
81 private:
83  void operator=(const vtkJSONRenderWindowExporter&) = delete;
84 
85  vtkArchiver* Archiver;
86  vtkVtkJSSceneGraphSerializer* Serializer;
87  vtkVtkJSViewNodeFactory* Factory;
88  bool CompactOutput;
89 };
90 
91 VTK_ABI_NAMESPACE_END
92 #endif
abstract class to write a scene to a file
Definition: vtkExporter.h:36
virtual void WriteData()=0
Constructs view nodes for traversing a scene for vtk-js.
a simple class to control print indentation
Definition: vtkIndent.h:28
Converts elements of a VTK scene graph into vtk-js elements.
Writes an archive.
Definition: vtkArchiver.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Exports a render window for vtk-js.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...