VTK  9.1.0
vtkJSONRenderWindowExporter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkJSONRenderWindowExporter.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=========================================================================*/
33#ifndef vtkJSONRenderWindowExporter_h
34#define vtkJSONRenderWindowExporter_h
35
36#include "vtkIOExportModule.h" // For export macro
37
38#include "vtkExporter.h"
39#include "vtkNew.h" // For vtkNew
40#include "vtkViewNodeFactory.h" // For vtkViewNodeFactory
41
42class vtkArchiver;
45
46class VTKIOEXPORT_EXPORT vtkJSONRenderWindowExporter : public vtkExporter
47{
48public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
58 vtkGetObjectMacro(Serializer, vtkVtkJSSceneGraphSerializer);
60
62
65 virtual void SetArchiver(vtkArchiver*);
66 vtkGetObjectMacro(Archiver, vtkArchiver);
68
70
73 void WriteData() override;
75
77
80 vtkSetMacro(CompactOutput, bool);
81 vtkGetMacro(CompactOutput, bool);
82 vtkBooleanMacro(CompactOutput, bool);
84
85protected:
88
89private:
91 void operator=(const vtkJSONRenderWindowExporter&) = delete;
92
93 vtkArchiver* Archiver;
96 bool CompactOutput;
97};
98
99#endif
Writes an archive.
Definition: vtkArchiver.h:37
abstract class to write a scene to a file
Definition: vtkExporter.h:48
a simple class to control print indentation
Definition: vtkIndent.h:113
Exports a render window for vtk-js.
~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.
static vtkJSONRenderWindowExporter * New()
Converts elements of a VTK scene graph into vtk-js elements.
Constructs view nodes for traversing a scene for vtk-js.