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 =========================================================================*/
25 #ifndef vtkOSPRayLightNode_h
26 #define vtkOSPRayLightNode_h
27 
28 #include "vtkRenderingOSPRayModule.h" // For export macro
29 #include "vtkLightNode.h"
30 
31 #include "ospray/ospray.h" // for ospray handle types
32 
33 #include <string> // for std::string
34 
37 class vtkLight;
39 
40 class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayLightNode :
41  public vtkLightNode
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
51  virtual void Render(bool prepass) override;
52 
54 
58  static void SetLightScale(double s);
59  static double GetLightScale();
61 
62  //state beyond rendering core...
63 
70 
72 
75  static void SetIsAmbient(int, vtkLight *);
76  static int GetIsAmbient(vtkLight *);
78 
84 
86 
89  static void SetRadius(double, vtkLight *);
90  static double GetRadius(vtkLight *);
92 
96  static OSPLight NewLight(vtkOSPRayRendererNode *orn,
97  OSPRenderer oRenderer,
98  const std::string& lightType);
99 
100 protected:
103 
104 private:
105  vtkOSPRayLightNode(const vtkOSPRayLightNode&) = delete;
106  void operator=(const vtkOSPRayLightNode&) = delete;
107 
108  static double LightScale;
109  void *OLight;
110 };
111 
112 #endif
vtkOSPRayRendererNode
links vtkRenderers to OSPRay
Definition: vtkOSPRayRendererNode.h:46
vtkOSPRayLightNode
links vtkLights to OSPRay
Definition: vtkOSPRayLightNode.h:42
vtkLight
a virtual light for 3D rendering
Definition: vtkLight.h:63
vtkLightNode
vtkViewNode specialized for vtkLights
Definition: vtkLightNode.h:33
vtkOSPRayLightNode::RADIUS
static vtkInformationDoubleKey * RADIUS()
The radius setting, when > 0.0, produces soft shadows in the path tracer.
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:35
vtkOSPRayLightNode::vtkOSPRayLightNode
vtkOSPRayLightNode()
vtkOSPRayLightNode::SetRadius
static void SetRadius(double, vtkLight *)
Convenience method to set/get RADIUS on a vtkLight.
vtkOSPRayLightNode::GetIsAmbient
static int GetIsAmbient(vtkLight *)
vtkOSPRayLightNode::GetLightScale
static double GetLightScale()
vtkLightNode.h
vtkOSPRayLightNode::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOSPRayLightNode::SetLightScale
static void SetLightScale(double s)
A global multiplier to all ospray lights.
vtkOSPRayLightNode::IS_AMBIENT
static vtkInformationIntegerKey * IS_AMBIENT()
When present on light, the light acts as an ambient source.
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkOSPRayLightNode::SetIsAmbient
static void SetIsAmbient(int, vtkLight *)
Convenience method to set/get IS_AMBIENT on a vtkLight.
vtkOSPRayLightNode::Render
virtual void Render(bool prepass) override
Make ospray calls to render me.
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkOSPRayLightNode::New
static vtkOSPRayLightNode * New()
vtkOSPRayLightNode::NewLight
static OSPLight NewLight(vtkOSPRayRendererNode *orn, OSPRenderer oRenderer, const std::string &lightType)
Select the version-appropriate signature for ospNewLight.
vtkOSPRayLightNode::~vtkOSPRayLightNode
~vtkOSPRayLightNode()
vtkOSPRayLightNode::GetRadius
static double GetRadius(vtkLight *)