VTK  9.3.0
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 
63  vtkGetObjectMacro(SceneGraph, vtkOSPRayRendererNode);
65 
69  virtual void RenderInternal(const vtkRenderState* s);
70 
72 
77  static void RTInit();
78  static void RTShutdown();
79 
83  static bool IsSupported();
84 
89  static bool IsBackendAvailable(const char* name);
90 
91 protected:
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
Implement the camera render pass.
Definition: vtkCameraPass.h:40
a simple class to control print indentation
Definition: vtkIndent.h:38
Implement the lights render pass.
Definition: vtkLightsPass.h:39
a render pass that uses OSPRay instead of GL
Definition: vtkOSPRayPass.h:47
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()
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()
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
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:49
Context in which a vtkRenderPass will render.
Execute render passes sequentially.
Render the volumetric geometry with property key filtering.
@ name
Definition: vtkX3D.h:219
@ string
Definition: vtkX3D.h:490