VTK  9.3.20240329
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 
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:
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
Writes an archive.
Definition: vtkArchiver.h:29
abstract class to write a scene to a file
Definition: vtkExporter.h:37
a simple class to control print indentation
Definition: vtkIndent.h:108
Exports a render window for vtk-js.
static vtkJSONRenderWindowExporter * New()
~vtkJSONRenderWindowExporter() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetArchiver(vtkArchiver *)
Specify the Archiver object.
void WriteData() override
Write scene data.
virtual void SetSerializer(vtkVtkJSSceneGraphSerializer *)
Specify the Serializer object.
Converts elements of a VTK scene graph into vtk-js elements.
Constructs view nodes for traversing a scene for vtk-js.