-
Notifications
You must be signed in to change notification settings - Fork 1
/
vtkMultiChannelRenderWindowManager.h
87 lines (67 loc) · 3.22 KB
/
vtkMultiChannelRenderWindowManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*=========================================================================
Name: vtkMultiChannelRenderWindowManager.h
Author: David Borland, The Renaissance Computing Institute (RENCI)
Copyright: The Renaissance Computing Institute (RENCI)
License: Licensed under the RENCI Open Source Software License v. 1.0.
See included License.txt or
http://www.renci.org/resources/open-source-software-license
for details.
=========================================================================*/
// .NAME vtkMultiChannelRenderWindowManager
// .SECTION Description
// vtkMultiChannelRenderWindowManager is a class for adding multi-channel
// rendering support to a single vtkRenderWindow, specifically intended
// for immersive environments in which multiple views are tied to the same
// camera. Only one window/renderer/interactor/camera need be used, which
// makes dealing with interaction much simpler. The user specifies an
// arbitrary number of views, and vtkMultiChannelRenderWindowManager
// returns a platform-specific subclass of vtkRenderWindow that can
// perform multi-channel rendering. vtkMultiChannelRenderWindowManager
// also returns a vtkRenderer with a camera suitable for multi-channel
// rendering. The vtkRenderWindows and vtkRenderers returned should be
// deleted by the user. An example of its use is to render a left eye
// and right eye view of the scene in two channels next to each other,
// which is a standard configuration for passive stereo and head-mounted
// display devices. Similarly, multiple views of a scene may be necessary
// to render to immersive environments such as domes.
// .SECTION see also
// vtkRenderWindow vtkMultiChannelRenderWindowHelper vtkRenderWindowChannel
// vtkOpenGLMultiChannelCamera
#ifndef __vtkMultiChannelRenderWindowManager_h
#define __vtkMultiChannelRenderWindowManager_h
#include "vtkMultiChannelConfigure.h"
#include "vtkObject.h"
class vtkMultiChannelRenderWindowHelper;
class vtkRenderWindow;
class vtkRenderWindowChannel;
class vtkRenderer;
class VTK_MULTICHANNEL_EXPORT vtkMultiChannelRenderWindowManager : public vtkObject
{
public:
static vtkMultiChannelRenderWindowManager *New();
vtkTypeRevisionMacro(vtkMultiChannelRenderWindowManager,vtkObject);
void PrintSelf(ostream&, vtkIndent);
// Description:
// Add a channel for rendering.
void AddChannel(vtkRenderWindowChannel*);
void ClearChannels();
// Description:
// Returns a platform-specific subclass of vtkRenderWindow that can
// perform multi-channel rendering.
vtkRenderWindow* GetRenderWindow();
// Description:
// Returns a vtkRenderer suitable for multi-channel rendering.
// This creates a standard vtkRenderer, but replaces the vtkCamera
// with one that supports an aspect ratio different from that
// of the viewport.
vtkRenderer* GetRenderer();
protected:
vtkMultiChannelRenderWindowManager();
~vtkMultiChannelRenderWindowManager();
vtkMultiChannelRenderWindowHelper *Helper;
bool NeedsStereo;
private:
vtkMultiChannelRenderWindowManager(const vtkMultiChannelRenderWindowManager&); // Not implemented.
void operator=(const vtkMultiChannelRenderWindowManager&); // Not implemented.
};
#endif