VTK  9.7.1
vtkAnariLightNode.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
19 #ifndef vtkAnariLightNode_h
20 #define vtkAnariLightNode_h
21 
22 #include "vtkLightNode.h"
23 #include "vtkRenderingAnariModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 
27 struct vtkAnariLightNodeInternals;
28 class vtkAnariSceneGraph;
31 class vtkLight;
32 
33 class VTKRENDERINGANARI_EXPORT vtkAnariLightNode : public vtkLightNode
34 {
35 public:
36  static vtkAnariLightNode* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  void Build(bool prepass) override;
47  void Synchronize(bool prepass) override;
51  void Render(bool prepass) override;
52 
56  void Invalidate(bool prepass) override;
57 
63  static vtkInformationDoubleKey* LIGHT_SCALE();
64 
66 
69  static void SetLightScale(double, vtkLight*);
70  static double GetLightScale(vtkLight*);
72 
73  // state beyond rendering core...
74 
80  static vtkInformationDoubleKey* RADIUS();
81 
83 
86  static void SetRadius(double, vtkLight*);
87  static double GetRadius(vtkLight*);
89 
96  static vtkInformationDoubleKey* FALLOFF_ANGLE();
97 
99 
102  static void SetFalloffAngle(double, vtkLight*);
103  static double GetFalloffAngle(vtkLight*);
105 
106 protected:
108  ~vtkAnariLightNode() override;
109 
110 private:
111  vtkAnariLightNode(const vtkAnariLightNode&) = delete;
112  void operator=(const vtkAnariLightNode&) = delete;
113 
114  void ClearLight();
115  vtkLight* GetVtkLight() const;
116  bool LightWasModified() const;
117 
118  vtkAnariLightNodeInternals* Internals{ nullptr };
119 };
120 
121 VTK_ABI_NAMESPACE_END
122 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Build(bool)
Builds myself.
Definition: vtkViewNode.h:46
links vtkLights to ANARI
vtkViewNode specialized for vtkLights
Definition: vtkLightNode.h:20
virtual void Synchronize(bool)
Ensures that my state agrees with my Renderable's.
Definition: vtkViewNode.h:51
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for integer values in vtkInformation.
a virtual light for 3D rendering
Definition: vtkLight.h:49
static vtkLightNode * New()
virtual void Render(bool)
Makes calls to make self visible.
Definition: vtkViewNode.h:56
virtual void Invalidate(bool)
Clear any cached data.
Definition: vtkViewNode.h:61
Key for double values in vtkInformation.
links vtkRenderers to ANARI