VTK  9.0.2
vtkOSPRayPass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOSPRayPass.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 =========================================================================*/
37 #ifndef vtkOSPRayPass_h
38 #define vtkOSPRayPass_h
39 
40 #include "vtkRenderPass.h"
41 #include "vtkRenderingRayTracingModule.h" // For export macro
42 
43 #include <string> // for std::string
44 
45 class vtkCameraPass;
46 class vtkLightsPass;
47 class vtkOSPRayPassInternals;
49 class vtkOverlayPass;
51 class vtkSequencePass;
52 class vtkVolumetricPass;
53 
54 class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayPass : public vtkRenderPass
55 {
56 public:
57  static vtkOSPRayPass* New();
58  vtkTypeMacro(vtkOSPRayPass, vtkRenderPass);
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
64  virtual void Render(const vtkRenderState* s) override;
65 
67 
71  vtkGetObjectMacro(SceneGraph, vtkOSPRayRendererNode);
73 
77  virtual void RenderInternal(const vtkRenderState* s);
78 
80 
85  static void RTInit();
86  static void RTShutdown();
87 
91  static bool IsSupported();
92 
97  static bool IsBackendAvailable(const char* name);
98 
99 protected:
104 
108  ~vtkOSPRayPass() override;
109 
117 
118 private:
119  vtkOSPRayPass(const vtkOSPRayPass&) = delete;
120  void operator=(const vtkOSPRayPass&) = delete;
121 
122  vtkOSPRayPassInternals* Internal;
123  std::string PreviousType;
124  static int RTDeviceRefCount;
125 };
126 
127 #endif
Implement the camera render pass.
Definition: vtkCameraPass.h:39
a simple class to control print indentation
Definition: vtkIndent.h:34
Implement the lights render pass.
Definition: vtkLightsPass.h:38
a render pass that uses OSPRay instead of GL
Definition: vtkOSPRayPass.h:55
static bool IsBackendAvailable(const char *name)
A run time query to see if a particular backend is available.
vtkOSPRayPass()
Default constructor.
vtkOSPRayRendererNode * SceneGraph
vtkLightsPass * LightsPass
virtual void RenderInternal(const vtkRenderState *s)
Called by the internals of this class.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOverlayPass * OverlayPass
static vtkOSPRayPass * New()
virtual void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
vtkCameraPass * CameraPass
vtkSequencePass * SequencePass
vtkRenderPassCollection * RenderPassCollection
void SetSceneGraph(vtkOSPRayRendererNode *)
Tells the pass what it will render.
static bool IsSupported()
A run time query to see if OSPRay can possibly work.
static void RTShutdown()
vtkVolumetricPass * VolumetricPass
static void RTInit()
Wrapper around ospray's init and shutdown that protect with a reference count.
~vtkOSPRayPass() override
Destructor.
links vtkRenderers to OSPRay
Render the overlay geometry with property key filtering.
an ordered list of RenderPasses
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:57
Context in which a vtkRenderPass will render.
Execute render passes sequentially.
Render the volumetric geometry with property key filtering.
@ name
Definition: vtkX3D.h:225
@ string
Definition: vtkX3D.h:496