VTK  9.4.20241219
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
25VTK_ABI_NAMESPACE_BEGIN
26
27class vtkAnariLightNodeInternals;
31class vtkLight;
32
33class VTKRENDERINGANARI_EXPORT vtkAnariLightNode : public vtkLightNode
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
43 void Build(bool prepass) override;
47 void Synchronize(bool prepass) override;
51 virtual void Render(bool prepass) override;
52
56 virtual void Invalidate(bool prepass) override;
57
63
65
68 static void SetLightScale(double, vtkLight*);
69 static double GetLightScale(vtkLight*);
71
72 // state beyond rendering core...
73
79
81
84 static void SetRadius(double, vtkLight*);
85 static double GetRadius(vtkLight*);
87
94
96
99 static void SetFalloffAngle(double, vtkLight*);
100 static double GetFalloffAngle(vtkLight*);
102
103protected:
106
107private:
108 vtkAnariLightNode(const vtkAnariLightNode&) = delete;
109 void operator=(const vtkAnariLightNode&) = delete;
110
111 void ClearLight();
112 vtkLight* GetVtkLight() const;
113 bool LightWasModified() const;
114
115 vtkAnariLightNodeInternals* Internals{ nullptr };
116};
117
118VTK_ABI_NAMESPACE_END
119#endif
links vtkLights to ANARI
virtual void Invalidate(bool prepass) override
Invalidates cached rendering data.
static void SetLightScale(double, vtkLight *)
Convenience method to set/get LIGHT_SCALE on a vtkLight.
static vtkInformationDoubleKey * FALLOFF_ANGLE()
For cone-shaped lights, size (angle in radians) of the region between the rim (of the illumination co...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkInformationDoubleKey * RADIUS()
The radius setting, when > 0.0, produces soft shadows in the path tracer.
static double GetRadius(vtkLight *)
static vtkAnariLightNode * New()
static void SetRadius(double, vtkLight *)
Convenience method to set/get RADIUS on a vtkLight.
static double GetFalloffAngle(vtkLight *)
static double GetLightScale(vtkLight *)
Convenience method to set/get LIGHT_SCALE on a vtkLight.
static void SetFalloffAngle(double, vtkLight *)
Convenience method to set/get FALLOFF_ANGLE on a vtkLight.
static vtkInformationDoubleKey * LIGHT_SCALE()
A global multiplier to all ANARI lights.
void Synchronize(bool prepass) override
Sync ANARICamera parameters with vtkCamera.
virtual void Render(bool prepass) override
Make ANARI calls to render me.
void Build(bool prepass) override
Ensure the right type of ANARICamera object is being held.
links vtkRenderers to ANARI
a simple class to control print indentation
Definition vtkIndent.h:108
Key for double values in vtkInformation.
Key for integer values in vtkInformation.
vtkViewNode specialized for vtkLights
a virtual light for 3D rendering
Definition vtkLight.h:159