VTK
dox
Rendering
External
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
23
#include "
vtkExternalOpenGLRenderer.h
"
24
#include "
vtkExternalOpenGLRenderWindow.h
"
25
#include "
vtkObject.h
"
26
#include "vtkRenderingExternalModule.h"
// For export macro
27
28
// Class that maintains an external render window.
29
class
VTKRENDERINGEXTERNAL_EXPORT
ExternalVTKWidget
:
public
vtkObject
30
{
31
public
:
32
static
ExternalVTKWidget
*
New
();
33
vtkTypeMacro(
ExternalVTKWidget
,
vtkObject
);
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
40
vtkExternalOpenGLRenderWindow
* GetRenderWindow(
void
);
41
void
SetRenderWindow(
vtkExternalOpenGLRenderWindow
* renWin);
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()
48
vtkExternalOpenGLRenderer
* AddRenderer();
49
50
protected
:
51
ExternalVTKWidget
();
52
~
ExternalVTKWidget
()
override
;
53
54
vtkExternalOpenGLRenderWindow
*
RenderWindow
;
55
56
private
:
57
ExternalVTKWidget
(
const
ExternalVTKWidget
&) =
delete
;
58
void
operator=(
const
ExternalVTKWidget
&) =
delete
;
59
};
60
61
#endif //__ExternalVTKWidget_h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
ExternalVTKWidget::RenderWindow
vtkExternalOpenGLRenderWindow * RenderWindow
Definition:
ExternalVTKWidget.h:54
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkExternalOpenGLRenderWindow
OpenGL render window that allows using an external window to render vtk objects.
Definition:
vtkExternalOpenGLRenderWindow.h:50
vtkExternalOpenGLRenderer.h
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkExternalOpenGLRenderer
OpenGL renderer.
Definition:
vtkExternalOpenGLRenderer.h:43
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
ExternalVTKWidget
Definition:
ExternalVTKWidget.h:29
vtkExternalOpenGLRenderWindow.h
Generated by
1.8.16