VTK
vtkOpenGLLightMonitor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLLightMonitor
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 =========================================================================*/
30 #ifndef vtkOpenGLLightMonitor_h
31 #define vtkOpenGLLightMonitor_h
32 
33 #include "vtkRenderingOpenGLModule.h" // for export macro
34 #include "vtkObject.h"
35 
36 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLLightMonitor : public vtkObject
37 {
38 public:
39  static vtkOpenGLLightMonitor* New();
40  static vtkOpenGLLightMonitor *New(int lightId);
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43 
45 
49  vtkSetMacro(LightId, int);
50  vtkGetMacro(LightId, int);
52 
60  bool StateChanged();
61 
66  void Update();
67 
69 
72  void SetEnabled(int val);
73  void SetAmbient(float *val);
74  void SetDiffuse(float *val);
75  void SetSpecular(float *val);
76  void SetPosition(float *val);
77  void SetSpotDirection(float *val);
78  void SetSpotExponent(float val);
79  void SetSpotCutoff(float val);
80  void SetAttenuation(float *val);
82 
83 private:
84  vtkOpenGLLightMonitor(int lightId) : LightId(lightId), UpTime(0)
85  { this->Initialize(); }
86 
87  vtkOpenGLLightMonitor() : LightId(0), UpTime(0)
88  { this->Initialize(); }
89 
90  ~vtkOpenGLLightMonitor() VTK_OVERRIDE{}
91 
92  void Initialize();
93 
94 private:
95  int LightId;
96  int Enabled;
97  float Ambient[4];
98  float Diffuse[4];
99  float Specular[4];
100  float Position[4];
101  float SpotDirection[3];
102  float SpotExponent;
103  float SpotCutoff;
104  float Attenuation[3];
105  long long UpTime;
106 
107 private:
108  vtkOpenGLLightMonitor(const vtkOpenGLLightMonitor &) VTK_DELETE_FUNCTION;
109  void operator=(const vtkOpenGLLightMonitor &) VTK_DELETE_FUNCTION;
110 };
111 
112 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:53
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Update()
Updates the extensions string.
a simple class to control print indentation
Definition: vtkIndent.h:33
tracks state of OpenGL model-view and projection matrices.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...