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 =========================================================================*/
32 #ifndef vtkOpenGLLightMonitor_h
33 #define vtkOpenGLLightMonitor_h
34 
35 #include "vtkRenderingOpenGLModule.h" // for export macro
36 #include "vtkObject.h"
37 
39 {
40 public:
41  static vtkOpenGLLightMonitor* New();
42  static vtkOpenGLLightMonitor *New(int lightId);
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
49  vtkSetMacro(LightId, int);
50  vtkGetMacro(LightId, int);
52 
56  bool StateChanged();
57 
60  void Update();
61 
62  //BTX
64 
65  void SetEnabled(int val);
66  void SetAmbient(float *val);
67  void SetDiffuse(float *val);
68  void SetSpecular(float *val);
69  void SetPosition(float *val);
70  void SetSpotDirection(float *val);
71  void SetSpotExponent(float val);
72  void SetSpotCutoff(float val);
73  void SetAttenuation(float *val);
74  //ETX
76 
77 private:
78  vtkOpenGLLightMonitor(int lightId) : LightId(lightId), UpTime(0)
79  { this->Initialize(); }
80 
81  vtkOpenGLLightMonitor() : LightId(0), UpTime(0)
82  { this->Initialize(); }
83 
85 
86  void Initialize();
87 
88 private:
89  int LightId;
90  int Enabled;
91  float Ambient[4];
92  float Diffuse[4];
93  float Specular[4];
94  float Position[4];
95  float SpotDirection[3];
96  float SpotExponent;
97  float SpotCutoff;
98  float Attenuation[3];
99  long long UpTime;
100 
101 private:
102  vtkOpenGLLightMonitor(const vtkOpenGLLightMonitor &); // Not implemented
103  void operator=(const vtkOpenGLLightMonitor &); // Not implemented
104 };
105 
106 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
virtual void Update()
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKRENDERINGOPENGL_EXPORT
static vtkObject * New()