VTK  9.3.0
vtkExporter.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 vtkExporter_h
28#define vtkExporter_h
29
30#include "vtkIOExportModule.h" // For export macro
31#include "vtkObject.h"
32VTK_ABI_NAMESPACE_BEGIN
33class vtkRenderWindow;
34class vtkRenderer;
35
36class VTKIOEXPORT_EXPORT vtkExporter : public vtkObject
37{
38public:
39 vtkTypeMacro(vtkExporter, vtkObject);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
46 virtual void Write();
47
51 void Update();
52
54
58 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
60
62
73 vtkGetObjectMacro(ActiveRenderer, vtkRenderer);
75
77
81 void SetInput(vtkRenderWindow* renWin) { this->SetRenderWindow(renWin); }
82 vtkRenderWindow* GetInput() { return this->GetRenderWindow(); }
84
89 void SetStartWrite(void (*f)(void*), void* arg);
90
95 void SetEndWrite(void (*f)(void*), void* arg);
96
100 void SetStartWriteArgDelete(void (*f)(void*));
101
105 void SetEndWriteArgDelete(void (*f)(void*));
106
111
112protected:
114 ~vtkExporter() override;
115
118 virtual void WriteData() = 0;
119
120 void (*StartWrite)(void*);
121 void (*StartWriteArgDelete)(void*);
123 void (*EndWrite)(void*);
124 void (*EndWriteArgDelete)(void*);
126
127private:
128 vtkExporter(const vtkExporter&) = delete;
129 void operator=(const vtkExporter&) = delete;
130};
131
132VTK_ABI_NAMESPACE_END
133#endif
abstract class to write a scene to a file
Definition vtkExporter.h:37
virtual void Write()
Write data to output.
~vtkExporter() override
vtkMTimeType GetMTime() override
Returns the MTime also considering the RenderWindow.
void * EndWriteArg
vtkRenderWindow * RenderWindow
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void WriteData()=0
void SetInput(vtkRenderWindow *renWin)
These methods are provided for backward compatibility.
Definition vtkExporter.h:81
void SetEndWrite(void(*f)(void *), void *arg)
Specify a function to be called after data is written.
void * StartWriteArg
void SetStartWrite(void(*f)(void *), void *arg)
Specify a function to be called before data is written.
vtkRenderer * ActiveRenderer
void SetStartWriteArgDelete(void(*f)(void *))
Set the arg delete method.
void SetEndWriteArgDelete(void(*f)(void *))
Set the arg delete method.
vtkRenderWindow * GetInput()
These methods are provided for backward compatibility.
Definition vtkExporter.h:82
virtual void SetRenderWindow(vtkRenderWindow *)
Set/Get the rendering window that contains the scene to be written.
void Update()
Convenient alias for Write() method.
virtual void SetActiveRenderer(vtkRenderer *)
Set/Get the renderer that contains actors to be written.
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
create a window for renderers to draw into
abstract specification for renderers
Definition vtkRenderer.h:59
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270