VTK
vtkExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExporter.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 =========================================================================*/
39 #ifndef vtkExporter_h
40 #define vtkExporter_h
41 
42 #include "vtkIOExportModule.h" // For export macro
43 #include "vtkObject.h"
44 class vtkRenderWindow;
45 class vtkRenderer;
46 
47 class VTKIOEXPORT_EXPORT vtkExporter : public vtkObject
48 {
49 public:
50  vtkTypeMacro(vtkExporter,vtkObject);
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
57  virtual void Write();
58 
62  void Update();
63 
65 
68  virtual void SetRenderWindow(vtkRenderWindow*);
69  vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
71 
73 
83  virtual void SetActiveRenderer(vtkRenderer*);
84  vtkGetObjectMacro(ActiveRenderer,vtkRenderer);
86 
88 
92  void SetInput(vtkRenderWindow *renWin) {this->SetRenderWindow(renWin);};
93  vtkRenderWindow *GetInput() {return this->GetRenderWindow();};
95 
100  void SetStartWrite(void (*f)(void *), void *arg);
101 
106  void SetEndWrite(void (*f)(void *), void *arg);
107 
111  void SetStartWriteArgDelete(void (*f)(void *));
112 
116  void SetEndWriteArgDelete(void (*f)(void *));
117 
121  vtkMTimeType GetMTime() override;
122 
123 protected:
124  vtkExporter();
125  ~vtkExporter() override;
126 
129  virtual void WriteData() = 0;
130 
131  void (*StartWrite)(void *);
132  void (*StartWriteArgDelete)(void *);
134  void (*EndWrite)(void *);
135  void (*EndWriteArgDelete)(void *);
136  void *EndWriteArg;
137 private:
138  vtkExporter(const vtkExporter&) = delete;
139  void operator=(const vtkExporter&) = delete;
140 };
141 
142 #endif
143 
144 
abstract class to write a scene to a file
Definition: vtkExporter.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
void * StartWriteArg
Definition: vtkExporter.h:133
abstract specification for renderers
Definition: vtkRenderer.h:63
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkRenderer * ActiveRenderer
Definition: vtkExporter.h:128
create a window for renderers to draw into
vtkRenderWindow * RenderWindow
Definition: vtkExporter.h:127
vtkRenderWindow * GetInput()
These methods are provided for backward compatibility.
Definition: vtkExporter.h:93
void * EndWriteArg
Definition: vtkExporter.h:136
void SetInput(vtkRenderWindow *renWin)
These methods are provided for backward compatibility.
Definition: vtkExporter.h:92