VTK
vtkOSPRayLightNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOSPRayLightNode.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 =========================================================================*/
22 #ifndef vtkOSPRayLightNode_h
23 #define vtkOSPRayLightNode_h
24 
25 #include "vtkRenderingOSPRayModule.h" // For export macro
26 #include "vtkLightNode.h"
27 
28 #include "ospray/ospray.h" // for ospray handle types
29 
30 #include <string> // for std::string
31 
34 class vtkLight;
36 
37 class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayLightNode :
38  public vtkLightNode
39 {
40 public:
41  static vtkOSPRayLightNode* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
48  virtual void Render(bool prepass) override;
49 
51 
55  static void SetLightScale(double s);
56  static double GetLightScale();
58 
59  //state beyond rendering core...
60 
66  static vtkInformationIntegerKey* IS_AMBIENT();
67 
69 
72  static void SetIsAmbient(int, vtkLight *);
73  static int GetIsAmbient(vtkLight *);
75 
80  static vtkInformationDoubleKey* RADIUS();
81 
83 
86  static void SetRadius(double, vtkLight *);
87  static double GetRadius(vtkLight *);
89 
93  static OSPLight NewLight(vtkOSPRayRendererNode *orn,
94  OSPRenderer oRenderer,
95  const std::string& lightType);
96 
97 protected:
100 
101 private:
102  vtkOSPRayLightNode(const vtkOSPRayLightNode&) = delete;
103  void operator=(const vtkOSPRayLightNode&) = delete;
104 
105  static double LightScale;
106  void *OLight;
107 };
108 
109 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkViewNode specialized for vtkLights
Definition: vtkLightNode.h:28
a simple class to control print indentation
Definition: vtkIndent.h:33
Key for integer values in vtkInformation.
a virtual light for 3D rendering
Definition: vtkLight.h:56
static vtkLightNode * New()
virtual void Render(bool)
Makes calls to make self visible.
Definition: vtkViewNode.h:64
Key for double values in vtkInformation.
links vtkRenderers to OSPRay
links vtkLights to OSPRay