forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkOSPRayPass.h
104 lines (87 loc) · 3.12 KB
/
vtkOSPRayPass.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOSPRayPass.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkOSPRayPass
* @brief a render pass that uses OSPRay instead of GL
*
* This is a render pass that can be put into a vtkRenderWindow which makes
* it use OSPRay instead of OpenGL to render. Adding/Removing the pass
* will swap back and forth between the two.
*
* OSPRay MPI - OSPRay can use its own internal MPI layer to replicate
* the scene data across mpi processes and composite the image.
* This results in linear performance scaling and supports secondary
* rays. To run in this mode, a special environment variable is supplied
* called VTKOSPRAY_ARGS where commandline flags can be inserted for
* OSPRay's init call. As an example of this, below is a commandline
* for running paraview on localhost, but having OSPRay's rendering
* occur on 2 remote nodes. ospray_mpi_worker is a seperate application
* supplied with OSPRay binary packages or when built with MPI support
* from source.
* 'mpirun -ppn 1 -hosts localhost VTKOSPRAY_ARGS="-osp:mpi"
* ./paraview : -hosts n1, n2 ./ospray_mpi_worker -osp:mpi'
*/
#ifndef vtkOSPRayPass_h
#define vtkOSPRayPass_h
#include "vtkRenderingOSPRayModule.h" // For export macro
#include "vtkRenderPass.h"
class vtkCameraPass;
class vtkLightsPass;
class vtkOSPRayPassInternals;
class vtkOSPRayRendererNode;
class vtkOverlayPass;
class vtkRenderPassCollection;
class vtkSequencePass;
class vtkVolumetricPass;
class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayPass : public vtkRenderPass
{
public:
static vtkOSPRayPass *New();
vtkTypeMacro(vtkOSPRayPass,vtkRenderPass);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Perform rendering according to a render state s.
*/
virtual void Render(const vtkRenderState *s);
//@{
/**
* Tells the pass what it will render.
*/
void SetSceneGraph(vtkOSPRayRendererNode *);
vtkGetObjectMacro(SceneGraph, vtkOSPRayRendererNode);
//@}
/**
* Called by the internals of this class
*/
virtual void RenderInternal(const vtkRenderState *s);
protected:
/**
* Default constructor.
*/
vtkOSPRayPass();
/**
* Destructor.
*/
virtual ~vtkOSPRayPass();
vtkOSPRayRendererNode *SceneGraph;
vtkCameraPass *CameraPass;
vtkLightsPass *LightsPass;
vtkOverlayPass *OverlayPass;
vtkVolumetricPass *VolumetricPass;
vtkSequencePass *SequencePass;
vtkRenderPassCollection *RenderPassCollection;
private:
vtkOSPRayPass(const vtkOSPRayPass&) VTK_DELETE_FUNCTION;
void operator=(const vtkOSPRayPass&) VTK_DELETE_FUNCTION;
class Internals;
vtkOSPRayPassInternals *Internal;
};
#endif