VTK  9.2.6
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 =========================================================================*/
40 #ifndef vtkOSPRayPass_h
41 #define vtkOSPRayPass_h
42 
43 #include "vtkRenderPass.h"
44 #include "vtkRenderingRayTracingModule.h" // For export macro
45 
46 #include <string> // for std::string
47 
48 class vtkCameraPass;
49 class vtkLightsPass;
50 class vtkOSPRayPassInternals;
52 class vtkOverlayPass;
54 class vtkSequencePass;
55 class vtkVolumetricPass;
56 
57 class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayPass : public vtkRenderPass
58 {
59 public:
60  static vtkOSPRayPass* New();
61  vtkTypeMacro(vtkOSPRayPass, vtkRenderPass);
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
67  void Render(const vtkRenderState* s) override;
68 
70 
74  vtkGetObjectMacro(SceneGraph, vtkOSPRayRendererNode);
76 
80  virtual void RenderInternal(const vtkRenderState* s);
81 
83 
88  static void RTInit();
89  static void RTShutdown();
90 
94  static bool IsSupported();
95 
100  static bool IsBackendAvailable(const char* name);
101 
102 protected:
107 
111  ~vtkOSPRayPass() override;
112 
120 
121 private:
122  vtkOSPRayPass(const vtkOSPRayPass&) = delete;
123  void operator=(const vtkOSPRayPass&) = delete;
124 
125  vtkOSPRayPassInternals* Internal;
126  std::string PreviousType;
127  static int RTDeviceRefCount;
128 };
129 
130 #endif
Implement the camera render pass.
a simple class to control print indentation
Definition: vtkIndent.h:119
Implement the lights render pass.
Definition: vtkLightsPass.h:80
a render pass that uses OSPRay instead of GL
Definition: vtkOSPRayPass.h:58
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:60
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