VTK  9.3.20240919
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
80
82
85 static void SetIsAmbient(int, vtkLight*);
86 static int GetIsAmbient(vtkLight*);
88
94
96
99 static void SetRadius(double, vtkLight*);
100 static double GetRadius(vtkLight*);
102
109
111
114 static void SetFalloffAngle(double, vtkLight*);
115 static double GetFalloffAngle(vtkLight*);
117
118protected:
121
122private:
123 vtkAnariLightNode(const vtkAnariLightNode&) = delete;
124 void operator=(const vtkAnariLightNode&) = delete;
125
126 void ClearLight();
127 vtkLight* GetVtkLight() const;
128 bool LightWasModified() const;
129
130 vtkAnariLightNodeInternals* Internals{ nullptr };
131};
132
133VTK_ABI_NAMESPACE_END
134#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.
static void SetIsAmbient(int, vtkLight *)
Convenience method to set/get IS_AMBIENT on a vtkLight.
static int GetIsAmbient(vtkLight *)
static vtkInformationIntegerKey * IS_AMBIENT()
When present on light, the light acts as an ambient source.
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