VTK  9.1.0
ExternalVTKWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: ExternalVTKWidget.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=========================================================================*/
15// .NAME ExternalVTKWidget - Use VTK rendering in an external window/application
16// .SECTION Description
17// ExternalVTKWidget provides an easy way to render VTK objects in an external
18// environment using the VTK rendering framework without drawing a new window.
19
20#ifndef __ExternalVTKWidget_h
21#define __ExternalVTKWidget_h
22
25#include "vtkObject.h"
26#include "vtkRenderingExternalModule.h" // For export macro
27
28// Class that maintains an external render window.
29class VTKRENDERINGEXTERNAL_EXPORT ExternalVTKWidget : public vtkObject
30{
31public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
36 // Set/Get an external render window for the ExternalVTKWidget.
37 // Since this is a special environment, the methods are limited to use
38 // vtkExternalOpenGLRenderWindow only.
39 // \sa vtkExternalOpenGLRenderWindow
42
43 // Creates a new renderer and adds it to the render window.
44 // Returns a handle to the created renderer.
45 // NOTE: To get a list of renderers, one must go through the RenderWindow API
46 // i.e. ExternalVTKWidget->GetRenderWindow()->GetRenderers()
47 // \sa vtkRenderWindow::GetRenderers()
49
50protected:
53
55
56private:
57 ExternalVTKWidget(const ExternalVTKWidget&) = delete;
58 void operator=(const ExternalVTKWidget&) = delete;
59};
60
61#endif //__ExternalVTKWidget_h
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(void)
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:113
abstract base class for most VTK objects
Definition: vtkObject.h:73