VTK  9.3.0
vtkOSPRayLightNode.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
13 #ifndef vtkOSPRayLightNode_h
14 #define vtkOSPRayLightNode_h
15 
16 #include "vtkLightNode.h"
17 #include "vtkRenderingRayTracingModule.h" // For export macro
18 
19 #include "RTWrapper/RTWrapper.h" // for handle types
20 
21 #include <string> // for std::string
22 
23 VTK_ABI_NAMESPACE_BEGIN
26 class vtkLight;
28 
29 class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayLightNode : public vtkLightNode
30 {
31 public:
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
39  void Render(bool prepass) override;
40 
42 
46  static void SetLightScale(double s);
47  static double GetLightScale();
49 
50  // state beyond rendering core...
51 
58 
60 
63  static void SetIsAmbient(int, vtkLight*);
64  static int GetIsAmbient(vtkLight*);
66 
72 
74 
77  static void SetRadius(double, vtkLight*);
78  static double GetRadius(vtkLight*);
80 
81 protected:
83  ~vtkOSPRayLightNode() override;
84 
85 private:
86  vtkOSPRayLightNode(const vtkOSPRayLightNode&) = delete;
87  void operator=(const vtkOSPRayLightNode&) = delete;
88 
89  static double LightScale;
90  void* OLight;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
Key for double values in vtkInformation.
Key for integer values in vtkInformation.
vtkViewNode specialized for vtkLights
Definition: vtkLightNode.h:21
a virtual light for 3D rendering
Definition: vtkLight.h:58
links vtkLights to OSPRay
static double GetRadius(vtkLight *)
Convenience method to set/get RADIUS on a vtkLight.
static vtkInformationDoubleKey * RADIUS()
The radius setting, when > 0.0, produces soft shadows in the path tracer.
static int GetIsAmbient(vtkLight *)
Convenience method to set/get IS_AMBIENT on a vtkLight.
static void SetLightScale(double s)
A global multiplier to all ospray lights.
static vtkOSPRayLightNode * New()
void Render(bool prepass) override
Make ospray calls to render me.
static vtkInformationIntegerKey * IS_AMBIENT()
When present on light, the light acts as an ambient source.
static void SetRadius(double, vtkLight *)
Convenience method to set/get RADIUS on a vtkLight.
~vtkOSPRayLightNode() override
static void SetIsAmbient(int, vtkLight *)
Convenience method to set/get IS_AMBIENT on a vtkLight.
static double GetLightScale()
A global multiplier to all ospray lights.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
links vtkRenderers to OSPRay