VTK  9.4.20241222
ExternalVTKWidget.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
3// .NAME ExternalVTKWidget - Use VTK rendering in an external window/application
4// .SECTION Description
5// ExternalVTKWidget provides an easy way to render VTK objects in an external
6// environment using the VTK rendering framework without drawing a new window.
7
8#ifndef __ExternalVTKWidget_h
9#define __ExternalVTKWidget_h
10
13#include "vtkObject.h"
14#include "vtkRenderingExternalModule.h" // For export macro
15
16// Class that maintains an external render window.
17VTK_ABI_NAMESPACE_BEGIN
18class VTKRENDERINGEXTERNAL_EXPORT ExternalVTKWidget : public vtkObject
19{
20public:
23 void PrintSelf(ostream& os, vtkIndent indent) override;
24
25 // Set/Get an external render window for the ExternalVTKWidget.
26 // Since this is a special environment, the methods are limited to use
27 // vtkExternalOpenGLRenderWindow only.
28 // \sa vtkExternalOpenGLRenderWindow
31
32 // Creates a new renderer and adds it to the render window.
33 // Returns a handle to the created renderer.
34 // NOTE: To get a list of renderers, one must go through the RenderWindow API
35 // i.e. ExternalVTKWidget->GetRenderWindow()->GetRenderers()
36 // \sa vtkRenderWindow::GetRenderers()
38
39protected:
42
44
45private:
46 ExternalVTKWidget(const ExternalVTKWidget&) = delete;
47 void operator=(const ExternalVTKWidget&) = delete;
48};
49
50VTK_ABI_NAMESPACE_END
51#endif //__ExternalVTKWidget_h
52/* VTK-HeaderTest-Exclude: INCLUDES */
void SetRenderWindow(vtkExternalOpenGLRenderWindow *renWin)
vtkExternalOpenGLRenderer * AddRenderer()
~ExternalVTKWidget() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExternalOpenGLRenderWindow * RenderWindow
vtkExternalOpenGLRenderWindow * GetRenderWindow()
static ExternalVTKWidget * New()
OpenGL render window that allows using an external window to render vtk objects.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162