VTK  9.3.1
vtkOSPRayPass.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
28 #ifndef vtkOSPRayPass_h
29 #define vtkOSPRayPass_h
30 
31 #include "vtkRenderPass.h"
32 #include "vtkRenderingRayTracingModule.h" // For export macro
33 
34 #include <string> // for std::string
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkCameraPass;
38 class vtkLightsPass;
39 class vtkOSPRayPassInternals;
41 class vtkOverlayPass;
43 class vtkSequencePass;
44 class vtkVolumetricPass;
45 
46 class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayPass : public vtkRenderPass
47 {
48 public:
49  static vtkOSPRayPass* New();
50  vtkTypeMacro(vtkOSPRayPass, vtkRenderPass);
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
56  void Render(const vtkRenderState* s) override;
57 
59 
62  void SetSceneGraph(vtkOSPRayRendererNode*);
63  vtkGetObjectMacro(SceneGraph, vtkOSPRayRendererNode);
65 
69  virtual void RenderInternal(const vtkRenderState* s);
70 
72 
76  static void RTInit();
78  static void RTShutdown();
79 
83  static bool IsSupported();
84 
89  static bool IsBackendAvailable(const char* name);
90 
91 protected:
95  vtkOSPRayPass();
96 
100  ~vtkOSPRayPass() override;
101 
109 
110 private:
111  vtkOSPRayPass(const vtkOSPRayPass&) = delete;
112  void operator=(const vtkOSPRayPass&) = delete;
113 
114  vtkOSPRayPassInternals* Internal;
115  std::string PreviousType;
116  static int RTDeviceRefCount;
117 };
118 
119 VTK_ABI_NAMESPACE_END
120 #endif
vtkRenderPassCollection * RenderPassCollection
vtkLightsPass * LightsPass
Execute render passes sequentially.
Render the volumetric geometry with property key filtering.
vtkOSPRayRendererNode * SceneGraph
Implement the camera render pass.
Definition: vtkCameraPass.h:30
Render the overlay geometry with property key filtering.
Context in which a vtkRenderPass will render.
vtkCameraPass * CameraPass
a render pass that uses OSPRay instead of GL
Definition: vtkOSPRayPass.h:46
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkOverlayPass * OverlayPass
vtkSequencePass * SequencePass
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
an ordered list of RenderPasses
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:48
links vtkRenderers to OSPRay
Implement the lights render pass.
Definition: vtkLightsPass.h:29
vtkVolumetricPass * VolumetricPass
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.